2021-12-05 21:43:18 +00:00
|
|
|
name: "CI"
|
|
|
|
on:
|
|
|
|
# Run only when pushing to master branch, and making PRs
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-05-04 21:09:06 +00:00
|
|
|
- uses: cachix/install-nix-action@v17
|
2021-12-05 21:43:18 +00:00
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
experimental-features = nix-command flakes
|
2022-05-04 21:09:06 +00:00
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
2022-05-04 20:24:34 +00:00
|
|
|
- name: Cache Nix dependencies
|
|
|
|
run: |
|
|
|
|
nix develop -j 4 -c echo
|
2022-08-28 22:50:08 +00:00
|
|
|
- name: Flake checks
|
2022-05-04 20:24:34 +00:00
|
|
|
run: |
|
2022-08-28 22:50:08 +00:00
|
|
|
# Sandbox must be disabled due to HLS,
|
|
|
|
# https://github.com/haskell/haskell-language-server/issues/3128
|
|
|
|
nix --option sandbox false build .#check --no-link -L
|
|
|
|
# TODO: Remove after https://github.com/srid/haskell-flake/issues/19
|
2022-05-04 21:06:33 +00:00
|
|
|
- name: Hlint
|
|
|
|
run: |
|
|
|
|
nix develop -j auto -c hlint src
|
2021-12-05 21:43:18 +00:00
|
|
|
- name: Build
|
|
|
|
id: build
|
|
|
|
run: |
|
2022-08-28 22:50:08 +00:00
|
|
|
nix build -j auto -L
|