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.17 , 2.13.10 , 3.2.1 ]
31+ scala : [2.11, 2.12, 2.13, 3]
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 : Scala 2.13 build
5858 if : startsWith(matrix.scala, '2.13')
59- run : sbt '++${{ matrix.scala }}' coverage test coverageReport
59+ run : sbt '++ ${{ matrix.scala }}' coverage test coverageReport
6060
6161 - name : Scala build
6262 if : ' !startsWith(matrix.scala, '' 2.13'' )'
63- run : sbt '++${{ matrix.scala }}' test
63+ run : sbt '++ ${{ matrix.scala }}' test
6464
6565 - name : Make target directories
6666 if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/1.5' || startsWith(github.ref, 'refs/tags/v'))
@@ -94,60 +94,54 @@ jobs:
9494 fetch-depth : 0
9595
9696 - name : Setup Java (zulu@8)
97+ id : setup-java-zulu-8
9798 if : matrix.java == 'zulu@8'
9899 uses : actions/setup-java@v3
99100 with :
100101 distribution : zulu
101102 java-version : 8
103+ cache : sbt
102104
103- - name : Cache sbt
104- uses : actions/cache@v3
105- with :
106- path : |
107- ~/.sbt
108- ~/.ivy2/cache
109- ~/.coursier/cache/v1
110- ~/.cache/coursier/v1
111- ~/AppData/Local/Coursier/Cache/v1
112- ~/Library/Caches/Coursier/v1
113- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
114-
115- - name : Download target directories (2.11.12)
105+ - name : sbt update
106+ if : matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
107+ run : sbt '++ ${{ matrix.scala }}' reload +update
108+
109+ - name : Download target directories (2.11)
116110 uses : actions/download-artifact@v3
117111 with :
118- name : target-${{ matrix.os }}-${{ matrix.java }}-2.11.12
112+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.11
119113
120- - name : Inflate target directories (2.11.12 )
114+ - name : Inflate target directories (2.11)
121115 run : |
122116 tar xf targets.tar
123117 rm targets.tar
124118
125- - name : Download target directories (2.12.17 )
119+ - name : Download target directories (2.12)
126120 uses : actions/download-artifact@v3
127121 with :
128- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17
122+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
129123
130- - name : Inflate target directories (2.12.17 )
124+ - name : Inflate target directories (2.12)
131125 run : |
132126 tar xf targets.tar
133127 rm targets.tar
134128
135- - name : Download target directories (2.13.10 )
129+ - name : Download target directories (2.13)
136130 uses : actions/download-artifact@v3
137131 with :
138- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10
132+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
139133
140- - name : Inflate target directories (2.13.10 )
134+ - name : Inflate target directories (2.13)
141135 run : |
142136 tar xf targets.tar
143137 rm targets.tar
144138
145- - name : Download target directories (3.2.1 )
139+ - name : Download target directories (3)
146140 uses : actions/download-artifact@v3
147141 with :
148- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.1
142+ name : target-${{ matrix.os }}-${{ matrix.java }}-3
149143
150- - name : Inflate target directories (3.2.1 )
144+ - name : Inflate target directories (3)
151145 run : |
152146 tar xf targets.tar
153147 rm targets.tar
@@ -158,4 +152,4 @@ jobs:
158152 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
159153 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
160154 PGP_SECRET : ${{ secrets.PGP_SECRET }}
161- run : sbt '++${{ matrix.scala }}' ci-release
155+ run : sbt '++ ${{ matrix.scala }}' ci-release
0 commit comments