Skip to content

Commit

Permalink
GitHub Actions: Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Nov 12, 2024
1 parent 7aeb35f commit 11081e8
Showing 1 changed file with 34 additions and 70 deletions.
104 changes: 34 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,26 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
scala: [3.3.4, 2.12.18, 2.13.11]
java: [temurin@17, temurin@21]
scala: ["3.3.4", "2.12.18", "2.13.11"]
java:
- { java-version: "17", java-distribution: "temurin" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
- name: Setup Java (${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }})
uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
distribution: ${{ matrix.java.java-distribution }}
java-version: ${{ matrix.java.java-version }}
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Check that workflows are up to date
run: sbt '++${{ matrix.scala }}!' 'project /' githubWorkflowCheck
# - name: Check that workflows are up to date
# run: sbt '++${{ matrix.scala }}!' 'project /' githubWorkflowCheck

- name: Test
run: sbt '++${{ matrix.scala }}!' test
Expand Down Expand Up @@ -86,7 +77,7 @@ jobs:
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/0.22')
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-${{ matrix.scala }}
path: targets.tar

publish:
Expand All @@ -97,36 +88,27 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.11]
java: [temurin@17]
java:
- { java-version: "17", java-distribution: "temurin" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
- name: Setup Java (${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }})
uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
distribution: ${{ matrix.java.java-distribution }}
java-version: ${{ matrix.java.java-version }}
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Download target directories (3.3.4)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.4
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-3.3.4

- name: Inflate target directories (3.3.4)
run: |
Expand All @@ -136,7 +118,7 @@ jobs:
- name: Download target directories (2.12.18)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-2.12.18

- name: Inflate target directories (2.12.18)
run: |
Expand All @@ -146,7 +128,7 @@ jobs:
- name: Download target directories (2.13.11)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-2.13.11

- name: Inflate target directories (2.13.11)
run: |
Expand All @@ -156,7 +138,7 @@ jobs:
- name: Download target directories (2.13.11)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-2.13.11

- name: Inflate target directories (2.13.11)
run: |
Expand All @@ -166,7 +148,7 @@ jobs:
- name: Download target directories (2.13.11)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11
name: target-${{ matrix.os }}-${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }}-2.13.11

- name: Inflate target directories (2.13.11)
run: |
Expand All @@ -192,30 +174,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.3.4, 2.12.18, 2.13.11]
java: [temurin@17]
scala: ["3.3.4", "2.12.18", "2.13.11"]
java:
- { java-version: "17", java-distribution: "temurin" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
- name: Setup Java (${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }})
uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
distribution: ${{ matrix.java.java-distribution }}
java-version: ${{ matrix.java.java-version }}
cache: 'sbt'
- uses: sbt/setup-sbt@v1

Expand All @@ -231,29 +204,20 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.11]
java: [temurin@17]
java:
- { java-version: "17", java-distribution: "temurin" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1

- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
- name: Setup Java (${{ matrix.java.java-distribution }}@${{ matrix.java.java-version }})
uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
distribution: ${{ matrix.java.java-distribution }}
java-version: ${{ matrix.java.java-version }}
cache: 'sbt'
- uses: sbt/setup-sbt@v1

Expand Down

0 comments on commit 11081e8

Please sign in to comment.