Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
test-flags:
description: "Extra flags to pass to `cargo test`"
required: false
run-tests:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason ARM doesn't run tests? If any are failing, that may be a sign things need fixed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current ARM64 entry is a cross-build on an x64 runner, so the e2e tests cannot simply run without an emulation layer. Would you prefer that I keep this cross-build-only job or should I add a separate windows-11-arm job for native ARM64 Windows build and test coverage?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I think it's fine this way, no strong opinion either way for now.

description: "Whether to run tests after building"
required: false
default: 'true'
package-flags:
description: "Extra flags to pass to cranko package-released-binaries"
runs:
Expand Down Expand Up @@ -54,6 +58,7 @@ runs:
run: |
${{ inputs.executable }} build --workspace --target ${{ inputs.target }} --release ${{ steps.set-feature-flags.outputs.cargo-features }} $CARGO_VERBOSE
- name: "cargo test"
if: ${{ inputs.run-tests == 'true' }}
shell: bash
run: |
${{ inputs.executable }} test --workspace --target ${{ inputs.target }} ${{ inputs.test-flags }} --release ${{ steps.set-feature-flags.outputs.cargo-features }} $CARGO_VERBOSE
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,24 @@ jobs:
data:
- image: ubuntu-latest
target: x86_64-unknown-linux-gnu
run-tests: true
publish: false
- image: windows-latest
target: x86_64-pc-windows-msvc
run-tests: true
publish: true
- image: windows-latest
target: aarch64-pc-windows-msvc
run-tests: false
publish: false
- image: macos-latest
target: x86_64-apple-darwin
run-tests: true
publish: true
- image: macos-latest
target: aarch64-apple-darwin
run-tests: true
publish: true
fail-fast: false
runs-on: ${{ matrix.data.image }}
steps:
Expand All @@ -274,10 +286,6 @@ jobs:
uses: ./.github/actions/build-setup
with:
toolchain: ${{ matrix.toolchain }}
- name: "Install vcpkg dependencies"
uses: ./.github/actions/vcpkg-deps
with:
target: ${{ matrix.data.target }}
- name: "Setup build variables"
shell: bash
run: |
Expand All @@ -288,15 +296,24 @@ jobs:
shell: bash
run: |
echo "RUSTFLAGS=-Ctarget-feature=+crt-static" >> "$GITHUB_ENV"
echo "VCPKGRS_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
if [[ "${{ matrix.data.target }}" == "aarch64-pc-windows-msvc" ]]; then
echo "VCPKGRS_TRIPLET=arm64-windows-static-release" >> "$GITHUB_ENV"
else
echo "VCPKGRS_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
fi
echo "VCPKG_DEFAULT_HOST_TRIPLET=x64-windows-static-release" >> "$GITHUB_ENV"
# Format file locking issue workaround:
echo "RUST_TEST_THREADS=1" >> "$GITHUB_ENV"
- name: "Install vcpkg dependencies"
uses: ./.github/actions/vcpkg-deps
with:
target: ${{ matrix.data.target }}
- name: "Build and Test"
uses: ./.github/actions/build-and-test
with:
target: ${{ matrix.data.target }}
publish: ${{ matrix.data.image != 'ubuntu-latest' }}
run-tests: ${{ matrix.data.run-tests }}
publish: ${{ matrix.data.publish }}
cross:
strategy:
matrix:
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = [
"harfbuzz[graphite2]",
"icu",
] }
aarch64-pc-windows-msvc = { triplet = "arm64-windows-static-release", install = [
"fontconfig",
"freetype",
"harfbuzz[graphite2]",
"icu",
] }

[package.metadata.internal_dep_versions]
tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
Expand Down
4 changes: 4 additions & 0 deletions dist/vcpkg-triplets/arm64-windows-static-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)