mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-18 20:36:08 +00:00
100 lines
2.9 KiB
YAML
100 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- 'demo/**'
|
|
- 'docker/**'
|
|
- 'Dockerfile'
|
|
- '.dockerignore'
|
|
- '.ghci'
|
|
- '.gitignore'
|
|
- 'images/**'
|
|
- 'notebooks/**'
|
|
- 'README.md'
|
|
- '*.nix'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'demo/**'
|
|
- 'docker/**'
|
|
- 'Dockerfile'
|
|
- '.dockerignore'
|
|
- '.ghci'
|
|
- '.gitignore'
|
|
- 'images/**'
|
|
- 'notebooks/**'
|
|
- 'README.md'
|
|
- '*.nix'
|
|
|
|
jobs:
|
|
linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: ${{ matrix.versions.flaky }}
|
|
strategy:
|
|
matrix:
|
|
versions:
|
|
- stack-yaml: 'stack-8.0.yaml'
|
|
flaky: true
|
|
- stack-yaml: 'stack-8.2.yaml'
|
|
flaky: false
|
|
- stack-yaml: 'stack-8.4.yaml'
|
|
flaky: false
|
|
- stack-yaml: 'stack.yaml'
|
|
flaky: false
|
|
- stack-yaml: 'stack-8.8.yaml'
|
|
flaky: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache .stack
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.stack
|
|
key: ${{ runner.os }}-${{ matrix.versions.stack-yaml }}-stack-global
|
|
- name: Update system dependencies
|
|
run: |
|
|
sudo apt update
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt install libmagic-dev libgmp-dev libblas-dev liblapack-dev libcairo2-dev libpango1.0-dev libzmq3-dev
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.8'
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
pip install -r requirements.txt
|
|
- name: Install Stack
|
|
run: |
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
mkdir -p ~/.local/bin
|
|
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
|
- name: Build dependencies
|
|
run: |
|
|
# Used to avoid 'source and destination file are the same' error
|
|
mv ${{ matrix.versions.stack-yaml }} intermediate-stack.yaml
|
|
mv intermediate-stack.yaml stack.yaml
|
|
|
|
echo "apply-ghc-options: everything" >> stack.yaml
|
|
|
|
stack setup
|
|
stack install gtk2hs-buildtools
|
|
stack build hmatrix
|
|
stack build --dependencies-only
|
|
- name: Run tests
|
|
run: |
|
|
set -e
|
|
stack build ipython-kernel --flag ipython-kernel:examples
|
|
stack test --no-terminal
|
|
stack build --no-terminal
|
|
|
|
# Ensure that IHaskell notebook remains unchanged.
|
|
# Run the notebook to regenerate the outputs, then compare the new notebook to the old one.
|
|
stack install
|
|
stack exec -- ihaskell install --stack
|
|
test/acceptance.nbconvert.sh stack exec -- jupyter nbconvert
|