Skip to content

Commit bd074fa

Browse files
committed
Add Windows ARM64 vcpkg target
1 parent cafcb17 commit bd074fa

4 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/actions/build-and-test/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ inputs:
1919
test-flags:
2020
description: "Extra flags to pass to `cargo test`"
2121
required: false
22+
run-tests:
23+
description: "Whether to run tests after building"
24+
required: false
25+
default: 'true'
2226
package-flags:
2327
description: "Extra flags to pass to cranko package-released-binaries"
2428
runs:
@@ -54,6 +58,7 @@ runs:
5458
run: |
5559
${{ inputs.executable }} build --workspace --target ${{ inputs.target }} --release ${{ steps.set-feature-flags.outputs.cargo-features }} $CARGO_VERBOSE
5660
- name: "cargo test"
61+
if: ${{ inputs.run-tests == 'true' }}
5762
shell: bash
5863
run: |
5964
${{ inputs.executable }} test --workspace --target ${{ inputs.target }} ${{ inputs.test-flags }} --release ${{ steps.set-feature-flags.outputs.cargo-features }} $CARGO_VERBOSE

.github/workflows/build_and_test.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ jobs:
258258
target: x86_64-unknown-linux-gnu
259259
- image: windows-latest
260260
target: x86_64-pc-windows-msvc
261+
- image: windows-latest
262+
target: aarch64-pc-windows-msvc
263+
run-tests: false
264+
publish: false
261265
- image: macos-latest
262266
target: x86_64-apple-darwin
263267
- image: macos-latest
@@ -274,10 +278,6 @@ jobs:
274278
uses: ./.github/actions/build-setup
275279
with:
276280
toolchain: ${{ matrix.toolchain }}
277-
- name: "Install vcpkg dependencies"
278-
uses: ./.github/actions/vcpkg-deps
279-
with:
280-
target: ${{ matrix.data.target }}
281281
- name: "Setup build variables"
282282
shell: bash
283283
run: |
@@ -288,15 +288,24 @@ jobs:
288288
shell: bash
289289
run: |
290290
echo "RUSTFLAGS=-Ctarget-feature=+crt-static" >> "$GITHUB_ENV"
291-
echo "VCPKGRS_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
291+
if [[ "${{ matrix.data.target }}" == "aarch64-pc-windows-msvc" ]]; then
292+
echo "VCPKGRS_TRIPLET=arm64-windows-static-release" >> "$GITHUB_ENV"
293+
else
294+
echo "VCPKGRS_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
295+
fi
292296
echo "VCPKG_DEFAULT_HOST_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
293297
# Format file locking issue workaround:
294298
echo "RUST_TEST_THREADS=1" >> "$GITHUB_ENV"
299+
- name: "Install vcpkg dependencies"
300+
uses: ./.github/actions/vcpkg-deps
301+
with:
302+
target: ${{ matrix.data.target }}
295303
- name: "Build and Test"
296304
uses: ./.github/actions/build-and-test
297305
with:
298306
target: ${{ matrix.data.target }}
299-
publish: ${{ matrix.data.image != 'ubuntu-latest' }}
307+
run-tests: ${{ matrix.data.run-tests != false }}
308+
publish: ${{ matrix.data.publish != false && matrix.data.image != 'ubuntu-latest' }}
300309
cross:
301310
strategy:
302311
matrix:

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = [
169169
"harfbuzz[graphite2]",
170170
"icu",
171171
] }
172+
aarch64-pc-windows-msvc = { triplet = "arm64-windows-static-release", install = [
173+
"fontconfig",
174+
"freetype",
175+
"harfbuzz[graphite2]",
176+
"icu",
177+
] }
172178

173179
[package.metadata.internal_dep_versions]
174180
tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(VCPKG_TARGET_ARCHITECTURE arm64)
2+
set(VCPKG_CRT_LINKAGE static)
3+
set(VCPKG_LIBRARY_LINKAGE static)
4+
set(VCPKG_BUILD_TYPE release)

0 commit comments

Comments
 (0)