Skip to content

Commit ed72b0f

Browse files
Enable Nix-aware cargo caching on macOS release builds
1 parent 02d3aad commit ed72b0f

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
macos:
2121
name: macOS ARM64 DMG
22-
runs-on: macOS
22+
runs-on: blacksmith-6vcpu-macos-26
2323
timeout-minutes: 90
2424
env:
2525
APPLE_CERTIFICATE_P12_BASE64: ${{ secrets.APPLE_CERTIFICATE_P12_BASE64 }}
@@ -35,14 +35,23 @@ jobs:
3535
with:
3636
clean: false
3737

38-
# - name: Cache cargo registry and Rust dependencies
39-
# uses: Swatinem/rust-cache@v2
40-
# with:
41-
# shared-key: release-${{ runner.os }}-desktop-v2
42-
# workspaces: |
43-
# . -> target
44-
# cache-on-failure: "true"
45-
# cmd-format: nix develop --accept-flake-config -c {0}
38+
- name: Install Nix
39+
uses: DeterminateSystems/nix-installer-action@main
40+
with:
41+
extra-conf: |
42+
accept-flake-config = true
43+
44+
- name: Cache Nix store
45+
uses: DeterminateSystems/magic-nix-cache-action@main
46+
47+
- name: Cache cargo registry and Rust dependencies
48+
uses: Swatinem/rust-cache@v2
49+
with:
50+
shared-key: release-${{ runner.os }}-desktop-v2
51+
workspaces: |
52+
. -> target
53+
cache-on-failure: "true"
54+
cmd-format: nix develop --accept-flake-config -c {0}
4655

4756
- name: Install cargo-packager
4857
run: nix develop --accept-flake-config -c cargo install cargo-packager --locked --version 0.11.8

0 commit comments

Comments
 (0)