Skip to content

Commit

Permalink
CI: Enable GHC 8.10.7 and 9.0.2 on macos-14 by installing LLVM
Browse files Browse the repository at this point in the history
  • Loading branch information
minoki committed Oct 10, 2024
1 parent c52769b commit 8566b63
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ jobs:
- os: macos-14
flags: '--flags "fma3 f16c"' # Makes no sense on Arm64
# macos-14 (Arm64) doesn't support older GHC
# 8.10.7 and 9.0.2 are excluded because haskell-actions/setup doesn't install LLVM
- os: macos-14
ghc: '8.6.5'
- os: macos-14
ghc: '8.8.4'
- os: macos-14
ghc: '8.10.7'
- os: macos-14
ghc: '9.0.2'
steps:
- uses: actions/checkout@v4

- name: Install LLVM
run: |
brew install llvm@12
echo "OPT=$(brew --prefix llvm@12)/bin/opt" >> "${GITHUB_ENV}"
echo "LLC=$(brew --prefix llvm@12)/bin/llc" >> "${GITHUB_ENV}"
if: ${{ matrix.os == 'macos-14' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.0.2') }}

- name: Workaround for a problem with GHC 9.0.2 on Arm Mac
run: echo "C_INCLUDE_PATH=`xcrun --show-sdk-path`/usr/include/ffi" >> "${GITHUB_ENV}"
if: ${{ matrix.os == 'macos-14' && matrix.ghc == '9.0.2' }}

- uses: haskell-actions/setup@v2
name: Setup Haskell
with:
Expand Down Expand Up @@ -83,21 +89,27 @@ jobs:
- ghc: '9.10'
flags: '--flags x87-long-double'
# macos-14 (Arm64) doesn't support older GHC
# 8.10.7 and 9.0.2 are excluded because haskell-actions/setup doesn't install LLVM
- os: macos-14
ghc: '8.6.5'
- os: macos-14
ghc: '8.8.4'
- os: macos-14
ghc: '8.10.7'
- os: macos-14
ghc: '9.0.2'
# macos-14 (Arm64) doesn't support x87-long-double
- os: macos-14
flags: '--flags x87-long-double'
steps:
- uses: actions/checkout@v4

- name: Install LLVM
run: |
brew install llvm@12
echo "OPT=$(brew --prefix llvm@12)/bin/opt" >> "${GITHUB_ENV}"
echo "LLC=$(brew --prefix llvm@12)/bin/llc" >> "${GITHUB_ENV}"
if: ${{ matrix.os == 'macos-14' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.0.2') }}

- name: Workaround for a problem with GHC 9.0.2 on Arm Mac
run: echo "C_INCLUDE_PATH=`xcrun --show-sdk-path`/usr/include/ffi" >> "${GITHUB_ENV}"
if: ${{ matrix.os == 'macos-14' && matrix.ghc == '9.0.2' }}

- uses: haskell-actions/setup@v2
name: Setup Haskell
with:
Expand Down

0 comments on commit 8566b63

Please sign in to comment.