diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b11291960d..6c8d484d170 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,50 +29,41 @@ 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/setup-java@v4.4.0 - 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/setup-java@v4.4.0 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 + run: sbt '++${{ matrix.scala }}' test - name: Check binary compatibility if: matrix.java == 'temurin@17' - run: sbt '++${{ matrix.scala }}!' mimaReportBinaryIssues + run: sbt '++${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation if: matrix.java == 'temurin@17' - run: sbt '++${{ matrix.scala }}!' doc + run: sbt '++${{ matrix.scala }}' doc - name: Check Scalafix rules if: matrix.scala != '3.3.4' - run: sbt '++${{ matrix.scala }}!' 'scalafixAll --check' + run: sbt '++${{ matrix.scala }}' 'scalafixAll --check' - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/0.22') @@ -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: @@ -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/setup-java@v4.4.0 - 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/setup-java@v4.4.0 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: | @@ -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: | @@ -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: | @@ -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: | @@ -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: | @@ -185,37 +167,28 @@ jobs: (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) - name: Publish - run: sbt '++${{ matrix.scala }}!' tlRelease + run: sbt '++${{ matrix.scala }}' tlRelease scalafix: name: Scalafix 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/setup-java@v4.4.0 - 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/setup-java@v4.4.0 with: - distribution: temurin - java-version: 21 + distribution: ${{ matrix.java.java-distribution }} + java-version: ${{ matrix.java.java-version }} cache: 'sbt' - uses: sbt/setup-sbt@v1 @@ -231,34 +204,25 @@ 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/setup-java@v4.4.0 - 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/setup-java@v4.4.0 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: Generate site - run: sbt '++${{ matrix.scala }}!' site/tlSite + run: sbt '++${{ matrix.scala }}' site/tlSite - name: Publish site if: github.event_name != 'pull_request' && github.ref == 'refs/heads/series/0.22'