2
2
workflow_dispatch :
3
3
inputs :
4
4
protobuf_versions :
5
- description : ' Comma separated list of Protobuf-Java versions (i.e. "3.25.5","4.28.3")'
6
- # Default value for workflow_dispatch flow. If updating default value, update below as well.
7
- default : ' "3.25.5","4.28.3"'
5
+ description : ' Comma separated list of Protobuf-Java versions (i.e. "3.25.x","4.x.y")'
8
6
required : true
9
7
schedule :
10
8
- cron : ' 0 1 * * *' # Nightly at 1am
11
9
12
- name : Downstream Source Compatibility Nightly
10
+ name : Downstream Compatibility Nightly
13
11
jobs :
14
- downstream-protobuf-source-test :
12
+ #
13
+ define-matrix :
15
14
runs-on : ubuntu-22.04
15
+ outputs :
16
+ protobuf-version : ${{ steps.protobuf-versions.outputs.protobuf-versions }}
17
+ steps :
18
+ - name : Default Protobuf Versions
19
+ id : protobuf-versions
20
+ run : |
21
+ echo 'protobuf-versions=["3.25.4","4.28.3"]' >> "${GITHUB_OUTPUT}"
22
+ downstream-protobuf-test :
23
+ runs-on : ubuntu-22.04
24
+ needs : define-matrix
16
25
strategy :
17
26
fail-fast : false
18
27
matrix :
@@ -31,16 +40,15 @@ jobs:
31
40
- java-spanner
32
41
- java-storage
33
42
- java-storage-nio
34
- # Specify the Protobuf versions here as well because the default values above are only supplied from
35
- # the workflow_dispatch flow. Without this, the nightly workflow doesn't have a default input otherwise
36
- # and would resolve to ''. When updating, update both places to keep default values consistent.
37
- protobuf-version : ${{ fromJSON(format('[{0}]', inputs.protobuf_versions || '"3.25.5","4.28.3"')) }}
43
+ # Default values are specified from the `protobuf-versions` step in the `define-matrix` job. Without this,
44
+ # the nightly workflow doesn't have a default input and would resolve to ''.
45
+ protobuf-version : ${{ fromJSON(format('[{0}]', inputs.protobuf_versions || needs.define-matrix.outputs.protobuf-versions)) }}
38
46
steps :
39
47
- uses : actions/checkout@v3
40
48
- uses : actions/setup-java@v3
41
49
with :
42
50
java-version : 17
43
51
distribution : temurin
44
- - run : mvn - version
45
- - name : Perform downstream compatibility testing
52
+ - run : echo "Testing with Protobuf-Java v${{ matrix.protobuf- version }}"
53
+ - name : Perform downstream source compatibility testing
46
54
run : REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version}}" ./.kokoro/presubmit/downstream-protobuf-source-compatibility.sh
0 commit comments