From ef5f3bfddc86cc336b4a76c8fd8e5dfdbce82ba8 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Tue, 7 Jan 2025 10:22:47 +0100 Subject: [PATCH] Enable multiple cores in haskell GHA --- .github/workflows/haskell.yml | 4 ++-- cabal.project | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 04fe391364..55d47df444 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -112,7 +112,7 @@ jobs: # this should be a no-op, but if the cache key was not found we need to build stuff so we can # cache it for the next step. - name: Install dependencies - run: cabal build all --enable-tests --only-dependencies -j --ghc-option=-j4 + run: cabal build all --enable-tests --only-dependencies # Always store the cabal cache. # This can fail (benign failure) if there is already a hash at that key. @@ -142,7 +142,7 @@ jobs: TMP: ${{ runner.temp }} KEEP_WORKSPACE: 1 CREATE_GOLDEN_FILES: 1 - run: cabal test all --enable-tests --test-show-details=direct -j1 + run: cabal test all --enable-tests --test-show-details=direct # We want this check to run first because $(git ls-files -m) (see below) returns both # modified files *and* deleted files. So we want to fail on deleted files first. diff --git a/cabal.project b/cabal.project index 24e6f087d3..78564acb13 100644 --- a/cabal.project +++ b/cabal.project @@ -48,9 +48,12 @@ package formatting flags: +no-double-conversion tests: True - test-show-details: direct +-- enable parallel builds +jobs: $ncpus +semaphore: True + -- Always write GHC env files, because they are needed for ghci. write-ghc-environment-files: always