Skip to content

grpc 1.68.1

grpc 1.68.1 #1021

Workflow file for this run

name: Validate and test
on:
pull_request:
push:
branches: [ main ]
tags-ignore: [ v* ]
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check-code-style:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Binary-compatibility check
run: |-
cp .jvmopts-ci .jvmopts
sbt grpcVersionSyncCheck googleProtobufVersionSyncCheck +mimaReportBinaryIssues
compile-benchmarks:
name: Compile Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Compile benchmarks
run: |-
cd benchmark-java
sbt test:compile
compile-and-test:
name: Compile and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.12.20, 2.13.15, 3.3.4]
JAVA_VERSION: [8, 11, 17, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.JAVA_VERSION }}
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Compile and test for JDK ${{ matrix.JAVA_VERSION }}, Scala ${{ matrix.SCALA_VERSION }}
run: |-
cp .jvmopts-ci .jvmopts
sbt ++${{ matrix.SCALA_VERSION }} test
sbt ++${{ matrix.SCALA_VERSION }}! codegen/test
test-sbt:
name: sbt scripted tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test-set: gen-scala-server
scala-version: 2.12
- test-set: gen-java
scala-version: 2.12
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Install go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Scripted ${{ matrix.test-set }}
run: cp .jvmopts-ci .jvmopts && sbt ++${{ matrix.scala-version }}.* "sbt-plugin/scripted ${{ matrix.test-set }}/*"
test-gradle:
name: Gradle tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Gather version
run: |-
echo `sbt --no-colors --error 'set aggregate := false; print version' | xargs` > ~/.version
cat ~/.version
- name: Cache local Gradle repository
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('plugin-tester-*/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish artifacts locally
run: |-
cp .jvmopts-ci .jvmopts
sbt codegen/publishM2 scalapb-protoc-plugin/publishM2 +runtime/publishM2
cd gradle-plugin
./gradlew clean test publishToMavenLocal --console=plain --info --stacktrace
find ~/.m2 | grep gradle
- name: Test Gradle Java ${{ matrix.SCALA_VERSION }}
run: |-
cd plugin-tester-java
./gradlew clean test --console=plain --info --stacktrace -Dpekko.grpc.project.version=$(cat ~/.version)
- name: Test Gradle Scala ${{ matrix.SCALA_VERSION }}
run: |-
cd plugin-tester-scala
./gradlew clean test --console=plain --info --stacktrace -Dpekko.grpc.project.version=$(cat ~/.version)
- name: Stop Gradle Daemon
# as suggested in https://github.com/actions/cache/blob/main/examples.md#java---gradle
if: always()
run: cd plugin-tester-scala; ./gradlew --stop
test-maven:
name: Maven tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Gather version
run: |-
echo `sbt --no-colors --error 'set aggregate := false; print version' | xargs` > ~/.version
cat ~/.version
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('plugin-tester-*/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Publish artifacts locally
run: |-
cp .jvmopts-ci .jvmopts
sbt codegen/publishM2 scalapb-protoc-plugin/publishM2 +runtime/publishM2 maven-plugin/publishM2
- name: Test Maven Java
run: |-
cd plugin-tester-java
mvn -Dpekko.grpc.project.version=`cat ~/.version` pekko-grpc:generate compile
- name: Test Maven Scala
run: |-
cd plugin-tester-scala
mvn -Dpekko.grpc.project.version=`cat ~/.version` pekko-grpc:generate scala:compile
test-docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- name: Build Paradox Docs
run: |-
cp .jvmopts-ci .jvmopts
sbt paradox