Skip to content

Commit d3a74b5

Browse files
committed
Update Github workflow for Scala 3
1 parent d7beba0 commit d3a74b5

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,26 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-latest]
26-
scala: [2.12.18, 2.13.11]
27-
java: [temurin@11]
26+
scala: [3.3.3]
27+
java: [temurin@17]
2828
runs-on: ${{ matrix.os }}
2929
steps:
3030
- name: Checkout current branch (full)
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0
3434

35-
- name: Setup Java (temurin@11)
36-
if: matrix.java == 'temurin@11'
37-
uses: actions/setup-java@v3
35+
- name: Setup Java (temurin@17)
36+
if: matrix.java == 'temurin@17'
37+
uses: actions/setup-java@v4
3838
with:
3939
distribution: temurin
40-
java-version: 11
40+
java-version: 17
4141
cache: sbt
4242

43+
- name: Setup sbt
44+
uses: sbt/setup-sbt@v1
45+
4346
- name: Check that workflows are up to date
4447
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
4548

@@ -50,7 +53,7 @@ jobs:
5053
run: tar cf targets.tar target project/target
5154

5255
- name: Upload target directories
53-
uses: actions/upload-artifact@v3
56+
uses: actions/upload-artifact@v4
5457
with:
5558
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
5659
path: targets.tar
@@ -62,39 +65,32 @@ jobs:
6265
strategy:
6366
matrix:
6467
os: [ubuntu-latest]
65-
scala: [2.13.11]
66-
java: [temurin@11]
68+
scala: [3.3.3]
69+
java: [temurin@17]
6770
runs-on: ${{ matrix.os }}
6871
steps:
6972
- name: Checkout current branch (full)
70-
uses: actions/checkout@v3
73+
uses: actions/checkout@v4
7174
with:
7275
fetch-depth: 0
7376

74-
- name: Setup Java (temurin@11)
75-
if: matrix.java == 'temurin@11'
76-
uses: actions/setup-java@v3
77+
- name: Setup Java (temurin@17)
78+
if: matrix.java == 'temurin@17'
79+
uses: actions/setup-java@v4
7780
with:
7881
distribution: temurin
79-
java-version: 11
82+
java-version: 17
8083
cache: sbt
8184

82-
- name: Download target directories (2.12.18)
83-
uses: actions/download-artifact@v3
84-
with:
85-
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
86-
87-
- name: Inflate target directories (2.12.18)
88-
run: |
89-
tar xf targets.tar
90-
rm targets.tar
85+
- name: Setup sbt
86+
uses: sbt/setup-sbt@v1
9187

92-
- name: Download target directories (2.13.11)
93-
uses: actions/download-artifact@v3
88+
- name: Download target directories (3.3.3)
89+
uses: actions/download-artifact@v4
9490
with:
95-
name: target-${{ matrix.os }}-2.13.11-${{ matrix.java }}
91+
name: target-${{ matrix.os }}-3.3.3-${{ matrix.java }}
9692

97-
- name: Inflate target directories (2.13.11)
93+
- name: Inflate target directories (3.3.3)
9894
run: |
9995
tar xf targets.tar
10096
rm targets.tar

.github/workflows/clean.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20+
shell: bash {0}
2021
run: |
2122
# Customize those three lines with your repository and credentials:
2223
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -25,7 +26,7 @@ jobs:
2526
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2627
2728
# A temporary file which receives HTTP response headers.
28-
TMPFILE=/tmp/tmp.$$
29+
TMPFILE=$(mktemp)
2930
3031
# An associative array, key: artifact name, value: number of artifacts of that name.
3132
declare -A ARTCOUNT

0 commit comments

Comments
 (0)