From 3a64cfa66424ead6f94bcf0280939094c3630768 Mon Sep 17 00:00:00 2001 From: Jake Arkinstall <65358059+jake-arkinstall@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:56:59 +0100 Subject: [PATCH] Added workflow for building with Nix and testing on a gpu-enabled runner --- .github/workflows/build-with-nix.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-with-nix.yml diff --git a/.github/workflows/build-with-nix.yml b/.github/workflows/build-with-nix.yml new file mode 100644 index 00000000..a0bee2f4 --- /dev/null +++ b/.github/workflows/build-with-nix.yml @@ -0,0 +1,37 @@ +name: build with nix + +on: + pull_request: + branches: + - main + workflow_dispatch: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false +jobs: + build: + strategy: + matrix: + os: ['ubuntu-24.04'] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@V27 + - uses: cachix/cachix-action@v15 + with: + name: tket + - name: Build pytket-cutensornet + run: nix build + test: + needs: build + runs-on: nixos-gpu + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@V27 + - uses: cachix/cachix-action@v15 + with: + name: tket + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Test pytket-cutensornet + run: nix run .#tests