diff --git a/.github/workflows/abi_wasm.yml b/.github/workflows/abi_wasm.yml index fbbfeba2331..d4e4c37bc29 100644 --- a/.github/workflows/abi_wasm.yml +++ b/.github/workflows/abi_wasm.yml @@ -22,27 +22,16 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 + - name: Setup Nix + uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-23.05 github_access_token: ${{ secrets.GITHUB_TOKEN }} - - name: Restore nix store cache - uses: actions/cache/restore@v3 - id: cache + - uses: cachix/cachix-action@v12 with: - path: ${{ env.CACHED_PATH }} - key: ${{ runner.os }}-flake-abi-wasm-${{ hashFiles('*.lock') }} - - # Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26 - - name: Copy cache into nix store - if: steps.cache.outputs.cache-hit == 'true' - # We don't check the signature because we're the one that created the cache - run: | - for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do - path=$(head -n 1 "$narinfo" | awk '{print $2}') - nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path" - done + name: barretenberg + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Build noirc_abi_wasm run: | @@ -55,13 +44,6 @@ jobs: run: | nix copy --to "file://${{ env.CACHED_PATH }}?compression=zstd¶llel-compression=true" .#noirc-abi-wasm-cargo-artifacts - - uses: actions/cache/save@v3 - # Don't create cache entries for the merge queue. - if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} - with: - path: ${{ env.CACHED_PATH }} - key: ${{ steps.cache.outputs.cache-primary-key }} - - name: Dereference symlink run: echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV diff --git a/.github/workflows/acvm-rust.yml b/.github/workflows/acvm-rust.yml index 0394c306fff..097b81647e2 100644 --- a/.github/workflows/acvm-rust.yml +++ b/.github/workflows/acvm-rust.yml @@ -20,31 +20,16 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - name: Setup Nix + uses: cachix/install-nix-action@v22 with: - nix_path: nixpkgs=channel:nixos-22.11 + nix_path: nixpkgs=channel:nixos-23.05 github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: cachix/cachix-action@v12 with: name: barretenberg - - - name: Restore nix store cache - id: nix-store-cache - uses: actions/cache@v3 - with: - path: /tmp/nix-cache - key: ${{ runner.os }}-flake-${{ hashFiles('*.lock') }} - - # Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26 - - name: Copy cache into nix store - if: steps.nix-store-cache.outputs.cache-hit == 'true' - # We don't check the signature because we're the one that created the cache - run: | - for narinfo in /tmp/nix-cache/*.narinfo; do - path=$(head -n 1 "$narinfo" | awk '{print $2}') - nix copy --no-check-sigs --from "file:///tmp/nix-cache" "$path" - done + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Run `nix flake check` working-directory: acvm-repo diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 3680a1661d8..02ab6839d11 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -35,22 +35,6 @@ jobs: name: barretenberg authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - name: Restore nix store cache - uses: actions/cache/restore@v3 - id: cache - with: - path: ${{ env.CACHED_PATH }} - key: ${{ runner.os }}-flake-wasm-${{ hashFiles('*.lock') }} - - # Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26 - - name: Copy cache into nix store - if: steps.cache.outputs.cache-hit == 'true' - # We don't check the signature because we're the one that created the cache - run: | - for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do - path=$(head -n 1 "$narinfo" | awk '{print $2}') - nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path" - done - name: Build noir_wasm package run: | diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 71972d5e5c5..82c094959bc 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -59,42 +59,18 @@ jobs: - name: Setup Nix uses: cachix/install-nix-action@v22 with: - nix_path: nixpkgs=channel:nixos-22.11 + nix_path: nixpkgs=channel:nixos-23.05 github_access_token: ${{ secrets.GITHUB_TOKEN }} - - name: Restore nix store cache - uses: actions/cache/restore@v3 - id: cache + - uses: cachix/cachix-action@v12 with: - path: ${{ env.CACHED_PATH }} - key: ${{ runner.os }}-flake-wasm-${{ hashFiles('*.lock') }} - - # Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26 - - name: Copy cache into nix store - if: steps.cache.outputs.cache-hit == 'true' - # We don't check the signature because we're the one that created the cache - run: | - for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do - path=$(head -n 1 "$narinfo" | awk '{print $2}') - nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path" - done + name: barretenberg + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Build wasm package run: | nix build -L .#noir_wasm - - name: Export cache from nix store - if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} - run: | - nix copy --to "file://${{ env.CACHED_PATH }}?compression=zstd¶llel-compression=true" .#noir-wasm-cargo-artifacts - - - uses: actions/cache/save@v3 - # Don't create cache entries for the merge queue. - if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} - with: - path: ${{ env.CACHED_PATH }} - key: ${{ steps.cache.outputs.cache-primary-key }} - - name: Dereference symlink run: echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV