Skip to content

Commit fb0f348

Browse files
committed
build: fix reqwest build on Linux
1 parent 8bbeb70 commit fb0f348

4 files changed

Lines changed: 201 additions & 27 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ permissions: {}
77

88
jobs:
99
build-rust:
10-
runs-on: ubuntu-latest
10+
runs-on: ${{ matrix.settings.os }}
1111
permissions:
1212
contents: read
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
target:
17-
- aarch64-apple-darwin
18-
- aarch64-unknown-linux-gnu
19-
- x86_64-unknown-linux-gnu
20-
- x86_64-pc-windows-msvc
16+
settings:
17+
- target: aarch64-apple-darwin
18+
os: namespace-profile-mac-default
19+
- target: aarch64-unknown-linux-gnu
20+
os: ubuntu-24.04-arm
21+
- target: x86_64-unknown-linux-gnu
22+
os: ubuntu-latest
23+
- target: x86_64-pc-windows-msvc
24+
os: windows-latest
2125
# - aarch64-pc-windows-msvc
2226
steps:
2327
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -40,45 +44,37 @@ jobs:
4044
with:
4145
tool: cargo-zigbuild
4246

43-
- uses: taiki-e/install-action@ad95d4e02e061d4390c4b66ef5ed56c7fee3d2ce # v2.58.17
44-
if: ${{ contains(matrix.target, 'windows') }}
45-
env:
46-
GITHUB_TOKEN: ${{ github.token }}
47-
with:
48-
tool: cargo-xwin
49-
50-
- name: Install llvm
51-
if: ${{ contains(matrix.target, 'windows') }}
52-
run: brew install llvm
53-
5447
- name: Rustup Adds Target
55-
run: rustup target add ${{ matrix.target }}
48+
run: rustup target add ${{ matrix.settings.target }}
5649

5750
- name: Add musl target (x86_64)
58-
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
51+
if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
5952
run: rustup target add x86_64-unknown-linux-musl
6053

6154
- name: Add musl target (aarch64)
62-
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
55+
if: ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
6356
run: rustup target add aarch64-unknown-linux-musl
6457

6558
- uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
6659

6760
- name: Build
68-
run: pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.target }} -x
69-
env:
70-
XWIN_CACHE_DIR: ${{ github.workspace }}/.xwin-cache
61+
if: ${{ contains(matrix.settings.target, 'linux') }}
62+
run: pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.settings.target }} --use-napi-cross
63+
64+
- name: Build
65+
if: ${{ !contains(matrix.settings.target, 'linux') }}
66+
run: pnpm --filter=@voidzero-dev/vite-plus build --target ${{ matrix.settings.target }}
7167

7268
- name: Upload artifact
7369
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7470
with:
75-
name: bindings-${{ matrix.target }}
71+
name: bindings-${{ matrix.settings.target }}
7672
path: ./packages/cli/binding/*.node
7773
if-no-files-found: error
7874

7975
- name: Upload cli dist
8076
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
81-
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
77+
if: ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' }}
8278
with:
8379
name: cli
8480
path: ./packages/cli/dist

Cargo.lock

Lines changed: 173 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ rand = "0.9.1"
9898
ratatui = "0.29.0"
9999
rayon = "1.10.0"
100100
ref-cast = "1.0.24"
101-
reqwest = { version = "0.12", features = ["stream", "native-tls", "json"], default-features = false }
101+
reqwest = { version = "0.12", default-features = false }
102102
rusqlite = "0.37.0"
103103
rustc-hash = "2.1.1"
104104
seccompiler = { git = "https://github.com/branchseer/seccompiler", branch = "seccomp-action-raw" }

0 commit comments

Comments
 (0)