Skip to content

Commit 929f032

Browse files
authored
Rollup merge of rust-lang#73443 - pietroalbini:gha-auto-fallible, r=Mark-Simulacrum
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. cc rust-lang/rust-central-station#848 r? @Mark-Simulacrum
2 parents 9a82736 + 8bc3122 commit 929f032

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

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

0 commit comments

Comments
 (0)