Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Github Action CI job #462

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading