diff options
| -rw-r--r-- | .github/workflows/test.yml | 5 | ||||
| -rwxr-xr-x | .run_formal_checks.sh | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d04f7e05..b89de3bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,11 @@ jobs: - name: Cache Scala uses: coursier/cache-action@v5 - name: Run Formal Equivalence + # This is here instead of on the whole job because if a job is skipped, so are dependent jobs + # If this job were skipped, all_tests_passed would be skipped to + # By having this "if" here, this job returns success so that all_tests_passed will succeed too + if: github.event_name == 'pull_request' && + ! contains(github.event.pull_request.labels.*.name, 'Skip Formal CI') run: ./.run_formal_checks.sh ${{ matrix.design }} # Sentinel job to simplify how we specify which checks need to pass in branch diff --git a/.run_formal_checks.sh b/.run_formal_checks.sh index 0a28a1d1..3451c688 100755 --- a/.run_formal_checks.sh +++ b/.run_formal_checks.sh @@ -21,14 +21,8 @@ if [ ! -z "$GITHUB_BASE_REF" ]; then git remote set-branches origin $GITHUB_BASE_REF && git fetch git checkout $GITHUB_BASE_REF git checkout - - # Skip if '[skip formal checks]' shows up in any of the commit messages in the PR - if git log --format=%B --no-merges $GITHUB_BASE_REF..HEAD | grep '\[skip formal checks\]'; then - echo "Commit message says to skip formal checks" - exit 0 - else - cp regress/$DUT.fir $DUT.fir - ./scripts/formal_equiv.sh HEAD $GITHUB_BASE_REF $DUT - fi + cp regress/$DUT.fir $DUT.fir + ./scripts/formal_equiv.sh HEAD $GITHUB_BASE_REF $DUT else echo "Not a pull request, no formal check" exit 0 |
