diff --git a/.github/actions/build-and-test/action.yml b/.github/actions/build-and-test/action.yml index ad8a25c2a..26934d490 100644 --- a/.github/actions/build-and-test/action.yml +++ b/.github/actions/build-and-test/action.yml @@ -19,6 +19,10 @@ inputs: test-flags: description: "Extra flags to pass to `cargo test`" required: false + run-tests: + description: "Whether to run tests after building" + required: false + default: 'true' package-flags: description: "Extra flags to pass to cranko package-released-binaries" runs: @@ -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 diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 2c62575a3..8fd2136c4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -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: @@ -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: | @@ -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: diff --git a/Cargo.toml b/Cargo.toml index 1d5a8949e..d5fd7ccec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/dist/vcpkg-triplets/arm64-windows-static-release.cmake b/dist/vcpkg-triplets/arm64-windows-static-release.cmake new file mode 100644 index 000000000..c30430937 --- /dev/null +++ b/dist/vcpkg-triplets/arm64-windows-static-release.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_BUILD_TYPE release)