From a85d0672fedfc47df802daf0821da0b934688314 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 6 May 2021 18:45:24 +0200 Subject: [PATCH] chore: Nix CI: fall back to building locally if remote cache doesn't work --- .github/workflows/nix-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index aa0d59ef6e..20d94b02ca 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -29,6 +29,8 @@ jobs: # complete all jobs fail-fast: false name: ${{ matrix.name }} + env: + NIX_BUILD_ARGS: -v --print-build-logs --fallback steps: - name: Checkout uses: actions/checkout@v2 @@ -75,14 +77,14 @@ jobs: - name: Build run: | # .o files are not a runtime dependency on macOS because of lack of thin archives - nix build -v --print-build-logs .#stage0 .#stage1 .#Lean.oTree -o push-build + nix build $NIX_BUILD_ARGS .#stage0 .#stage1 .#Lean.oTree -o push-build - name: Test run: | - nix build -v --print-build-logs .#test -o push-test + nix build $NIX_BUILD_ARGS .#test -o push-test - name: Build manual run: | - nix build -v --print-build-logs .#mdbook .#doc-test -o push-doc - nix build -v --print-build-logs .#doc + nix build $NIX_BUILD_ARGS .#mdbook .#doc-test -o push-doc + nix build $NIX_BUILD_ARGS .#doc if: matrix.name == 'Linux' - name: Push to Cachix run: |