Skip to content

Commit 8bc3122

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 d4ecf31 commit 8bc3122

File tree

2 files changed

+174
-65
lines changed

2 files changed

+174
-65
lines changed

.github/workflows/ci.yml

+129-29
Original file line numberDiff line numberDiff line change
@@ -373,35 +373,6 @@ jobs:
373373
env:
374374
DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
375375
os: ubuntu-latest-xl
376-
- name: dist-x86_64-apple
377-
env:
378-
SCRIPT: "./x.py dist"
379-
RUST_CONFIGURE_ARGS: "--target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --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-
DIST_REQUIRE_ALL_TOOLS: 1
385-
os: macos-latest
386-
- name: dist-x86_64-apple-alt
387-
env:
388-
SCRIPT: "./x.py dist"
389-
RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc"
390-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
391-
MACOSX_DEPLOYMENT_TARGET: 10.7
392-
NO_LLVM_ASSERTIONS: 1
393-
NO_DEBUG_ASSERTIONS: 1
394-
os: macos-latest
395-
- name: x86_64-apple
396-
env:
397-
SCRIPT: "./x.py test"
398-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
399-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
400-
MACOSX_DEPLOYMENT_TARGET: 10.8
401-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
402-
NO_LLVM_ASSERTIONS: 1
403-
NO_DEBUG_ASSERTIONS: 1
404-
os: macos-latest
405376
- name: x86_64-msvc-1
406377
env:
407378
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
@@ -589,6 +560,135 @@ jobs:
589560
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
590561
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
591562
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
563+
auto-fallible:
564+
name: auto-fallible
565+
env:
566+
CI_JOB_NAME: "${{ matrix.name }}"
567+
SCCACHE_BUCKET: rust-lang-gha-caches
568+
DEPLOY_BUCKET: rust-lang-gha
569+
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
570+
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
571+
TOOLSTATE_PUBLISH: 1
572+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
573+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
574+
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
575+
if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
576+
strategy:
577+
matrix:
578+
include:
579+
- name: dist-x86_64-apple
580+
env:
581+
SCRIPT: "./x.py dist"
582+
RUST_CONFIGURE_ARGS: "--target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc"
583+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
584+
MACOSX_DEPLOYMENT_TARGET: 10.7
585+
NO_LLVM_ASSERTIONS: 1
586+
NO_DEBUG_ASSERTIONS: 1
587+
DIST_REQUIRE_ALL_TOOLS: 1
588+
os: macos-latest
589+
- name: dist-x86_64-apple-alt
590+
env:
591+
SCRIPT: "./x.py dist"
592+
RUST_CONFIGURE_ARGS: "--enable-extended --enable-profiler --set rust.jemalloc"
593+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
594+
MACOSX_DEPLOYMENT_TARGET: 10.7
595+
NO_LLVM_ASSERTIONS: 1
596+
NO_DEBUG_ASSERTIONS: 1
597+
os: macos-latest
598+
- name: x86_64-apple
599+
env:
600+
SCRIPT: "./x.py test"
601+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
602+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
603+
MACOSX_DEPLOYMENT_TARGET: 10.8
604+
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
605+
NO_LLVM_ASSERTIONS: 1
606+
NO_DEBUG_ASSERTIONS: 1
607+
os: macos-latest
608+
timeout-minutes: 600
609+
runs-on: "${{ matrix.os }}"
610+
steps:
611+
- name: disable git crlf conversion
612+
run: git config --global core.autocrlf false
613+
shell: bash
614+
- name: checkout the source code
615+
uses: actions/checkout@v1
616+
with:
617+
fetch-depth: 2
618+
- name: configure GitHub Actions to kill the build when outdated
619+
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
620+
with:
621+
github_token: "${{ secrets.github_token }}"
622+
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
623+
- name: add extra environment variables
624+
run: src/ci/scripts/setup-environment.sh
625+
env:
626+
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
627+
if: success() && !env.SKIP_JOB
628+
- name: decide whether to skip this job
629+
run: src/ci/scripts/should-skip-this.sh
630+
if: success() && !env.SKIP_JOB
631+
- name: collect CPU statistics
632+
run: src/ci/scripts/collect-cpu-stats.sh
633+
if: success() && !env.SKIP_JOB
634+
- name: show the current environment
635+
run: src/ci/scripts/dump-environment.sh
636+
if: success() && !env.SKIP_JOB
637+
- name: install awscli
638+
run: src/ci/scripts/install-awscli.sh
639+
if: success() && !env.SKIP_JOB
640+
- name: install sccache
641+
run: src/ci/scripts/install-sccache.sh
642+
if: success() && !env.SKIP_JOB
643+
- name: install clang
644+
run: src/ci/scripts/install-clang.sh
645+
if: success() && !env.SKIP_JOB
646+
- name: install WIX
647+
run: src/ci/scripts/install-wix.sh
648+
if: success() && !env.SKIP_JOB
649+
- name: install InnoSetup
650+
run: src/ci/scripts/install-innosetup.sh
651+
if: success() && !env.SKIP_JOB
652+
- name: ensure the build happens on a partition with enough space
653+
run: src/ci/scripts/symlink-build-dir.sh
654+
if: success() && !env.SKIP_JOB
655+
- name: disable git crlf conversion
656+
run: src/ci/scripts/disable-git-crlf-conversion.sh
657+
if: success() && !env.SKIP_JOB
658+
- name: install MSYS2
659+
run: src/ci/scripts/install-msys2.sh
660+
if: success() && !env.SKIP_JOB
661+
- name: install MinGW
662+
run: src/ci/scripts/install-mingw.sh
663+
if: success() && !env.SKIP_JOB
664+
- name: install ninja
665+
run: src/ci/scripts/install-ninja.sh
666+
if: success() && !env.SKIP_JOB
667+
- name: enable ipv6 on Docker
668+
run: src/ci/scripts/enable-docker-ipv6.sh
669+
if: success() && !env.SKIP_JOB
670+
- name: disable git crlf conversion
671+
run: src/ci/scripts/disable-git-crlf-conversion.sh
672+
if: success() && !env.SKIP_JOB
673+
- name: checkout submodules
674+
run: src/ci/scripts/checkout-submodules.sh
675+
if: success() && !env.SKIP_JOB
676+
- name: ensure line endings are correct
677+
run: src/ci/scripts/verify-line-endings.sh
678+
if: success() && !env.SKIP_JOB
679+
- name: run the build
680+
run: src/ci/scripts/run-build-from-ci.sh
681+
env:
682+
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
683+
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
684+
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
685+
if: success() && !env.SKIP_JOB
686+
- name: upload artifacts to S3
687+
run: src/ci/scripts/upload-artifacts.sh
688+
env:
689+
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
690+
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
691+
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
592692
master:
593693
name: master
594694
runs-on: ubuntu-latest

src/ci/github-actions/ci.yml

+45-36
Original file line numberDiff line numberDiff line change
@@ -419,42 +419,6 @@ jobs:
419419
DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
420420
<<: *job-linux-xl
421421

422-
####################
423-
# macOS Builders #
424-
####################
425-
426-
- name: dist-x86_64-apple
427-
env:
428-
SCRIPT: ./x.py dist
429-
RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc
430-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
431-
MACOSX_DEPLOYMENT_TARGET: 10.7
432-
NO_LLVM_ASSERTIONS: 1
433-
NO_DEBUG_ASSERTIONS: 1
434-
DIST_REQUIRE_ALL_TOOLS: 1
435-
<<: *job-macos-xl
436-
437-
- name: dist-x86_64-apple-alt
438-
env:
439-
SCRIPT: ./x.py dist
440-
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc
441-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
442-
MACOSX_DEPLOYMENT_TARGET: 10.7
443-
NO_LLVM_ASSERTIONS: 1
444-
NO_DEBUG_ASSERTIONS: 1
445-
<<: *job-macos-xl
446-
447-
- name: x86_64-apple
448-
env:
449-
SCRIPT: ./x.py test
450-
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
451-
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
452-
MACOSX_DEPLOYMENT_TARGET: 10.8
453-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
454-
NO_LLVM_ASSERTIONS: 1
455-
NO_DEBUG_ASSERTIONS: 1
456-
<<: *job-macos-xl
457-
458422
######################
459423
# Windows Builders #
460424
######################
@@ -606,6 +570,51 @@ jobs:
606570
SCRIPT: python x.py dist
607571
<<: *job-windows-xl
608572

573+
auto-fallible:
574+
<<: *base-ci-job
575+
name: auto-fallible
576+
env:
577+
<<: [*shared-ci-variables, *prod-variables]
578+
if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
579+
strategy:
580+
matrix:
581+
include:
582+
####################
583+
# macOS Builders #
584+
####################
585+
586+
- name: dist-x86_64-apple
587+
env:
588+
SCRIPT: ./x.py dist
589+
RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc
590+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
591+
MACOSX_DEPLOYMENT_TARGET: 10.7
592+
NO_LLVM_ASSERTIONS: 1
593+
NO_DEBUG_ASSERTIONS: 1
594+
DIST_REQUIRE_ALL_TOOLS: 1
595+
<<: *job-macos-xl
596+
597+
- name: dist-x86_64-apple-alt
598+
env:
599+
SCRIPT: ./x.py dist
600+
RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc
601+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
602+
MACOSX_DEPLOYMENT_TARGET: 10.7
603+
NO_LLVM_ASSERTIONS: 1
604+
NO_DEBUG_ASSERTIONS: 1
605+
<<: *job-macos-xl
606+
607+
- name: x86_64-apple
608+
env:
609+
SCRIPT: ./x.py test
610+
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc
611+
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
612+
MACOSX_DEPLOYMENT_TARGET: 10.8
613+
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
614+
NO_LLVM_ASSERTIONS: 1
615+
NO_DEBUG_ASSERTIONS: 1
616+
<<: *job-macos-xl
617+
609618
master:
610619
name: master
611620
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)