about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-08 22:40:10 +0000
committerbors <bors@rust-lang.org>2023-11-08 22:40:10 +0000
commit57fb1e643aa96da3c7024ff5a45859647f39ad5b (patch)
treeb010c436127293650f9c72d31f119d4b4d59357a
parentfdaaaf9f923281ab98b865259aa40fbf93d72c7a (diff)
parent6909992501b400c8cd7d75e8d61365b2c20015f9 (diff)
downloadrust-57fb1e643aa96da3c7024ff5a45859647f39ad5b.tar.gz
rust-57fb1e643aa96da3c7024ff5a45859647f39ad5b.zip
Auto merge of #117454 - shepmaster:github-actions-m1-tests, r=GuillaumeGomez,onur-ozkan
Run tests in CI for aarch64-apple-darwin

r? `@ghost`
-rw-r--r--.github/workflows/ci.yml22
-rw-r--r--src/ci/github-actions/ci.yml23
-rwxr-xr-xsrc/ci/scripts/install-tidy.sh24
-rw-r--r--tests/rustdoc-ui/issues/issue-107918.rs2
4 files changed, 70 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8cc26d2995e..5f659a1c306 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
@@ -370,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"
@@ -483,6 +499,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 +626,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 b415eb5961b..da29ffb8e5f 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
@@ -565,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  #
           ######################
diff --git a/src/ci/scripts/install-tidy.sh b/src/ci/scripts/install-tidy.sh
new file mode 100755
index 00000000000..fab126453fd
--- /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
diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs
index 13788df0fc9..0ddb3dc9215 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]