Bumps for GHC 9.8, fix building with unix-2.8, update CI #165
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
name: Continuous integration | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
name: Build - Windows | |
runs-on: windows-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
choco install -y haskell-stack | |
choco install -y r --version 4.0.0 | |
- uses: actions/checkout@v4 | |
- name: Get Stack snapshot install directory | |
id: stack-snapshot | |
run: | | |
dir="$(stack path --snapshot-install-root)" | |
echo "${dir}" | |
echo "dir=${dir}" > "${GITHUB_OUTPUT}" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.stack-snapshot.outputs.dir }} | |
key: ${{ runner.os }}-stack--${{ hashFiles('**/*.cabal') }} | |
restore-keys: ${{ runner.os }}-stack- | |
- name: Build | |
run: | | |
stack build inline-r H ` | |
--extra-lib-dirs="C:/Program files/R/R-4.0.0/bin/x64" ` | |
--extra-include-dirs="C:/Program files/R/R-4.0.0/include" | |
test: | |
name: Build & Test - ${{ matrix.os }} - ${{ matrix.stack_yaml }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
stack_yaml: [stack.yaml, stack-lts-18.yaml, stack-lts-19.yaml, stack-lts-20.yaml, stack-lts-21.yaml] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
nix_path: nixpkgs=./nixpkgs.nix | |
- name: Install Stack | |
run: | | |
nix-env -f. -iA nixpkgs.stack | |
- name: Get Stack snapshot install directory | |
id: stack-snapshot | |
run: | | |
# XXX Workaround | |
# https://github.com/commercialhaskell/stack/issues/5028. | |
[ "${{ matrix.stack_yaml }}" == "stack.yaml" ] || mv "${{ matrix.stack_yaml }}" stack.yaml | |
dir="$(stack --nix path --snapshot-install-root)" | |
echo "${dir}" | |
echo "dir=${dir}" > "${GITHUB_OUTPUT}" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.stack-snapshot.outputs.dir }} | |
key: ${{ runner.os }}-stack--${{ hashFiles('**/*.cabal') }} | |
restore-keys: ${{ runner.os }}-stack- | |
- name: Build | |
run: | | |
stack --nix build | |
- name: Test | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
stack --nix test | |
- name: Test IHaskell jupyter notebook example | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
stack --nix install | |
export PATH=~/.local/bin:$PATH | |
stack --nix exec -- ihaskell install | |
stack --nix exec -- jupyter nbconvert --to notebook --execute --inplace ./IHaskell/examples/tutorial-ihaskell-inline-r.ipynb |