Skip to content

Merge pull request #128 from nh2/ghcide-foreign-call-stubs #19

Merge pull request #128 from nh2/ghcide-foreign-call-stubs

Merge pull request #128 from nh2/ghcide-foreign-call-stubs #19

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: ${{ matrix.os }}-stack-${{ matrix.stackage }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
stackage: ['nightly', 'lts-21', 'lts-20']
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install packages
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ] ; then
sudo apt-get update -qq && sudo apt-get install -y gobjc++ libgnustep-base-dev libgsl-dev
else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gsl || true
fi
- uses: actions/cache@v3
with:
path: ~/.stack
key: stack-${{ matrix.os }}-${{ matrix.stackage }}-${{ hashFiles('stack.yaml') }}
- name: Build
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ] ; then
stack build --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c:gsl-example --flag inline-c-cpp:std-vector-example
else
stack build --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c-cpp:std-vector-example
fi
- name: Test
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ] ; then
stack test --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c:gsl-example --flag inline-c-cpp:std-vector-example
./inline-c-cpp/test-error-message-line-numbers.sh --stack-yaml stack-${{ matrix.stackage }}.yaml
else
stack test --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c-cpp:std-vector-example
./inline-c-cpp/test-error-message-line-numbers.sh --stack-yaml stack-${{ matrix.stackage }}.yaml
fi