Skip to content

Commit

Permalink
Specify extra path for MacOS at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
lazamar committed Nov 29, 2024
1 parent 5a4fa47 commit 0bef2e1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,18 @@ jobs:
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-

- name: Build failing deps
# If we had an exact cache hit, the dependencies will be up to date.
if: steps.cache.outputs.cache-hit != 'true'
run: |
set -x
cabal build pcre-light --only-dependencies --verbose --extra-include-dirs=/opt/homebrew/include
cabal build mysql --only-dependencies --verbose --extra-include-dirs=/opt/homebrew/include
- name: Build - Install dependencies
# If we had an exact cache hit, the dependencies will be up to date.
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies --verbose
run: cabal build all --only-dependencies --verbose --extra-include-dirs=/opt/homebrew/include

# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
- name: Build - Save dependencies to cache
Expand All @@ -124,15 +132,11 @@ jobs:
run: cabal build all --extra-include-dirs=/opt/homebrew/include

- name: Test
run: |
set -x
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/hostedtoolcache/mysql/9.1.0/x64/lib"
echo $LD_LIBRARY_PATH
LD_DEBUG=libs cabal run --verbose emulator-tests -- +RTS -N
run: cabal run emulator-tests

# We run this only when a PR is merged so we can see how things are performing
# on the GH actions machines.
- name: Benchmark
if: github.ref == 'refs/heads/main'
run: cabal run emulator-tests -- +RTS -N
run: cabal run emulator-tests

0 comments on commit 0bef2e1

Please sign in to comment.