From 469d34b39b5d5be623850a3500c1e3a226180b41 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Tue, 31 Oct 2023 15:47:59 -0400 Subject: [PATCH 1/3] Mark Rustdoc test as Linux-only Due to incorrect CI configuration, this test was not being run on macOS. aarch64-apple-darwin will start running it, so we correct the configuration. --- tests/rustdoc-ui/issues/issue-107918.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs index 13788df0fc996..0ddb3dc921501 100644 --- a/tests/rustdoc-ui/issues/issue-107918.rs +++ b/tests/rustdoc-ui/issues/issue-107918.rs @@ -1,7 +1,7 @@ // aux-build:panic-handler.rs // compile-flags: --document-private-items // build-pass -// ignore-windows +// only-linux #![no_std] #![no_main] From 64090536d4d700c6383532177b0993157957f5c8 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Tue, 31 Oct 2023 16:32:37 -0400 Subject: [PATCH 2/3] Install tidy for aarch64-apple-darwin The GitHub Actions image has this preinstalled for x86_64 but not M1. --- .github/workflows/ci.yml | 9 +++++++++ src/ci/github-actions/ci.yml | 4 ++++ src/ci/scripts/install-tidy.sh | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100755 src/ci/scripts/install-tidy.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cc26d2995e73..4755210719612 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,9 @@ jobs: - name: install clang run: src/ci/scripts/install-clang.sh if: success() && !env.SKIP_JOB + - name: install tidy + run: src/ci/scripts/install-tidy.sh + if: success() && !env.SKIP_JOB - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB @@ -483,6 +486,9 @@ jobs: - name: install clang run: src/ci/scripts/install-clang.sh if: success() && !env.SKIP_JOB + - name: install tidy + run: src/ci/scripts/install-tidy.sh + if: success() && !env.SKIP_JOB - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB @@ -607,6 +613,9 @@ jobs: - name: install clang run: src/ci/scripts/install-clang.sh if: success() && !env.SKIP_JOB + - name: install tidy + run: src/ci/scripts/install-tidy.sh + if: success() && !env.SKIP_JOB - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index b415eb5961bb3..6518a88732f66 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -173,6 +173,10 @@ x--expand-yaml-anchors--remove: run: src/ci/scripts/install-clang.sh <<: *step + - name: install tidy + run: src/ci/scripts/install-tidy.sh + <<: *step + - name: install WIX run: src/ci/scripts/install-wix.sh <<: *step diff --git a/src/ci/scripts/install-tidy.sh b/src/ci/scripts/install-tidy.sh new file mode 100755 index 0000000000000..fab126453fdc9 --- /dev/null +++ b/src/ci/scripts/install-tidy.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# This script downloads and installs the tidy binary from Homebrew. + +set -euo pipefail +IFS=$'\n\t' + +source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" + +# Only the macOS arm64/aarch64 GitHub Actions runner needs to have tidy +# installed; other platforms have it preinstalled. + +if isMacOS; then + platform=$(uname -m) + case $platform in + x86_64) + ;; + arm64) + brew install tidy-html5 + ;; + *) + echo "unsupported architecture: ${platform}" + exit 1 + esac +fi From 6909992501b400c8cd7d75e8d61365b2c20015f9 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Tue, 31 Oct 2023 11:05:56 -0400 Subject: [PATCH 3/3] Run tests in CI for aarch64-apple-darwin --- .github/workflows/ci.yml | 13 +++++++++++++ src/ci/github-actions/ci.yml | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4755210719612..5f659a1c3060c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -373,6 +373,19 @@ jobs: NO_OVERFLOW_CHECKS: 1 DIST_REQUIRE_ALL_TOOLS: 1 os: macos-13-xlarge + - name: aarch64-apple + env: + SCRIPT: "./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin" + RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false" + RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 + SELECT_XCODE: /Applications/Xcode_13.4.1.app + USE_XCODE_CLANG: 1 + MACOSX_DEPLOYMENT_TARGET: 11.0 + MACOSX_STD_DEPLOYMENT_TARGET: 11.0 + NO_LLVM_ASSERTIONS: 1 + NO_DEBUG_ASSERTIONS: 1 + NO_OVERFLOW_CHECKS: 1 + os: macos-13-xlarge - name: x86_64-msvc env: RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler" diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 6518a88732f66..da29ffb8e5f9b 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -569,6 +569,25 @@ jobs: DIST_REQUIRE_ALL_TOOLS: 1 <<: *job-macos-m1 + # This target only needs to support 11.0 and up as nothing else supports the hardware + - name: aarch64-apple + env: + SCRIPT: ./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin + RUST_CONFIGURE_ARGS: >- + --enable-sanitizers + --enable-profiler + --set rust.jemalloc + --set llvm.ninja=false + RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 + SELECT_XCODE: /Applications/Xcode_13.4.1.app + USE_XCODE_CLANG: 1 + MACOSX_DEPLOYMENT_TARGET: 11.0 + MACOSX_STD_DEPLOYMENT_TARGET: 11.0 + NO_LLVM_ASSERTIONS: 1 + NO_DEBUG_ASSERTIONS: 1 + NO_OVERFLOW_CHECKS: 1 + <<: *job-macos-m1 + ###################### # Windows Builders # ######################