Skip to content

Commit 34994a9

Browse files
committed
ci: allow gating gha on everything but macOS
In our GitHub Actions setup macOS is too unreliable to gate on it, but the other builders work fine. This commit splits the macOS builders into a separate job (called auto-fallible), allowing us to gate on the auto job without failing due to macOS spurious failures.
1 parent 0c03aee commit 34994a9

File tree

2 files changed

+171
-65
lines changed

2 files changed

+171
-65
lines changed

.github/workflows/ci.yml

+126-29
Original file line numberDiff line numberDiff line change
@@ -363,35 +363,6 @@ jobs:
363363
env:
364364
DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
365365
os: ubuntu-latest-xl
366-
- name: dist-x86_64-apple
367-
env:
368-
SCRIPT: "./x.py dist"
369-
RUST_CONFIGURE_ARGS: "--target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc"
370-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
371-
MACOSX_DEPLOYMENT_TARGET: 10.7
372-
NO_LLVM_ASSERTIONS: 1
373-
NO_DEBUG_ASSERTIONS: 1
374-
DIST_REQUIRE_ALL_TOOLS: 1
375-
os: macos-latest
376-
- name: dist-x86_64-apple-alt
377-
env:
378-
SCRIPT: "./x.py dist"
379-
RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc"
380-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
381-
MACOSX_DEPLOYMENT_TARGET: 10.7
382-
NO_LLVM_ASSERTIONS: 1
383-
NO_DEBUG_ASSERTIONS: 1
384-
os: macos-latest
385-
- name: x86_64-apple
386-
env:
387-
SCRIPT: "./x.py test"
388-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
389-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
390-
MACOSX_DEPLOYMENT_TARGET: 10.8
391-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
392-
NO_LLVM_ASSERTIONS: 1
393-
NO_DEBUG_ASSERTIONS: 1
394-
os: macos-latest
395366
- name: x86_64-msvc-1
396367
env:
397368
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
@@ -571,6 +542,132 @@ jobs:
571542
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
572543
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
573544
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
545+
auto-fallible:
546+
name: auto-fallible
547+
env:
548+
CI_JOB_NAME: "${{ matrix.name }}"
549+
SCCACHE_BUCKET: rust-lang-gha-caches
550+
DEPLOY_BUCKET: rust-lang-gha
551+
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
552+
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
553+
TOOLSTATE_PUBLISH: 1
554+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
555+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
556+
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
557+
if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
558+
strategy:
559+
matrix:
560+
include:
561+
- name: dist-x86_64-apple
562+
env:
563+
SCRIPT: "./x.py dist"
564+
RUST_CONFIGURE_ARGS: "--target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc"
565+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
566+
MACOSX_DEPLOYMENT_TARGET: 10.7
567+
NO_LLVM_ASSERTIONS: 1
568+
NO_DEBUG_ASSERTIONS: 1
569+
DIST_REQUIRE_ALL_TOOLS: 1
570+
os: macos-latest
571+
- name: dist-x86_64-apple-alt
572+
env:
573+
SCRIPT: "./x.py dist"
574+
RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc"
575+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
576+
MACOSX_DEPLOYMENT_TARGET: 10.7
577+
NO_LLVM_ASSERTIONS: 1
578+
NO_DEBUG_ASSERTIONS: 1
579+
os: macos-latest
580+
- name: x86_64-apple
581+
env:
582+
SCRIPT: "./x.py test"
583+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
584+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
585+
MACOSX_DEPLOYMENT_TARGET: 10.8
586+
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
587+
NO_LLVM_ASSERTIONS: 1
588+
NO_DEBUG_ASSERTIONS: 1
589+
os: macos-latest
590+
timeout-minutes: 600
591+
runs-on: "${{ matrix.os }}"
592+
steps:
593+
- name: disable git crlf conversion
594+
run: git config --global core.autocrlf false
595+
shell: bash
596+
- name: checkout the source code
597+
uses: actions/checkout@v1
598+
with:
599+
fetch-depth: 2
600+
- name: configure GitHub Actions to kill the build when outdated
601+
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
602+
with:
603+
github_token: "${{ secrets.github_token }}"
604+
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
605+
- name: add extra environment variables
606+
run: src/ci/scripts/setup-environment.sh
607+
env:
608+
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
609+
if: success() && !env.SKIP_JOB
610+
- name: decide whether to skip this job
611+
run: src/ci/scripts/should-skip-this.sh
612+
if: success() && !env.SKIP_JOB
613+
- name: collect CPU statistics
614+
run: src/ci/scripts/collect-cpu-stats.sh
615+
if: success() && !env.SKIP_JOB
616+
- name: show the current environment
617+
run: src/ci/scripts/dump-environment.sh
618+
if: success() && !env.SKIP_JOB
619+
- name: install awscli
620+
run: src/ci/scripts/install-awscli.sh
621+
if: success() && !env.SKIP_JOB
622+
- name: install sccache
623+
run: src/ci/scripts/install-sccache.sh
624+
if: success() && !env.SKIP_JOB
625+
- name: install clang
626+
run: src/ci/scripts/install-clang.sh
627+
if: success() && !env.SKIP_JOB
628+
- name: install WIX
629+
run: src/ci/scripts/install-wix.sh
630+
if: success() && !env.SKIP_JOB
631+
- name: ensure the build happens on a partition with enough space
632+
run: src/ci/scripts/symlink-build-dir.sh
633+
if: success() && !env.SKIP_JOB
634+
- name: disable git crlf conversion
635+
run: src/ci/scripts/disable-git-crlf-conversion.sh
636+
if: success() && !env.SKIP_JOB
637+
- name: install MSYS2
638+
run: src/ci/scripts/install-msys2.sh
639+
if: success() && !env.SKIP_JOB
640+
- name: install MinGW
641+
run: src/ci/scripts/install-mingw.sh
642+
if: success() && !env.SKIP_JOB
643+
- name: install ninja
644+
run: src/ci/scripts/install-ninja.sh
645+
if: success() && !env.SKIP_JOB
646+
- name: enable ipv6 on Docker
647+
run: src/ci/scripts/enable-docker-ipv6.sh
648+
if: success() && !env.SKIP_JOB
649+
- name: disable git crlf conversion
650+
run: src/ci/scripts/disable-git-crlf-conversion.sh
651+
if: success() && !env.SKIP_JOB
652+
- name: checkout submodules
653+
run: src/ci/scripts/checkout-submodules.sh
654+
if: success() && !env.SKIP_JOB
655+
- name: ensure line endings are correct
656+
run: src/ci/scripts/verify-line-endings.sh
657+
if: success() && !env.SKIP_JOB
658+
- name: run the build
659+
run: src/ci/scripts/run-build-from-ci.sh
660+
env:
661+
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
662+
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
663+
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
664+
if: success() && !env.SKIP_JOB
665+
- name: upload artifacts to S3
666+
run: src/ci/scripts/upload-artifacts.sh
667+
env:
668+
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
669+
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
670+
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
574671
master:
575672
name: master
576673
runs-on: ubuntu-latest

src/ci/github-actions/ci.yml

+45-36
Original file line numberDiff line numberDiff line change
@@ -410,42 +410,6 @@ jobs:
410410
DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
411411
<<: *job-linux-xl
412412

413-
####################
414-
# macOS Builders #
415-
####################
416-
417-
- name: dist-x86_64-apple
418-
env:
419-
SCRIPT: ./x.py dist
420-
RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc
421-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
422-
MACOSX_DEPLOYMENT_TARGET: 10.7
423-
NO_LLVM_ASSERTIONS: 1
424-
NO_DEBUG_ASSERTIONS: 1
425-
DIST_REQUIRE_ALL_TOOLS: 1
426-
<<: *job-macos-xl
427-
428-
- name: dist-x86_64-apple-alt
429-
env:
430-
SCRIPT: ./x.py dist
431-
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc
432-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
433-
MACOSX_DEPLOYMENT_TARGET: 10.7
434-
NO_LLVM_ASSERTIONS: 1
435-
NO_DEBUG_ASSERTIONS: 1
436-
<<: *job-macos-xl
437-
438-
- name: x86_64-apple
439-
env:
440-
SCRIPT: ./x.py test
441-
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
442-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
443-
MACOSX_DEPLOYMENT_TARGET: 10.8
444-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
445-
NO_LLVM_ASSERTIONS: 1
446-
NO_DEBUG_ASSERTIONS: 1
447-
<<: *job-macos-xl
448-
449413
######################
450414
# Windows Builders #
451415
######################
@@ -591,6 +555,51 @@ jobs:
591555
SCRIPT: python x.py dist
592556
<<: *job-windows-xl
593557

558+
auto-fallible:
559+
<<: *base-ci-job
560+
name: auto-fallible
561+
env:
562+
<<: [*shared-ci-variables, *prod-variables]
563+
if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
564+
strategy:
565+
matrix:
566+
include:
567+
####################
568+
# macOS Builders #
569+
####################
570+
571+
- name: dist-x86_64-apple
572+
env:
573+
SCRIPT: ./x.py dist
574+
RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc
575+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
576+
MACOSX_DEPLOYMENT_TARGET: 10.7
577+
NO_LLVM_ASSERTIONS: 1
578+
NO_DEBUG_ASSERTIONS: 1
579+
DIST_REQUIRE_ALL_TOOLS: 1
580+
<<: *job-macos-xl
581+
582+
- name: dist-x86_64-apple-alt
583+
env:
584+
SCRIPT: ./x.py dist
585+
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc
586+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
587+
MACOSX_DEPLOYMENT_TARGET: 10.7
588+
NO_LLVM_ASSERTIONS: 1
589+
NO_DEBUG_ASSERTIONS: 1
590+
<<: *job-macos-xl
591+
592+
- name: x86_64-apple
593+
env:
594+
SCRIPT: ./x.py test
595+
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
596+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
597+
MACOSX_DEPLOYMENT_TARGET: 10.8
598+
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
599+
NO_LLVM_ASSERTIONS: 1
600+
NO_DEBUG_ASSERTIONS: 1
601+
<<: *job-macos-xl
602+
594603
master:
595604
name: master
596605
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)