Skip to content

Commit 3480047

Browse files
feat(cli): Build the CLI for Windows ARM64, closes #7015 (#7098) (#7106)
Co-authored-by: Lucas Nogueira <[email protected]> Co-authored-by: Lucas Nogueira <[email protected]> closes #7015 (#7098)
1 parent 9e3a18e commit 3480047

File tree

13 files changed

+161
-137
lines changed

13 files changed

+161
-137
lines changed

.changes/cli-windows-arm64.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'tauri-cli': minor
3+
'@tauri-apps/cli': minor
4+
---
5+
6+
Provide prebuilt CLIs for Windows ARM64 targets.

.github/workflows/publish-cli-js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
build: yarn build:release --target i686-pc-windows-msvc
4141
target: i686-pc-windows-msvc
4242
architecture: x64
43+
- host: windows-latest
44+
architecture: x64
45+
target: aarch64-pc-windows-msvc
46+
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
4347
- host: ubuntu-20.04
4448
target: x86_64-unknown-linux-gnu
4549
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
@@ -84,10 +88,6 @@ jobs:
8488
rustup target add aarch64-unknown-linux-musl
8589
yarn build:release --target aarch64-unknown-linux-musl
8690
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
87-
#- host: windows-latest
88-
# architecture: x64
89-
# target: aarch64-pc-windows-msvc
90-
# build: yarn build:release --target aarch64-pc-windows-msvc
9191
name: stable - ${{ matrix.settings.target }} - node@16
9292
runs-on: ${{ matrix.settings.host }}
9393
steps:

.github/workflows/publish-cli-rs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@ jobs:
2121
- os: ubuntu-20.04
2222
rust_target: x86_64-unknown-linux-gnu
2323
ext: ''
24+
args: ''
2425
- os: macos-latest
2526
rust_target: x86_64-apple-darwin
2627
ext: ''
28+
args: ''
2729
- os: macos-latest
2830
rust_target: aarch64-apple-darwin
2931
ext: ''
32+
args: ''
3033
- os: windows-latest
3134
rust_target: x86_64-pc-windows-msvc
3235
ext: '.exe'
36+
args: ''
37+
- os: windows-latest
38+
rust_target: aarch64-pc-windows-msvc
39+
ext: '.exe'
40+
args: '--no-default-features --features native-tls-vendored'
3341

3442
steps:
3543
- uses: actions/checkout@v3
@@ -53,7 +61,7 @@ jobs:
5361
uses: actions-rs/cargo@v1
5462
with:
5563
command: build
56-
args: --manifest-path ./tooling/cli/Cargo.toml --release
64+
args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}
5765

5866
- name: Upload CLI
5967
uses: actions/upload-artifact@v3

.github/workflows/test-cli-rs.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,40 @@ concurrency:
2424

2525
jobs:
2626
test:
27-
runs-on: ${{ matrix.platform }}
27+
runs-on: ${{ matrix.platform.os }}
2828

2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
platform: [ubuntu-latest, macos-latest, windows-latest]
32+
platform:
33+
- {
34+
target: x86_64-pc-windows-msvc,
35+
os: windows-latest
36+
}
37+
- {
38+
target: aarch64-pc-windows-msvc,
39+
os: windows-latest,
40+
args: --no-default-features --features native-tls-vendored
41+
}
42+
- {
43+
target: x86_64-unknown-linux-gnu,
44+
os: ubuntu-latest
45+
}
46+
- {
47+
target: x86_64-apple-darwin,
48+
os: macos-latest
49+
}
3350

3451
steps:
3552
- uses: actions/checkout@v2
3653

37-
- name: install stable
38-
uses: actions-rs/toolchain@v1
54+
- name: 'Setup Rust'
55+
uses: dtolnay/rust-toolchain@stable
3956
with:
40-
toolchain: stable
41-
override: true
57+
targets: ${{ matrix.platform.target }}
4258

4359
- name: install Linux dependencies
44-
if: matrix.platform == 'ubuntu-latest'
60+
if: matrix.platform.os == 'ubuntu-latest'
4561
run: |
4662
sudo apt-get update
4763
sudo apt-get install -y libgtk-3-dev
@@ -54,4 +70,4 @@ jobs:
5470
uses: actions-rs/cargo@v1
5571
with:
5672
command: build
57-
args: --manifest-path ./tooling/cli/Cargo.toml
73+
args: --manifest-path ./tooling/cli/Cargo.toml ${{ matrix.platform.args }}

tooling/bundler/Cargo.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ tempfile = "3.5.0"
3232
log = { version = "0.4.17", features = [ "kv_unstable" ] }
3333
dirs-next = "2.0"
3434
os_pipe = "1"
35-
ureq = "2.5"
35+
ureq = { version = "2.5", default-features = false }
36+
native-tls = { version = "0.2", optional = true }
3637
hex = "0.4"
3738
semver = "1"
3839
sha1 = "0.10"
3940
sha2 = "0.10"
40-
zip = "0.6"
41+
zip = { version = "0.6", default-features = false }
4142
dunce = "1"
4243

4344
[target."cfg(target_os = \"windows\")".dependencies]
@@ -62,3 +63,9 @@ md5 = "0.7.0"
6263
[lib]
6364
name = "tauri_bundler"
6465
path = "src/lib.rs"
66+
67+
[features]
68+
default = ["rustls"]
69+
native-tls = [ "ureq/native-tls" ]
70+
native-tls-vendored = [ "native-tls", "native-tls/vendored" ]
71+
rustls = [ "ureq/tls" ]

0 commit comments

Comments
 (0)