Skip to content

Commit 2e94d63

Browse files
committed
Auto merge of rust-lang#117454 - shepmaster:github-actions-m1-tests, r=<try>
Run tests in CI for aarch64-apple-darwin r? `@ghost`
2 parents 50be229 + 83d2dd2 commit 2e94d63

File tree

4 files changed

+103
-157
lines changed

4 files changed

+103
-157
lines changed

.github/workflows/ci.yml

+31-130
Original file line numberDiff line numberDiff line change
@@ -35,133 +35,6 @@ concurrency:
3535
group: "${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}"
3636
cancel-in-progress: true
3737
jobs:
38-
pr:
39-
name: "PR - ${{ matrix.name }}"
40-
env:
41-
PR_CI_JOB: 1
42-
CI_JOB_NAME: "${{ matrix.name }}"
43-
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
44-
HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
45-
SCCACHE_BUCKET: rust-lang-ci-sccache2
46-
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
47-
CACHE_DOMAIN: ci-caches.rust-lang.org
48-
if: "github.event_name == 'pull_request'"
49-
continue-on-error: "${{ matrix.name == 'mingw-check-tidy' }}"
50-
strategy:
51-
matrix:
52-
include:
53-
- name: mingw-check
54-
os: ubuntu-20.04-4core-16gb
55-
env: {}
56-
- name: mingw-check-tidy
57-
os: ubuntu-20.04-4core-16gb
58-
env: {}
59-
- name: x86_64-gnu-llvm-15
60-
os: ubuntu-20.04-16core-64gb
61-
env: {}
62-
- name: x86_64-gnu-tools
63-
os: ubuntu-20.04-16core-64gb
64-
env: {}
65-
timeout-minutes: 600
66-
runs-on: "${{ matrix.os }}"
67-
steps:
68-
- name: disable git crlf conversion
69-
run: git config --global core.autocrlf false
70-
- name: checkout the source code
71-
uses: actions/checkout@v4
72-
with:
73-
fetch-depth: 2
74-
- name: configure the PR in which the error message will be posted
75-
run: "echo \"[CI_PR_NUMBER=$num]\""
76-
env:
77-
num: "${{ github.event.number }}"
78-
if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
79-
- name: add extra environment variables
80-
run: src/ci/scripts/setup-environment.sh
81-
env:
82-
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
83-
if: success() && !env.SKIP_JOB
84-
- name: decide whether to skip this job
85-
run: src/ci/scripts/should-skip-this.sh
86-
if: success() && !env.SKIP_JOB
87-
- name: ensure the channel matches the target branch
88-
run: src/ci/scripts/verify-channel.sh
89-
if: success() && !env.SKIP_JOB
90-
- name: collect CPU statistics
91-
run: src/ci/scripts/collect-cpu-stats.sh
92-
if: success() && !env.SKIP_JOB
93-
- name: show the current environment
94-
run: src/ci/scripts/dump-environment.sh
95-
if: success() && !env.SKIP_JOB
96-
- name: install awscli
97-
run: src/ci/scripts/install-awscli.sh
98-
if: success() && !env.SKIP_JOB
99-
- name: install sccache
100-
run: src/ci/scripts/install-sccache.sh
101-
if: success() && !env.SKIP_JOB
102-
- name: select Xcode
103-
run: src/ci/scripts/select-xcode.sh
104-
if: success() && !env.SKIP_JOB
105-
- name: install clang
106-
run: src/ci/scripts/install-clang.sh
107-
if: success() && !env.SKIP_JOB
108-
- name: install WIX
109-
run: src/ci/scripts/install-wix.sh
110-
if: success() && !env.SKIP_JOB
111-
- name: disable git crlf conversion
112-
run: src/ci/scripts/disable-git-crlf-conversion.sh
113-
if: success() && !env.SKIP_JOB
114-
- name: checkout submodules
115-
run: src/ci/scripts/checkout-submodules.sh
116-
if: success() && !env.SKIP_JOB
117-
- name: install MSYS2
118-
run: src/ci/scripts/install-msys2.sh
119-
if: success() && !env.SKIP_JOB
120-
- name: install MinGW
121-
run: src/ci/scripts/install-mingw.sh
122-
if: success() && !env.SKIP_JOB
123-
- name: install ninja
124-
run: src/ci/scripts/install-ninja.sh
125-
if: success() && !env.SKIP_JOB
126-
- name: enable ipv6 on Docker
127-
run: src/ci/scripts/enable-docker-ipv6.sh
128-
if: success() && !env.SKIP_JOB
129-
- name: disable git crlf conversion
130-
run: src/ci/scripts/disable-git-crlf-conversion.sh
131-
if: success() && !env.SKIP_JOB
132-
- name: ensure line endings are correct
133-
run: src/ci/scripts/verify-line-endings.sh
134-
if: success() && !env.SKIP_JOB
135-
- name: ensure backported commits are in upstream branches
136-
run: src/ci/scripts/verify-backported-commits.sh
137-
if: success() && !env.SKIP_JOB
138-
- name: ensure the stable version number is correct
139-
run: src/ci/scripts/verify-stable-version-number.sh
140-
if: success() && !env.SKIP_JOB
141-
- name: run the build
142-
run: src/ci/scripts/run-build-from-ci.sh
143-
env:
144-
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
145-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
146-
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
147-
if: success() && !env.SKIP_JOB
148-
- name: create github artifacts
149-
run: src/ci/scripts/create-doc-artifacts.sh
150-
if: success() && !env.SKIP_JOB
151-
- name: upload artifacts to github
152-
uses: actions/upload-artifact@v3
153-
with:
154-
name: "${{ env.DOC_ARTIFACT_NAME }}"
155-
path: obj/artifacts/doc
156-
if-no-files-found: ignore
157-
retention-days: 5
158-
if: success() && !env.SKIP_JOB
159-
- name: upload artifacts to S3
160-
run: src/ci/scripts/upload-artifacts.sh
161-
env:
162-
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
163-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
164-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
16538
auto:
16639
name: "auto - ${{ matrix.name }}"
16740
env:
@@ -369,6 +242,19 @@ jobs:
369242
NO_OVERFLOW_CHECKS: 1
370243
DIST_REQUIRE_ALL_TOOLS: 1
371244
os: macos-13-xlarge
245+
- name: aarch64-apple
246+
env:
247+
SCRIPT: "./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
248+
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
249+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
250+
SELECT_XCODE: /Applications/Xcode_13.4.1.app
251+
USE_XCODE_CLANG: 1
252+
MACOSX_DEPLOYMENT_TARGET: 11.0
253+
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
254+
NO_LLVM_ASSERTIONS: 1
255+
NO_DEBUG_ASSERTIONS: 1
256+
NO_OVERFLOW_CHECKS: 1
257+
os: macos-13-xlarge
372258
- name: x86_64-msvc
373259
env:
374260
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
@@ -482,6 +368,9 @@ jobs:
482368
- name: install clang
483369
run: src/ci/scripts/install-clang.sh
484370
if: success() && !env.SKIP_JOB
371+
- name: install tidy
372+
run: src/ci/scripts/install-tidy.sh
373+
if: success() && !env.SKIP_JOB
485374
- name: install WIX
486375
run: src/ci/scripts/install-wix.sh
487376
if: success() && !env.SKIP_JOB
@@ -559,10 +448,19 @@ jobs:
559448
strategy:
560449
matrix:
561450
include:
562-
- name: dist-x86_64-linux
451+
- name: aarch64-apple
563452
env:
564-
CODEGEN_BACKENDS: "llvm,cranelift"
565-
os: ubuntu-20.04-16core-64gb
453+
SCRIPT: "./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
454+
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
455+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
456+
SELECT_XCODE: /Applications/Xcode_13.4.1.app
457+
USE_XCODE_CLANG: 1
458+
MACOSX_DEPLOYMENT_TARGET: 11.0
459+
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
460+
NO_LLVM_ASSERTIONS: 1
461+
NO_DEBUG_ASSERTIONS: 1
462+
NO_OVERFLOW_CHECKS: 1
463+
os: macos-13-xlarge
566464
timeout-minutes: 600
567465
runs-on: "${{ matrix.os }}"
568466
steps:
@@ -606,6 +504,9 @@ jobs:
606504
- name: install clang
607505
run: src/ci/scripts/install-clang.sh
608506
if: success() && !env.SKIP_JOB
507+
- name: install tidy
508+
run: src/ci/scripts/install-tidy.sh
509+
if: success() && !env.SKIP_JOB
609510
- name: install WIX
610511
run: src/ci/scripts/install-wix.sh
611512
if: success() && !env.SKIP_JOB

src/ci/github-actions/ci.yml

+47-27
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ x--expand-yaml-anchors--remove:
173173
run: src/ci/scripts/install-clang.sh
174174
<<: *step
175175

176+
- name: install tidy
177+
run: src/ci/scripts/install-tidy.sh
178+
<<: *step
179+
176180
- name: install WIX
177181
run: src/ci/scripts/install-wix.sh
178182
<<: *step
@@ -313,28 +317,28 @@ concurrency:
313317
cancel-in-progress: true
314318

315319
jobs:
316-
pr:
317-
<<: *base-ci-job
318-
name: PR - ${{ matrix.name }}
319-
env:
320-
<<: [*shared-ci-variables, *public-variables]
321-
PR_CI_JOB: 1
322-
if: github.event_name == 'pull_request'
323-
continue-on-error: ${{ matrix.name == 'mingw-check-tidy' }}
324-
strategy:
325-
matrix:
326-
include:
327-
- name: mingw-check
328-
<<: *job-linux-4c
329-
330-
- name: mingw-check-tidy
331-
<<: *job-linux-4c
332-
333-
- name: x86_64-gnu-llvm-15
334-
<<: *job-linux-16c
335-
336-
- name: x86_64-gnu-tools
337-
<<: *job-linux-16c
320+
# pr:
321+
# <<: *base-ci-job
322+
# name: PR - ${{ matrix.name }}
323+
# env:
324+
# <<: [*shared-ci-variables, *public-variables]
325+
# PR_CI_JOB: 1
326+
# if: github.event_name == 'pull_request'
327+
# continue-on-error: ${{ matrix.name == 'mingw-check-tidy' }}
328+
# strategy:
329+
# matrix:
330+
# include:
331+
# - name: mingw-check
332+
# <<: *job-linux-4c
333+
334+
# - name: mingw-check-tidy
335+
# <<: *job-linux-4c
336+
337+
# - name: x86_64-gnu-llvm-15
338+
# <<: *job-linux-16c
339+
340+
# - name: x86_64-gnu-tools
341+
# <<: *job-linux-16c
338342

339343
auto:
340344
<<: *base-ci-job
@@ -563,6 +567,26 @@ jobs:
563567
DIST_REQUIRE_ALL_TOOLS: 1
564568
<<: *job-macos-m1
565569

570+
# This target only needs to support 11.0 and up as nothing else supports the hardware
571+
- &aarch64-apple
572+
name: aarch64-apple
573+
env:
574+
SCRIPT: ./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin
575+
RUST_CONFIGURE_ARGS: >-
576+
--enable-sanitizers
577+
--enable-profiler
578+
--set rust.jemalloc
579+
--set llvm.ninja=false
580+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
581+
SELECT_XCODE: /Applications/Xcode_13.4.1.app
582+
USE_XCODE_CLANG: 1
583+
MACOSX_DEPLOYMENT_TARGET: 11.0
584+
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
585+
NO_LLVM_ASSERTIONS: 1
586+
NO_DEBUG_ASSERTIONS: 1
587+
NO_OVERFLOW_CHECKS: 1
588+
<<: *job-macos-m1
589+
566590
######################
567591
# Windows Builders #
568592
######################
@@ -704,11 +728,7 @@ jobs:
704728
strategy:
705729
matrix:
706730
include:
707-
- &dist-x86_64-linux
708-
name: dist-x86_64-linux
709-
env:
710-
CODEGEN_BACKENDS: llvm,cranelift
711-
<<: *job-linux-16c
731+
- <<: *aarch64-apple
712732

713733
master:
714734
name: master

src/ci/scripts/install-tidy.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# This script downloads and installs the tidy binary from Homebrew.
3+
4+
set -euo pipefail
5+
IFS=$'\n\t'
6+
7+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
8+
9+
# Only the macOS arm64/aarch64 GitHub Actions runner needs to have tidy
10+
# installed; other platforms have it preinstalled.
11+
12+
if isMacOS; then
13+
platform=$(uname -m)
14+
case $platform in
15+
x86_64)
16+
;;
17+
arm64)
18+
brew install tidy-html5
19+
;;
20+
*)
21+
echo "unsupported architecture: ${platform}"
22+
exit 1
23+
esac
24+
fi

tests/rustdoc-ui/issues/issue-107918.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// aux-build:panic-handler.rs
22
// compile-flags: --document-private-items
33
// build-pass
4+
// ignore-macos
45
// ignore-windows
56

67
#![no_std]

0 commit comments

Comments
 (0)