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
|
|
|
|
- uses: cachix/install-nix-action@v13
|
|
|
|
with:
|
|
|
|
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
|
|
|
|
install_options: "--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve"
|
|
|
|
extra_nix_config: |
|
|
|
|
experimental-features = nix-command flakes
|
2022-05-04 20:24:34 +00:00
|
|
|
- name: Cache Nix dependencies
|
|
|
|
run: |
|
|
|
|
nix develop -j 4 -c echo
|
|
|
|
- name: Format check
|
|
|
|
run: |
|
|
|
|
nix develop -j auto -c treefmt -- --fail-on-change
|
2021-12-05 21:43:18 +00:00
|
|
|
- name: Build
|
|
|
|
id: build
|
|
|
|
run: |
|
|
|
|
nix build -j auto
|