Skip to content

Commit 05d0ae0

Browse files
try to use cargo-zigbuild
1 parent 28175a3 commit 05d0ae0

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/turborepo-library-release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,20 @@ jobs:
114114
run: ${{ matrix.settings.setup }}
115115
if: ${{ matrix.settings.setup }}
116116

117+
- name: "Install cargo-sweep"
118+
uses: taiki-e/install-action@v2
119+
env:
120+
GITHUB_TOKEN: ${{ inputs.github-token }}
121+
with:
122+
tool: cargo-zigbuild
123+
117124
- name: Build native library
118125
run: |
119126
export PATH=/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
120127
cd packages/turbo-repository
121128
${{ matrix.settings.rust_env }} pnpm build:release --target=${{ matrix.settings.target }}
129+
env:
130+
DEBUG: "napi:*"
122131

123132
- name: Upload Artifacts
124133
uses: actions/upload-artifact@v4

packages/turbo-repository/scripts/build.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ for flag in $user_provided_flags; do
1414
if [[ $flag == --target=* ]]; then
1515
target=${flag#*=}
1616
rustup target add "$target"
17-
18-
# For we need to cross-compile some targets with Zig
19-
# Fortunately, napi comes with a `--zig` flag
20-
if [[ $target == x86_64-unknown-linux-gnu || $target == aarch64-unknown-linux-gnu ]]; then
21-
script_provided_flags+=" --zig"
22-
fi
2317
fi
2418
done
2519

0 commit comments

Comments
 (0)