matrix-media-expanded/.github/workflows/ci.yaml
2023-03-25 10:53:44 -04:00

38 lines
1.1 KiB
YAML

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
- uses: nixbuild/nix-quick-install-action@v22
with:
nix_conf: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Cache Nix dependencies
run: |
nix develop -j 4 -c echo
- name: Build 🔨
id: build
run: |
nix build -j auto -L
- name: Flake checks 🧪
run: |
# Because 'nix flake check' is not system-aware
# See https://srid.ca/haskell-template/checks
nix run nixpkgs#sd \
'systems = nixpkgs.lib.systems.flakeExposed' \
'systems = [ "x86_64-linux" ]' \
flake.nix
# Sandbox must be disabed for:
# https://github.com/srid/haskell-flake/issues/21
nix \
--option sandbox false \
flake check -L