Skip to content

Commit

Permalink
Improve Github Actions
Browse files Browse the repository at this point in the history
Mainly take fixes and changes from other packages to normalize GHAs
across repos.
  • Loading branch information
erikd committed Feb 25, 2024
1 parent fc1d6be commit c038feb
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 c038feb

Please sign in to comment.