Skip to content

Commit 3c126b6

Browse files
committed
Auto merge of rust-lang#116368 - shepmaster:github-actions-m1, r=<try>
Use GitHub Actions M1 builder for aarch64-apple-darwin r? `@ghost`
2 parents 2e5a9dd + b33f89c commit 3c126b6

File tree

2 files changed

+64
-171
lines changed

2 files changed

+64
-171
lines changed

.github/workflows/ci.yml

+25-131
Original file line numberDiff line numberDiff line change
@@ -34,130 +34,6 @@ concurrency:
3434
group: "${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}"
3535
cancel-in-progress: true
3636
jobs:
37-
pr:
38-
name: "PR - ${{ matrix.name }}"
39-
env:
40-
PR_CI_JOB: 1
41-
CI_JOB_NAME: "${{ matrix.name }}"
42-
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
43-
HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
44-
SCCACHE_BUCKET: rust-lang-ci-sccache2
45-
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
46-
CACHE_DOMAIN: ci-caches.rust-lang.org
47-
if: "github.event_name == 'pull_request'"
48-
continue-on-error: "${{ matrix.name == 'mingw-check-tidy' }}"
49-
strategy:
50-
matrix:
51-
include:
52-
- name: mingw-check
53-
os: ubuntu-20.04-4core-16gb
54-
env: {}
55-
- name: mingw-check-tidy
56-
os: ubuntu-20.04-4core-16gb
57-
env: {}
58-
- name: x86_64-gnu-llvm-15
59-
os: ubuntu-20.04-16core-64gb
60-
env: {}
61-
- name: x86_64-gnu-tools
62-
os: ubuntu-20.04-16core-64gb
63-
env: {}
64-
timeout-minutes: 600
65-
runs-on: "${{ matrix.os }}"
66-
steps:
67-
- name: disable git crlf conversion
68-
run: git config --global core.autocrlf false
69-
- name: checkout the source code
70-
uses: actions/checkout@v4
71-
with:
72-
fetch-depth: 2
73-
- name: configure the PR in which the error message will be posted
74-
run: "echo \"[CI_PR_NUMBER=$num]\""
75-
env:
76-
num: "${{ github.event.number }}"
77-
if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
78-
- name: add extra environment variables
79-
run: src/ci/scripts/setup-environment.sh
80-
env:
81-
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
82-
if: success() && !env.SKIP_JOB
83-
- name: decide whether to skip this job
84-
run: src/ci/scripts/should-skip-this.sh
85-
if: success() && !env.SKIP_JOB
86-
- name: ensure the channel matches the target branch
87-
run: src/ci/scripts/verify-channel.sh
88-
if: success() && !env.SKIP_JOB
89-
- name: collect CPU statistics
90-
run: src/ci/scripts/collect-cpu-stats.sh
91-
if: success() && !env.SKIP_JOB
92-
- name: show the current environment
93-
run: src/ci/scripts/dump-environment.sh
94-
if: success() && !env.SKIP_JOB
95-
- name: install sccache
96-
run: src/ci/scripts/install-sccache.sh
97-
if: success() && !env.SKIP_JOB
98-
- name: select Xcode
99-
run: src/ci/scripts/select-xcode.sh
100-
if: success() && !env.SKIP_JOB
101-
- name: install clang
102-
run: src/ci/scripts/install-clang.sh
103-
if: success() && !env.SKIP_JOB
104-
- name: install WIX
105-
run: src/ci/scripts/install-wix.sh
106-
if: success() && !env.SKIP_JOB
107-
- name: disable git crlf conversion
108-
run: src/ci/scripts/disable-git-crlf-conversion.sh
109-
if: success() && !env.SKIP_JOB
110-
- name: checkout submodules
111-
run: src/ci/scripts/checkout-submodules.sh
112-
if: success() && !env.SKIP_JOB
113-
- name: install MSYS2
114-
run: src/ci/scripts/install-msys2.sh
115-
if: success() && !env.SKIP_JOB
116-
- name: install MinGW
117-
run: src/ci/scripts/install-mingw.sh
118-
if: success() && !env.SKIP_JOB
119-
- name: install ninja
120-
run: src/ci/scripts/install-ninja.sh
121-
if: success() && !env.SKIP_JOB
122-
- name: enable ipv6 on Docker
123-
run: src/ci/scripts/enable-docker-ipv6.sh
124-
if: success() && !env.SKIP_JOB
125-
- name: disable git crlf conversion
126-
run: src/ci/scripts/disable-git-crlf-conversion.sh
127-
if: success() && !env.SKIP_JOB
128-
- name: ensure line endings are correct
129-
run: src/ci/scripts/verify-line-endings.sh
130-
if: success() && !env.SKIP_JOB
131-
- name: ensure backported commits are in upstream branches
132-
run: src/ci/scripts/verify-backported-commits.sh
133-
if: success() && !env.SKIP_JOB
134-
- name: ensure the stable version number is correct
135-
run: src/ci/scripts/verify-stable-version-number.sh
136-
if: success() && !env.SKIP_JOB
137-
- name: run the build
138-
run: src/ci/scripts/run-build-from-ci.sh
139-
env:
140-
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
141-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
142-
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
143-
if: success() && !env.SKIP_JOB
144-
- name: create github artifacts
145-
run: src/ci/scripts/create-doc-artifacts.sh
146-
if: success() && !env.SKIP_JOB
147-
- name: upload artifacts to github
148-
uses: actions/upload-artifact@v3
149-
with:
150-
name: "${{ env.DOC_ARTIFACT_NAME }}"
151-
path: obj/artifacts/doc
152-
if-no-files-found: ignore
153-
retention-days: 5
154-
if: success() && !env.SKIP_JOB
155-
- name: upload artifacts to S3
156-
run: src/ci/scripts/upload-artifacts.sh
157-
env:
158-
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
159-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
160-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
16137
auto:
16238
name: "auto - ${{ matrix.name }}"
16339
env:
@@ -347,8 +223,8 @@ jobs:
347223
os: macos-13
348224
- name: dist-aarch64-apple
349225
env:
350-
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
351-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc --set llvm.ninja=false"
226+
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
227+
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
352228
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
353229
SELECT_XCODE: /Applications/Xcode_13.4.1.app
354230
USE_XCODE_CLANG: 1
@@ -358,8 +234,7 @@ jobs:
358234
NO_DEBUG_ASSERTIONS: 1
359235
NO_OVERFLOW_CHECKS: 1
360236
DIST_REQUIRE_ALL_TOOLS: 1
361-
JEMALLOC_SYS_WITH_LG_PAGE: 14
362-
os: macos-13
237+
os: macos-13-xlarge
363238
- name: x86_64-msvc
364239
env:
365240
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
@@ -432,6 +307,10 @@ jobs:
432307
timeout-minutes: 600
433308
runs-on: "${{ matrix.os }}"
434309
steps:
310+
- name: HACK --- Install AWS
311+
run: "curl \"https://awscli.amazonaws.com/AWSCLIV2.pkg\" -o \"AWSCLIV2.pkg\"\nsudo installer -pkg AWSCLIV2.pkg -target /\n"
312+
- name: HACK --- Check AWS
313+
run: aws --version
435314
- name: disable git crlf conversion
436315
run: git config --global core.autocrlf false
437316
- name: checkout the source code
@@ -546,12 +425,27 @@ jobs:
546425
strategy:
547426
matrix:
548427
include:
549-
- name: dist-x86_64-linux
550-
os: ubuntu-20.04-16core-64gb
551-
env: {}
428+
- name: dist-aarch64-apple
429+
env:
430+
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin"
431+
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
432+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
433+
SELECT_XCODE: /Applications/Xcode_13.4.1.app
434+
USE_XCODE_CLANG: 1
435+
MACOSX_DEPLOYMENT_TARGET: 11.0
436+
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
437+
NO_LLVM_ASSERTIONS: 1
438+
NO_DEBUG_ASSERTIONS: 1
439+
NO_OVERFLOW_CHECKS: 1
440+
DIST_REQUIRE_ALL_TOOLS: 1
441+
os: macos-13-xlarge
552442
timeout-minutes: 600
553443
runs-on: "${{ matrix.os }}"
554444
steps:
445+
- name: HACK --- Install AWS
446+
run: "curl \"https://awscli.amazonaws.com/AWSCLIV2.pkg\" -o \"AWSCLIV2.pkg\"\nsudo installer -pkg AWSCLIV2.pkg -target /\n"
447+
- name: HACK --- Check AWS
448+
run: aws --version
555449
- name: disable git crlf conversion
556450
run: git config --global core.autocrlf false
557451
- name: checkout the source code

src/ci/github-actions/ci.yml

+39-40
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ x--expand-yaml-anchors--remove:
9191
os: macos-13 # We use the standard runner for now
9292
<<: *base-job
9393

94+
- &job-macos-m1
95+
os: macos-13-xlarge
96+
<<: *base-job
97+
9498
- &job-windows-8c
9599
os: windows-2019-8core-32gb
96100
<<: *base-job
@@ -110,6 +114,14 @@ x--expand-yaml-anchors--remove:
110114
runs-on: "${{ matrix.os }}"
111115
env: *shared-ci-variables
112116
steps:
117+
- name: "HACK --- Install AWS"
118+
run: |
119+
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
120+
sudo installer -pkg AWSCLIV2.pkg -target /
121+
122+
- name: "HACK --- Check AWS"
123+
run: aws --version
124+
113125
- name: disable git crlf conversion
114126
run: git config --global core.autocrlf false
115127

@@ -304,28 +316,28 @@ concurrency:
304316
cancel-in-progress: true
305317

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

330342
auto:
331343
<<: *base-ci-job
@@ -523,17 +535,14 @@ jobs:
523535
<<: *job-macos-xl
524536

525537
# This target only needs to support 11.0 and up as nothing else supports the hardware
526-
- name: dist-aarch64-apple
538+
- &dist-aarch64-apple
539+
name: dist-aarch64-apple
527540
env:
528-
SCRIPT: ./x.py dist bootstrap --include-default-paths --stage 2
541+
SCRIPT: ./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin
529542
RUST_CONFIGURE_ARGS: >-
530-
--build=x86_64-apple-darwin
531-
--host=aarch64-apple-darwin
532-
--target=aarch64-apple-darwin
533543
--enable-full-tools
534544
--enable-sanitizers
535545
--enable-profiler
536-
--disable-docs
537546
--set rust.jemalloc
538547
--set llvm.ninja=false
539548
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
@@ -545,15 +554,7 @@ jobs:
545554
NO_DEBUG_ASSERTIONS: 1
546555
NO_OVERFLOW_CHECKS: 1
547556
DIST_REQUIRE_ALL_TOOLS: 1
548-
# Corresponds to 16K page size
549-
#
550-
# Shouldn't be needed if jemalloc-sys is updated to
551-
# handle this platform like iOS or if we build on
552-
# aarch64-apple-darwin itself.
553-
#
554-
# https://github.com/gnzlbg/jemallocator/blob/c27a859e98e3cb790dc269773d9da71a1e918458/jemalloc-sys/build.rs#L237
555-
JEMALLOC_SYS_WITH_LG_PAGE: 14
556-
<<: *job-macos-xl
557+
<<: *job-macos-m1
557558

558559
######################
559560
# Windows Builders #
@@ -695,9 +696,7 @@ jobs:
695696
strategy:
696697
matrix:
697698
include:
698-
- &dist-x86_64-linux
699-
name: dist-x86_64-linux
700-
<<: *job-linux-16c
699+
- <<: *dist-aarch64-apple
701700

702701
master:
703702
name: master

0 commit comments

Comments
 (0)