Skip to content

Bump coursier/cache-action from 7.0.0 to 8.0.0 (#625) #1570

Bump coursier/cache-action from 7.0.0 to 8.0.0 (#625)

Bump coursier/cache-action from 7.0.0 to 8.0.0 (#625) #1570

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one or more
# license agreements; and to You under the Apache License, version 2.0:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# This file is part of the Apache Pekko project, which was derived from Akka.
#
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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.13.18, 3.3.7]
JAVA_VERSION: [17, 21]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Java ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: ${{ matrix.JAVA_VERSION }}
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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.13
- test-set: scala3
scala-version: 3.3
- test-set: gen-java
scala-version: 2.13
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Java 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Install go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
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@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Java 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Java 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Java 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: 17
- name: Install sbt
uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15
- name: Cache Coursier cache
uses: coursier/cache-action@c5ca79321d170b8a18c288d9cadc2a6037166d0f # v6.4.8.0.0
- name: Build Paradox Docs
run: |-
cp .jvmopts-ci .jvmopts
sbt paradox