From 90e4ac38d49a9bae2bda1990c5de911c51c8c72a Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 20 Sep 2022 17:56:53 +0000 Subject: Bump to Scala 2.13.9 and 2.12.17 (backport #2739) (#2740) * Bump to Scala 2.13.9 and 2.12.17 (#2739) (cherry picked from commit 647c8a458ebc89ae3df818d540d308f0c417ae9f) # Conflicts: # .github/workflows/test.yml * Resolve backport conflicts * Update mimaPreviousArtifacts Co-authored-by: Jack Koenig --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1fa715d..bd27edb9 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.9", "2.12.17"] espresso: ["2.4"] runs-on: ${{ matrix.system }} -- cgit v1.2.3 From c11eead29545799baf8c57e8c1b8b7351b98a258 Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 20 Sep 2022 23:16:23 +0000 Subject: Improve CI sentinel job for better branch protection (backport #2743) (#2746) * Improve CI sentinel job for better branch protection (#2743) Previously, failed jobs in the CI matrix would cause the sentinel job (all-tests-passed) to be skipped, which for purposes of Github Actions branch protection would count as "success". This allowed PRs with failing CI to be merged. This new approach which uses two sentinel jobs should not suffer from this same issue. (cherry picked from commit cc507a84cb1c319f83f8cbb935347d7265b73387) # Conflicts: # .github/workflows/test.yml * Resolve backport conflicts Co-authored-by: Jack Koenig --- .github/workflows/test.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd27edb9..9ace173e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,15 +82,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] + 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 -- cgit v1.2.3 From f19556801137091fa79a6d79395985474527b72d Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 27 Sep 2022 19:36:39 +0000 Subject: Use Treadle (on pull requests only) to speed up CI (backport #2341) (#2748) * Support using Treadle for 'sbt test' Treadle will be used as the "defaultBackend" when the environment variable CHISEL3_CI_USE_TREADLE is set. The intent is to set this variable during CI for pre-merge CI (aka on pull requests). (cherry picked from commit 7d39b7bd2b6f38dac90fe25064744ffc0ada0fe4) * Use Treadle for CI on pull requests (cherry picked from commit 82660673e56a816e68fcc068e3e04e127f076faf) Co-authored-by: Jack Koenig --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ace173e..139d5908 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,9 @@ jobs: - 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 -- cgit v1.2.3 From 9f1eae19445e110bb743176767f59970ce1d36b5 Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 27 Sep 2022 22:44:18 +0000 Subject: [ci] Split formatting and docs checks into separate task (backport #2749) (#2750) * [ci] Split formatting and docs checks into separate task (#2749) (cherry picked from commit ed2694293d61aa930341aef9f30c7762b889b5ae) # Conflicts: # .github/workflows/test.yml * Resolve backport conflicts Co-authored-by: Jack Koenig --- .github/workflows/test.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 139d5908..e48f37ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,12 +44,6 @@ 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 @@ -58,6 +52,23 @@ jobs: - 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 @@ -90,7 +101,7 @@ jobs: # When adding new jobs, please add them to `needs` below check-tests: name: "check tests" - needs: [ci, integration] + needs: [ci, integration, doc] runs-on: ubuntu-20.04 if: success() # only run if all tests have passed outputs: -- cgit v1.2.3 From 1e9f4e99167d1bc132a1a1a04e6987c2161c4d0e Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Thu, 13 Oct 2022 21:25:07 +0000 Subject: Bump to Scala 2.13.10 (backport #2774) (#2775) * Bump to Scala 2.13.10 (#2774) 2.13.9 has a binary compatibility regression so should be avoided. (cherry picked from commit c53265d6853728280b6bc01b001415166515c79a) # Conflicts: # .github/workflows/test.yml * Fix backport conflicts * Fix scalaVersion in README * Waive binary compatibility check for plugin for 2.13.10 3.5.4 is published for 2.13.10 so we cannot check binary compatibility for it. Co-authored-by: Jack Koenig --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e48f37ea..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.9", "2.12.17"] + scala: ["2.13.10", "2.12.17"] espresso: ["2.4"] runs-on: ${{ matrix.system }} -- cgit v1.2.3