Skip to content

Commit

Permalink
Merge pull request #462 from IntersectMBO/erikd/gha
Browse files Browse the repository at this point in the history
Improve Github Action CI job
  • Loading branch information
angerman authored Feb 26, 2024
2 parents fc1d6be + c038feb commit 854ca31
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,20 @@ jobs:
echo "# cabal.project.local"
cat cabal.project.local
- name: Build dry run
run: cabal build all --enable-tests --dry-run --minimize-conflict-set

- name: Record dependencies
id: record-deps
run: |
# The tests call out to msys2 commands. We generally do not want to mix toolchains, so
# we are very deliberate about only adding msys64 to the path where absolutely necessary.
${{ (runner.os == 'Windows' && '$env:PATH=("C:\msys64\mingw64\bin;{0}" -f $env:PATH)') || '' }}
cabal build all --dry-run
cat dist-newstyle/cache/plan.json | jq -r '."install-plan"[].id' | sort | uniq > dependencies.txt
- name: Install dependencies
run: cabal build all --enable-tests --only-dependencies -j --ghc-option=-j4

- name: Cache Cabal store
uses: actions/cache@v3
with:
Expand All @@ -83,9 +88,6 @@ jobs:
dist-newstyle
key: cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}

- name: Install dependencies
run: cabal build all --enable-tests --only-dependencies -j --ghc-option=-j4

- name: Build [testing]
run: cabal build all --enable-tests -j --ghc-option=-j4

Expand All @@ -99,7 +101,8 @@ jobs:
- name: Build strict-checked-vars with invariants
run: cabal build -f+checktvarinvariants -f+checkmvarinvariants strict-checked-vars

- uses: actions/upload-artifact@v3
- name: Save Artifact
uses: actions/upload-artifact@v3
with:
name: Build & test logs
path: |
Expand Down

0 comments on commit 854ca31

Please sign in to comment.