Skip to content

Commit

Permalink
Merge pull request #5464 from input-output-hk/mgalazyn/fix/fail-ci-wh…
Browse files Browse the repository at this point in the history
…en-build-fails

Fix CI gating when required build steps fail
  • Loading branch information
carbolymer authored Sep 11, 2023
2 parents 4139153 + 80f6e6d commit 396739c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Haskell Windows & Mac CI
name: Haskell CI

on:
pull_request: # Required for workflows to be able to be approved from forks
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-09-05"
CABAL_CACHE_VERSION: "2023-09-11"

# Modify this value to "invalidate" the secp cache.
SECP_CACHE_VERSION: "2022-12-30"
Expand Down Expand Up @@ -219,10 +219,18 @@ jobs:

build-complete:
needs: [build]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Build complete
run: echo 'Build complete'
- name: Check if any previous job failed
run: |
if [[ "${{ needs.build.result }}" == "failure" ]]; then
# this ignores skipped dependencies
echo 'Required jobs failed to build.'
exit 1
else
echo 'Build complete'
fi
release:
needs: [build]
Expand Down

0 comments on commit 396739c

Please sign in to comment.