1212 branches : ['**']
1313 push :
1414 branches : ['**']
15- tags : [v*]
1615
1716env :
1817 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1918
20-
21- concurrency :
22- group : ${{ github.workflow }} @ ${{ github.ref }}
23- cancel-in-progress : true
24-
2519jobs :
2620 build :
2721 name : Build and Test
2822 strategy :
2923 matrix :
3024 os : [ubuntu-latest]
31- scala : [2.12, 2.13, 3]
25+ scala : [2.12.18 , 2.13.12 , 3.3.1 ]
3226 java : [zulu@8]
3327 runs-on : ${{ matrix.os }}
34- timeout-minutes : 60
3528 steps :
3629 - name : Checkout current branch (full)
3730 uses : actions/checkout@v4
3831 with :
3932 fetch-depth : 0
4033
4134 - name : Setup Java (zulu@8)
42- id : setup-java-zulu-8
4335 if : matrix.java == 'zulu@8'
4436 uses : actions/setup-java@v3
4537 with :
4638 distribution : zulu
4739 java-version : 8
4840 cache : sbt
4941
50- - name : sbt update
51- if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
52- run : sbt +update
53-
5442 - name : Check that workflows are up to date
55- run : sbt githubWorkflowCheck
43+ run : sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
5644
5745 - name : Build project
5846 run : sbt '++ ${{ matrix.scala }}' test
5947
60- - name : Make target directories
61- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
62- run : mkdir -p target project/target
63-
6448 - name : Compress target directories
65- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
6649 run : tar cf targets.tar target project/target
6750
6851 - name : Upload target directories
69- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
7052 uses : actions/upload-artifact@v3
7153 with :
72- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
54+ name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
7355 path : targets.tar
7456
7557 publish :
7961 strategy :
8062 matrix :
8163 os : [ubuntu-latest]
64+ scala : [2.13.12]
8265 java : [zulu@8]
8366 runs-on : ${{ matrix.os }}
8467 steps :
@@ -88,44 +71,39 @@ jobs:
8871 fetch-depth : 0
8972
9073 - name : Setup Java (zulu@8)
91- id : setup-java-zulu-8
9274 if : matrix.java == 'zulu@8'
9375 uses : actions/setup-java@v3
9476 with :
9577 distribution : zulu
9678 java-version : 8
9779 cache : sbt
9880
99- - name : sbt update
100- if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
101- run : sbt +update
102-
103- - name : Download target directories (2.12)
81+ - name : Download target directories (2.12.18)
10482 uses : actions/download-artifact@v3
10583 with :
106- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
84+ name : target-${{ matrix.os }}-2.12.18- ${{ matrix.java }}
10785
108- - name : Inflate target directories (2.12)
86+ - name : Inflate target directories (2.12.18 )
10987 run : |
11088 tar xf targets.tar
11189 rm targets.tar
11290
113- - name : Download target directories (2.13)
91+ - name : Download target directories (2.13.12 )
11492 uses : actions/download-artifact@v3
11593 with :
116- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
94+ name : target-${{ matrix.os }}-2.13.12- ${{ matrix.java }}
11795
118- - name : Inflate target directories (2.13)
96+ - name : Inflate target directories (2.13.12 )
11997 run : |
12098 tar xf targets.tar
12199 rm targets.tar
122100
123- - name : Download target directories (3)
101+ - name : Download target directories (3.3.1 )
124102 uses : actions/download-artifact@v3
125103 with :
126- name : target-${{ matrix.os }}-${{ matrix.java }}-3
104+ name : target-${{ matrix.os }}-3.3.1- ${{ matrix.java }}
127105
128- - name : Inflate target directories (3)
106+ - name : Inflate target directories (3.3.1 )
129107 run : |
130108 tar xf targets.tar
131109 rm targets.tar
0 commit comments