Skip to content

Commit 537f76b

Browse files
committed
Merge remote-tracking branch 'origin/fix/nix-crane-deps-cache' into pr-1243
2 parents 82ce3dd + de8ab80 commit 537f76b

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
- os: macos-15-intel
110110
platform: darwin
111111
arch: x64
112-
binary: rust/target/release/ccusage
112+
binary: result/bin/ccusage
113113
- os: windows-11-arm
114114
platform: win32
115115
arch: arm64
@@ -122,9 +122,9 @@ jobs:
122122
steps:
123123
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
124124
- uses: ./.github/actions/setup-nix
125-
if: matrix.platform == 'linux' || (matrix.platform == 'darwin' && matrix.arch == 'arm64')
125+
if: matrix.platform != 'win32'
126126
- name: Cache Cargo build
127-
if: matrix.platform != 'linux' && !(matrix.platform == 'darwin' && matrix.arch == 'arm64')
127+
if: matrix.platform == 'win32'
128128
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
129129
with:
130130
path: |
@@ -142,8 +142,8 @@ jobs:
142142
else
143143
nix build .#ccusage-static
144144
fi
145-
- name: Build macOS arm64 binary
146-
if: matrix.platform == 'darwin' && matrix.arch == 'arm64'
145+
- name: Build macOS binary
146+
if: matrix.platform == 'darwin'
147147
run: nix build .#ccusage
148148
- name: Verify Linux binary is static
149149
if: matrix.platform == 'linux'
@@ -158,7 +158,7 @@ jobs:
158158
grep -Eiq 'not a dynamic executable|statically linked' "$RUNNER_TEMP/ldd.txt"
159159
fi
160160
- name: Build Cargo native binary
161-
if: matrix.platform != 'linux' && !(matrix.platform == 'darwin' && matrix.arch == 'arm64')
161+
if: matrix.platform == 'win32'
162162
run: cargo build --manifest-path rust/Cargo.toml --release --bin ccusage
163163
- run: node apps/ccusage/scripts/stage-native-package.mjs --platform "${{ matrix.platform }}" --arch "${{ matrix.arch }}" --binary "${{ matrix.binary }}"
164164
- name: Archive native package binary

‎.github/workflows/release.yaml‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
- os: macos-latest
2525
platform: darwin
2626
arch: arm64
27-
binary: rust/target/release/ccusage
27+
binary: result/bin/ccusage
2828
- os: macos-15-intel
2929
platform: darwin
3030
arch: x64
31-
binary: rust/target/release/ccusage
31+
binary: result/bin/ccusage
3232
- os: windows-11-arm
3333
platform: win32
3434
arch: arm64
@@ -43,11 +43,9 @@ jobs:
4343
with:
4444
fetch-depth: 0
4545
- uses: ./.github/actions/setup-nix
46-
with:
47-
cache-profile: dev
48-
if: matrix.platform == 'linux'
46+
if: matrix.platform != 'win32'
4947
- name: Cache Cargo build
50-
if: matrix.platform != 'linux'
48+
if: matrix.platform == 'win32'
5149
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
5250
with:
5351
path: |
@@ -60,6 +58,9 @@ jobs:
6058
- name: Build Linux static binary
6159
if: matrix.platform == 'linux'
6260
run: nix build .#ccusage-static
61+
- name: Build macOS binary
62+
if: matrix.platform == 'darwin'
63+
run: nix build .#ccusage
6364
- name: Verify Linux binary is static
6465
if: matrix.platform == 'linux'
6566
shell: bash
@@ -73,7 +74,7 @@ jobs:
7374
grep -Eiq 'not a dynamic executable|statically linked' "$RUNNER_TEMP/ldd.txt"
7475
fi
7576
- name: Build Cargo native binary
76-
if: matrix.platform != 'linux'
77+
if: matrix.platform == 'win32'
7778
run: cargo build --manifest-path rust/Cargo.toml --release --bin ccusage
7879
- run: node apps/ccusage/scripts/stage-native-package.mjs --platform "${{ matrix.platform }}" --arch "${{ matrix.arch }}" --binary "${{ matrix.binary }}"
7980
- name: Archive native package binary

0 commit comments

Comments
 (0)