diff options
| author | Jack | 2022-11-11 06:53:04 +0000 |
|---|---|---|
| committer | Jack | 2022-11-11 06:53:04 +0000 |
| commit | 3ce953c81f06519351c48277e3474b5720ec07ff (patch) | |
| tree | ac79dcb80d0528c2ae86ca21da4cf424715ab645 /.github/workflows | |
| parent | adccde9998c91875e5490cff6d5822ffacc593ed (diff) | |
| parent | c8046636a25474be4c547c6fe9c6d742ea7b1d13 (diff) | |
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/test.yml | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1fa715d..69426662 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: matrix: system: ["ubuntu-20.04"] jvm: ["adopt@1.8"] - scala: ["2.13.6", "2.12.16"] + scala: ["2.13.10", "2.12.17"] espresso: ["2.4"] runs-on: ${{ matrix.system }} @@ -44,17 +44,31 @@ jobs: java-version: ${{ matrix.jvm }} - name: Cache Scala uses: coursier/cache-action@v5 - - name: Check Formatting (Scala 2.12 only) - if: startsWith(matrix.scala, '2.12') - run: sbt ++${{ matrix.scala }} scalafmtCheckAll - - name: Documentation (Scala 2.12 only) - if: startsWith(matrix.scala, '2.12') - run: sbt ++${{ matrix.scala }} docs/mdoc unidoc + - name: Use Treadle for Pull Requests + if: github.event_name == 'pull_request' + run: echo "CHISEL3_CI_USE_TREADLE=1" >> $GITHUB_ENV - name: Test run: sbt ++${{ matrix.scala }} test - name: Binary compatibility run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues + doc: + name: Formatting and Documentation + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: "adopt@1.11" + - name: Cache Scala + uses: coursier/cache-action@v5 + - name: Check Formatting + run: sbt scalafmtCheckAll + - name: Documentation + run: sbt docs/mdoc unidoc + integration: name: Integration Tests (w/ chiseltest) runs-on: ubuntu-20.04 @@ -82,15 +96,42 @@ jobs: run: sbt integrationTests/test # Sentinel job to simplify how we specify which checks need to pass in branch - # protection and in Mergify + # protection and in Mergify. This job checks that all jobs were successful. # # When adding new jobs, please add them to `needs` below + check-tests: + name: "check tests" + needs: [ci, integration, doc] + runs-on: ubuntu-20.04 + if: success() # only run if all tests have passed + outputs: + success: ${{ steps.setoutput.outputs.success }} + steps: + - id: setoutput + run: echo "::set-output name=success::true" + + # Related to check-tests above, this job _always_ runs (even if tests fail + # and thus check-steps is skipped). This two sentinel job approach avoids an + # issue where failing tests causes a single sentinel job to be skipped which + # counts as passing for purposes of branch protection. + # + # See: https://brunoscheufler.com/blog/2022-04-09-the-required-github-status-check-that-wasnt all_tests_passed: name: "all tests passed" - needs: [ci, integration] runs-on: ubuntu-20.04 + if: always() # Always run so that we never skip this check + needs: check-tests + # Pass only if check-tests set its output value steps: - - run: echo Success! + - run: | + PASSED="${{ needs.check-tests.outputs.success }}" + if [[ $PASSED == "true" ]]; then + echo "All tests passed!" + exit 0 + else + echo "One or more tests FAILED!" + exit 1 + fi # sbt ci-release publishes all cross versions so this job needs to be # separate from a Scala versions build matrix to avoid duplicate publishing |
