chore: CI: avoid skipped dependencies hellhole
This commit is contained in:
parent
cf24f559b6
commit
f7651de424
1 changed files with 5 additions and 9 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
|
@ -17,15 +17,16 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
set-nightly:
|
||||
# don't schedule nightlies on forks
|
||||
if: github.event_name == 'schedule' && github.repository == 'leanprover/lean4'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
nightly: ${{ steps.set.outputs.nightly }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
# don't schedule nightlies on forks
|
||||
if: github.event_name == 'schedule' && github.repository == 'leanprover/lean4'
|
||||
- name: Set Nightly
|
||||
if: github.event_name == 'schedule' && github.repository == 'leanprover/lean4'
|
||||
id: set
|
||||
run: |
|
||||
if [[ -n '${{ secrets.PUSH_NIGHTLY_TOKEN }}' ]]; then
|
||||
|
|
@ -40,8 +41,7 @@ jobs:
|
|||
|
||||
build:
|
||||
needs: set-nightly
|
||||
# `failure` to continue even after a dependency was skipped
|
||||
if: (success() || failure()) && (github.event_name != 'schedule' || github.repository == 'leanprover/lean4')
|
||||
if: github.event_name != 'schedule' || github.repository == 'leanprover/lean4'
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -233,11 +233,7 @@ jobs:
|
|||
run: ccache -s
|
||||
|
||||
release:
|
||||
# When GitHub says "If a job fails, all jobs that need it are skipped unless
|
||||
# the jobs use a conditional expression that causes the job to continue.", don't believe
|
||||
# their lies. It's actually the entire closure (i.e. including `set-nightly`) that
|
||||
# must succeed for subsequent to be run without the conditional.
|
||||
if: (success() || failure()) && needs.build.result == 'success' && startsWith(github.ref, 'refs/tags/v')
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue