matrix-media-expanded/.github/workflows/ci.yaml

39 lines
1.1 KiB
YAML
Raw Normal View History

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
2023-03-25 14:53:44 +00:00
- uses: nixbuild/nix-quick-install-action@v22
2021-12-05 21:43:18 +00:00
with:
2023-03-25 14:53:44 +00:00
nix_conf: |
2021-12-05 21:43:18 +00:00
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-09-30 18:36:32 +00:00
- name: Build 🔨
id: build
run: |
nix build -j auto -L
- name: Flake checks 🧪
2022-05-04 20:24:34 +00:00
run: |
2022-09-30 18:34:57 +00:00
# Because 'nix flake check' is not system-aware
2023-02-27 22:13:33 +00:00
# See https://srid.ca/haskell-template/checks
2023-02-05 19:37:24 +00:00
nix run nixpkgs#sd \
'systems = nixpkgs.lib.systems.flakeExposed' \
'systems = [ "x86_64-linux" ]' \
flake.nix
2022-09-30 18:34:57 +00:00
2023-02-05 19:37:24 +00:00
# Sandbox must be disabed for:
# https://github.com/srid/haskell-flake/issues/21
nix \
--option sandbox false \
flake check -L