1717env :
1818 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1919
20+
21+ concurrency :
22+ group : ${{ github.workflow }} @ ${{ github.ref }}
23+ cancel-in-progress : true
24+
2025jobs :
2126 build :
2227 name : Build and Test
2328 strategy :
2429 matrix :
2530 os : [ubuntu-latest]
26- scala : [2.11.12 , 2.12.15 , 2.13.8 ]
31+ scala : [2.11, 2.12, 2.13]
2732 java : [zulu@8]
2833 runs-on : ${{ matrix.os }}
34+ timeout-minutes : 60
2935 steps :
3036 - name : Checkout current branch (full)
3137 uses : actions/checkout@v3
3238 with :
3339 fetch-depth : 0
3440
3541 - name : Setup Java (zulu@8)
42+ id : setup-java-zulu-8
3643 if : matrix.java == 'zulu@8'
3744 uses : actions/setup-java@v3
3845 with :
3946 distribution : zulu
4047 java-version : 8
48+ cache : sbt
4149
42- - name : Cache sbt
43- uses : actions/cache@v3
44- with :
45- path : |
46- ~/.sbt
47- ~/.ivy2/cache
48- ~/.coursier/cache/v1
49- ~/.cache/coursier/v1
50- ~/AppData/Local/Coursier/Cache/v1
51- ~/Library/Caches/Coursier/v1
52- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
50+ - name : sbt update
51+ if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
52+ run : sbt '++ ${{ matrix.scala }}' reload +update
5353
5454 - name : Check that workflows are up to date
5555 run : sbt githubWorkflowCheck
5656
5757 - name : Build project
58- run : sbt '++${{ matrix.scala }}' test
58+ run : sbt '++ ${{ matrix.scala }}' test
5959
6060 - name : Make target directories
6161 if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
7979 strategy :
8080 matrix :
8181 os : [ubuntu-latest]
82- scala : [2.13.8 ]
82+ scala : [2.13.10 ]
8383 java : [zulu@8]
8484 runs-on : ${{ matrix.os }}
8585 steps :
@@ -89,50 +89,44 @@ jobs:
8989 fetch-depth : 0
9090
9191 - name : Setup Java (zulu@8)
92+ id : setup-java-zulu-8
9293 if : matrix.java == 'zulu@8'
9394 uses : actions/setup-java@v3
9495 with :
9596 distribution : zulu
9697 java-version : 8
98+ cache : sbt
9799
98- - name : Cache sbt
99- uses : actions/cache@v3
100- with :
101- path : |
102- ~/.sbt
103- ~/.ivy2/cache
104- ~/.coursier/cache/v1
105- ~/.cache/coursier/v1
106- ~/AppData/Local/Coursier/Cache/v1
107- ~/Library/Caches/Coursier/v1
108- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
109-
110- - name : Download target directories (2.11.12)
100+ - name : sbt update
101+ if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
102+ run : sbt '++ ${{ matrix.scala }}' reload +update
103+
104+ - name : Download target directories (2.11)
111105 uses : actions/download-artifact@v3
112106 with :
113- name : target-${{ matrix.os }}-${{ matrix.java }}-2.11.12
107+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.11
114108
115- - name : Inflate target directories (2.11.12 )
109+ - name : Inflate target directories (2.11)
116110 run : |
117111 tar xf targets.tar
118112 rm targets.tar
119113
120- - name : Download target directories (2.12.15 )
114+ - name : Download target directories (2.12)
121115 uses : actions/download-artifact@v3
122116 with :
123- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.15
117+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
124118
125- - name : Inflate target directories (2.12.15 )
119+ - name : Inflate target directories (2.12)
126120 run : |
127121 tar xf targets.tar
128122 rm targets.tar
129123
130- - name : Download target directories (2.13.8 )
124+ - name : Download target directories (2.13)
131125 uses : actions/download-artifact@v3
132126 with :
133- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.8
127+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
134128
135- - name : Inflate target directories (2.13.8 )
129+ - name : Inflate target directories (2.13)
136130 run : |
137131 tar xf targets.tar
138132 rm targets.tar
@@ -143,4 +137,4 @@ jobs:
143137 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
144138 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
145139 PGP_SECRET : ${{ secrets.PGP_SECRET }}
146- run : sbt '++${{ matrix.scala }}' ci-release
140+ run : sbt '++ ${{ matrix.scala }}' ci-release
0 commit comments