1- name : Continuous Integration (v3 - master)
1+ # This file was automatically generated by sbt-github-actions using the
2+ # githubWorkflowGenerate task. You should add and commit this file to
3+ # your git repository. It goes without saying that you shouldn't edit
4+ # this file by hand! Instead, if you wish to make changes, you should
5+ # change your sbt build configuration to revise the workflow description
6+ # to meet your needs, then regenerate this file.
7+
8+ name : Continuous Integration
29
310on :
411 pull_request :
5- branches : [' master' ]
12+ branches : [master]
613 push :
7- branches : [' master' ]
14+ branches : [master]
815
916env :
1017 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -40,16 +47,30 @@ jobs:
4047 java-version : 21
4148 cache : sbt
4249
43- - run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' test
50+ - name : Check that workflows are up to date
51+ run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' githubWorkflowCheck
52+
53+ - name : Build project
54+ run : sbt -J-Xmx2G '++ ${{ matrix.scala }}' test
55+
56+ - name : Compress target directories
57+ run : tar cf targets.tar target project/target
58+
59+ - name : Upload target directories
60+ uses : actions/upload-artifact@v4
61+ with :
62+ name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
63+ path : targets.tar
4464
4565 publish :
4666 name : Publish Artifacts
4767 needs : [build]
48- if : github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
68+ if : github.event_name != 'pull_request' && ( github.ref == 'refs/heads/master')
4969 strategy :
5070 matrix :
5171 os : [ubuntu-latest]
5272 scala : [2.13.15]
73+ java : [zulu@17]
5374 runs-on : ${{ matrix.os }}
5475 steps :
5576 - name : Checkout current branch (full)
@@ -58,16 +79,65 @@ jobs:
5879 fetch-depth : 0
5980
6081 - name : Setup Java (zulu@17)
82+ if : matrix.java == 'zulu@17'
6183 uses : actions/setup-java@v4
6284 with :
6385 distribution : zulu
6486 java-version : 17
6587 cache : sbt
6688
89+ - name : Setup Java (zulu@21)
90+ if : matrix.java == 'zulu@21'
91+ uses : actions/setup-java@v4
92+ with :
93+ distribution : zulu
94+ java-version : 21
95+ cache : sbt
96+
97+ - name : Download target directories (2.11.12)
98+ uses : actions/download-artifact@v4
99+ with :
100+ name : target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
101+
102+ - name : Inflate target directories (2.11.12)
103+ run : |
104+ tar xf targets.tar
105+ rm targets.tar
106+
107+ - name : Download target directories (2.12.20)
108+ uses : actions/download-artifact@v4
109+ with :
110+ name : target-${{ matrix.os }}-2.12.20-${{ matrix.java }}
111+
112+ - name : Inflate target directories (2.12.20)
113+ run : |
114+ tar xf targets.tar
115+ rm targets.tar
116+
117+ - name : Download target directories (2.13.15)
118+ uses : actions/download-artifact@v4
119+ with :
120+ name : target-${{ matrix.os }}-2.13.15-${{ matrix.java }}
121+
122+ - name : Inflate target directories (2.13.15)
123+ run : |
124+ tar xf targets.tar
125+ rm targets.tar
126+
127+ - name : Download target directories (3.3.4)
128+ uses : actions/download-artifact@v4
129+ with :
130+ name : target-${{ matrix.os }}-3.3.4-${{ matrix.java }}
131+
132+ - name : Inflate target directories (3.3.4)
133+ run : |
134+ tar xf targets.tar
135+ rm targets.tar
136+
67137 - env :
68138 CI_SNAPSHOT_RELEASE : +publishSigned
69139 PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
70140 SONATYPE_PASSWORD : ${{ secrets.CI_DEPLOY_PASSWORD3 }}
71141 SONATYPE_USERNAME : ${{ secrets.CI_DEPLOY_USERNAME3 }}
72142 PGP_SECRET : ${{ secrets.PGP_SECRET }}
73- run : sbt -J-Xmx2G ci-release
143+ run : sbt -J-Xmx2G ci-release
0 commit comments