Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/verify-grpc-generation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Verify gRPC Generation

on:
push:
pull_request:
workflow_dispatch:

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
verify-grpc-generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Verify gRPC code generation
# -pl: build only spec-grpc and compat-0.3/spec-grpc modules
# -am: also build their dependencies
# -Dskip.protobuf.generate=false: enable protoc generation in spec-grpc (skipped by default)
# -Pproto-compile: activate the proto-compile profile in compat-0.3/spec-grpc
run: mvn install -B -DskipTests -pl spec-grpc,compat-0.3/spec-grpc -am -Dskip.protobuf.generate=false -Pproto-compile
14 changes: 8 additions & 6 deletions spec-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,21 @@
<plugin>
<groupId>io.github.ascopes</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>4.1.2</version>
<version>5.1.4</version>
<configuration>
<skip>${skip.protobuf.generate}</skip>
<cleanOutputDirectories>true</cleanOutputDirectories>
<protoc>${protobuf-java.version}</protoc>
<protoc kind="binary-maven">
<version>${protobuf-java.version}</version>
</protoc>
<outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
<binaryMavenPlugins>
<binaryMavenPlugin>
<plugins>
<plugin kind="binary-maven">
<groupId>io.grpc</groupId>
<artifactId>protoc-gen-grpc-java</artifactId>
<version>${grpc.version}</version>
</binaryMavenPlugin>
</binaryMavenPlugins>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
Expand Down