Skip to content

Update dependencies in cabal files and remove unused packages #222

Update dependencies in cabal files and remove unused packages

Update dependencies in cabal files and remove unused packages #222

Workflow file for this run

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@v1
- name: Get Stack snapshot install directory
id: stack-snapshot
run: |
stack path --snapshot-install-root
echo "::set-output name=dir::$(stack path --snapshot-install-root)"
- uses: actions/cache@v1
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
key: ${{ steps.stack-snapshot.outputs.dir }}-${{ 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]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- 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
stack --nix path --snapshot-install-root
echo "::set-output name=dir::$(stack --nix path --snapshot-install-root)"
- uses: actions/cache@v2
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
key: ${{ steps.stack-snapshot.outputs.dir }}-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ steps.stack-snapshot.outputs.dir }}
- 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