Skip to content

aeson lower bound (#991) #1

aeson lower bound (#991)

aeson lower bound (#991) #1

Workflow file for this run

name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
STACK_VERSION: '2.11.1'
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.image }}
strategy:
matrix:
include:
- os: ubuntu-latest
image: haskell:9.2.8
- os: macOS-latest
- os: windows-latest
steps:
# We need a proper Git repository, but the checkout step will unpack a tarball instead of doing a clone
# if the Git version is less than 2.18.
- name: Install a newer version of Git (Linux)
if: runner.os == 'Linux'
run: |
. /etc/os-release
echo deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main >> /etc/apt/sources.list
apt-get update && apt-get install -y git/"$VERSION_CODENAME"-backports
# We set LF endings so that the Windows environment is consistent with Appveyor
# See here for context: https://github.com/actions/checkout/issues/135
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.longpaths true
- uses: actions/checkout@v2
- name: Setup Haskell (macOS and Windows)
if: runner.os != 'Linux'
uses: haskell/actions/setup@v1
with:
enable-stack: true
stack-version: "${{ env.STACK_VERSION }}"
stack-no-global: true
- name: Check Stack version and fix root access (Linux)
if: runner.os == 'Linux'
run: |
[ "$(stack --numeric-version)" = "$STACK_VERSION" ]
chown root:root .
echo '{"allow_root":true}' > /root/.bowerrc
- name: Setup node and npm
uses: actions/setup-node@v2
with:
node-version: 18
# NB: We install gnu-tar because BSD tar is buggy on Github's macos machines,
# and it breaks the cache: https://github.com/actions/cache/issues/403
- name: Install GNU tar (macOS)
if: runner.os == 'macOS'
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: create ~/.local/bin
run: mkdir -p "$HOME/.local/bin"
- name: Add ~/.local/bin to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
# Caching
#
# `haskell/actions/setup` will overwrite the STACK_ROOT variable
# to "C:\sr" on Windows and `$HOME/.stack` on non-Windows OS.
# So, we use OS-specific caching rules to workaround this difference
# between OSes.
# For Windows, we also cache the folder that stores the GHC we use
# as well as other programs it uses.
- name: Cache ~/.stack on non-Windows OS
uses: actions/cache@v2
if: runner.os != 'Windows'
with:
path: |
/root/.stack
~/.stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-2
- name: Cache C:\sr on Windows OS
uses: actions/cache@v2
if: runner.os == 'Windows'
with:
# Cache both STACK_ROOT and the folder containing
# Stack-related files
path: |
C:\sr
$HOME\AppData\Local\Programs\stack\x86_64-windows
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-1
- run: npm install -g [email protected] [email protected] [email protected] [email protected]
- name: Install dependencies
run: |
./scripts/fix-home stack install --dependencies-only
shell: bash
- name: Build
run: |
./scripts/fix-home make
./scripts/fix-home stack build --pedantic
shell: bash
- name: Install
run: ./scripts/fix-home stack install
shell: bash
- name: Run tests (PureScript >= 0.15.0)
run: ./scripts/fix-home stack test
shell: bash
- name: Install PureScript 0.14.9
run: npm install -g [email protected]
- name: Run tests (PureScript < 0.15.0)
shell: bash
run: ./scripts/fix-home stack test --ta "--match purs-0.14"