Foreign import declarations #611
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple CI for non-linux setups | |
name: Simple | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
native: | |
name: "Simple: GHC ${{ matrix.ghc }} with LLVM ${{ matrix.llvm }} on ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest] | |
ghc: ['9.4.8'] | |
llvm: ['14'] | |
# Build with newer LLVM on macOS only: less jobs, and windows misbehaves | |
include: | |
- os: macos-latest | |
ghc: '9.4.8' | |
llvm: '16' | |
- os: macos-latest | |
ghc: '9.4.8' | |
llvm: '18' | |
fail-fast: false | |
timeout-minutes: | |
60 | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Set up Haskell | |
id: setup-haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: '3.12.1.0' | |
- name: ghc-pkg dump | |
run: ghc-pkg list | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: ${{ matrix.llvm }} | |
directory: ${{ runner.temp }}/llvm | |
env: false | |
- name: Debug | |
shell: bash | |
run: echo "$LLVM_PATH" | |
- name: Debug2 | |
shell: bash | |
run: ls "$LLVM_PATH" | |
- name: Debug3 | |
shell: bash | |
run: ls "$LLVM_PATH/bin" | |
- name: LLVM_CONFIG | |
shell: bash | |
if: ${{ startsWith(matrix.os, 'macos') }} | |
run: echo "LLVM_CONFIG=$LLVM_PATH/bin/llvm-config" >> "$GITHUB_ENV" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: cabal.project | |
run: cp cabal.project.ci cabal.project | |
- name: Dry build (for cache key) | |
run: cabal build all --enable-tests --dry-run | |
- name: Restore cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
- name: Dependencies | |
run: cabal build all --enable-tests --only-dependencies | |
- name: Build | |
run: cabal build all --enable-tests | |
- name: Test | |
run: cabal test all --enable-tests --test-show-details=direct | |
- name: Save cache | |
uses: actions/cache/save@v4 | |
if: always() | |
with: | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} |