diff options
author | Akshay <[email protected]> | 2022-01-15 09:27:35 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2022-01-15 09:27:35 +0000 |
commit | 23892b034d710bfbfa1f82c48fbfecb68f791f13 (patch) | |
tree | 1facf6fc365362d94f84d38a0ac98cb7caf5eab2 /.github | |
parent | 9a1796bdf3a57ee5b0f1bfcdf0b9ac3dd8f4775b (diff) | |
parent | 33e2442049442f52fc07b34c3c6bd0ec8fb636d8 (diff) |
Merge branch 'add/cachix-build-action'
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c141655 --- /dev/null +++ b/.github/workflows/build.yml | |||
@@ -0,0 +1,36 @@ | |||
1 | name: build | ||
2 | on: | ||
3 | pull_request: | ||
4 | push: | ||
5 | jobs: | ||
6 | build: | ||
7 | strategy: | ||
8 | matrix: | ||
9 | os: | ||
10 | - ubuntu-latest | ||
11 | nix: | ||
12 | - name: 2.5.1 | ||
13 | url: https://releases.nixos.org/nix/nix-2.5.1/install | ||
14 | runs-on: ${{ matrix.os }} | ||
15 | steps: | ||
16 | - uses: actions/[email protected] | ||
17 | - uses: cachix/install-nix-action@v15 | ||
18 | with: | ||
19 | install_url: ${{ matrix.nix.url }} | ||
20 | extra_nix_config: | | ||
21 | experimental-features = nix-command flakes | ||
22 | |||
23 | - name: enable binary cache | ||
24 | uses: cachix/cachix-action@v10 | ||
25 | with: | ||
26 | name: statix | ||
27 | authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
28 | |||
29 | - run: nix flake check | ||
30 | |||
31 | # this also includes `cargo test` | ||
32 | - name: build statix | ||
33 | run: nix build -L | ||
34 | |||
35 | - name: build and install statix with flake-compat | ||
36 | run: nix-env -if default.nix | ||