From 4197042066811b6c0cc360a9e705c6b70fcaa8f1 Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Thu, 3 Aug 2023 10:44:19 -0400 Subject: [PATCH] add workflow that populates cache --- .github/workflows/nix-dev-cache.yaml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/nix-dev-cache.yaml diff --git a/.github/workflows/nix-dev-cache.yaml b/.github/workflows/nix-dev-cache.yaml new file mode 100644 index 0000000000..13ab02ae0d --- /dev/null +++ b/.github/workflows/nix-dev-cache.yaml @@ -0,0 +1,33 @@ +name: Nix development cache + +on: + # Build on every pull request (and new PR commit) + pull_request: + # Build on new pushes to trunk (E.g. Merge commits) + # Without the branch filter, each commit on a branch with a PR is triggered twice. + # See: https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662 + push: + branches: + - trunk + +jobs: + nix: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + # Run each build to completion, regardless of if any have failed + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - macOS-12 + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v22 + - uses: cachix/cachix-action@v12 + with: + name: unison + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: build all packages and development shells + run: nix -L build --accept-flake-config --no-link --keep-going '.#all' +