From 98db89b8b67fb9cda3b7e0157e4abfbd5f926eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 20 Nov 2024 18:43:31 +0000 Subject: [PATCH] nix: build and cache all devshells --- .github/workflows/nix_cache.yaml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/nix_cache.yaml diff --git a/.github/workflows/nix_cache.yaml b/.github/workflows/nix_cache.yaml new file mode 100644 index 00000000..2dffbfd6 --- /dev/null +++ b/.github/workflows/nix_cache.yaml @@ -0,0 +1,33 @@ +name: "Cache devshells" +on: + pull_request: + paths: + - "flake.nix" + - "flake.lock" + - "nix/**" +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + tests: + runs-on: + group: aws-highmemory-32-plus-priv + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: text-generation-inference + # If you chose signing key for write access + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + env: + USER: github_runner + - name: Build impure devshell + run: nix build .\#devShells.x86_64-linux.impure + - name: Build impure devshell (CUDA dev) + run: nix build .\#devShells.x86_64-linux.impureWithCuda + - name: Build pure devshell + run: nix build .\#devShells.x86_64-linux.pure