-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.29 KB
/
build-with-nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build with nix
on:
pull_request:
branches:
- main
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V28
- uses: cachix/cachix-action@v15
with:
name: tket
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
installCommand: "nix profile install --accept-flake-config nixpkgs#cachix"
- name: Build pytket-cutensornet
run: nix build --accept-flake-config
test:
needs: build
runs-on: cuda
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V28
- uses: cachix/cachix-action@v15
with:
name: tket
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
installCommand: "nix profile install --accept-flake-config nixpkgs#cachix"
- name: Test pytket-cutensornet
# impure is necessary due to nixgl usage (system-dependent cuda)
run: nix run .#tests --impure --accept-flake-config
- name: Test example notebooks
# impure is necessary due to nixgl usage (system-dependent cuda)
run: nix run .#example-tests --impure --accept-flake-config