mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
CI: Fix imprecise 'onMaster' checks
This commit is contained in:
@@ -36,7 +36,8 @@ jobs:
|
||||
- name: Set up Python venv
|
||||
uses: ./repo/.github/actions/setup-venv
|
||||
with:
|
||||
save: ${{ github.ref == 'refs/heads/master' }}
|
||||
# Check the event too: 'github.ref' is the base branch on a closed pull request
|
||||
save: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: Lint
|
||||
run: |-
|
||||
|
||||
@@ -92,7 +92,8 @@ jobs:
|
||||
- name: Set up Python venv
|
||||
uses: ./repo/.github/actions/setup-venv
|
||||
with:
|
||||
save: ${{ github.ref == 'refs/heads/master' }}
|
||||
# Check the event too: 'github.ref' is the base branch on a closed pull request
|
||||
save: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
|
||||
|
||||
- name: Test
|
||||
id: run-test
|
||||
@@ -125,7 +126,7 @@ jobs:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ steps.ccache.outputs.key }}
|
||||
# Keep master's cache around longer; PR/branch caches churn faster
|
||||
retention-days: ${{ github.ref == 'refs/heads/master' && 7 || 3 }}
|
||||
retention-days: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && 7 || 3 }}
|
||||
|
||||
- name: Fail job if a test failed
|
||||
if: ${{ steps.run-test.outcome == 'failure' && !cancelled() }}
|
||||
|
||||
Reference in New Issue
Block a user