@@ -28,6 +28,7 @@ name: CI
2828      - " **" 
2929permissions :
3030  contents : read 
31+   packages : write 
3132defaults :
3233  run :
3334    shell : bash 
4243      CI_JOB_NAME : " ${{ matrix.name }}" 
4344      CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse 
4445      HEAD_SHA : " ${{ github.event.pull_request.head.sha || github.sha }}" 
46+       DOCKER_TOKEN : " ${{ secrets.GITHUB_TOKEN }}" 
4547      SCCACHE_BUCKET : rust-lang-ci-sccache2 
4648      TOOLSTATE_REPO : " https://github.com/rust-lang-nursery/rust-toolstate" 
4749      CACHE_DOMAIN : ci-caches.rust-lang.org 
@@ -56,16 +58,27 @@ jobs:
5658          - name : mingw-check-tidy 
5759            os : ubuntu-20.04-4core-16gb 
5860            env : {} 
59-           - name : x86_64-gnu-llvm-16  
61+           - name : x86_64-gnu-llvm-17  
6062            env :
6163              ENABLE_GCC_CODEGEN : " 1" 
6264            os : ubuntu-20.04-16core-64gb 
6365          - name : x86_64-gnu-tools 
6466            os : ubuntu-20.04-16core-64gb 
6567            env : {} 
68+     defaults :
69+       run :
70+         shell : " ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}" 
6671    timeout-minutes : 600 
6772    runs-on : " ${{ matrix.os }}" 
6873    steps :
74+       - if : " contains(matrix.os, 'windows')" 
75+         uses : msys2/setup-msys2@v2.22.0 
76+         with :
77+           msystem : " ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}" 
78+           update : false 
79+           release : true 
80+           path-type : inherit 
81+           install : " make dos2unix diffutils\n " 
6982      - name : disable git crlf conversion 
7083        run : git config --global core.autocrlf false 
7184      - name : checkout the source code 
@@ -143,7 +156,7 @@ jobs:
143156        run : src/ci/scripts/verify-stable-version-number.sh 
144157        if : success() && !env.SKIP_JOB 
145158      - name : run the build 
146-         run : src/ci/scripts/run-build-from-ci.sh 
159+         run : src/ci/scripts/run-build-from-ci.sh 2>&1  
147160        env :
148161          AWS_ACCESS_KEY_ID : " ${{ env.CACHES_AWS_ACCESS_KEY_ID }}" 
149162          AWS_SECRET_ACCESS_KEY : " ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}" 
@@ -153,7 +166,7 @@ jobs:
153166        run : src/ci/scripts/create-doc-artifacts.sh 
154167        if : success() && !env.SKIP_JOB 
155168      - name : upload artifacts to github 
156-         uses : actions/upload-artifact@v3  
169+         uses : actions/upload-artifact@v4  
157170        with :
158171          name : " ${{ env.DOC_ARTIFACT_NAME }}" 
159172          path : obj/artifacts/doc 
@@ -172,6 +185,7 @@ jobs:
172185      CI_JOB_NAME : " ${{ matrix.name }}" 
173186      CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse 
174187      HEAD_SHA : " ${{ github.event.pull_request.head.sha || github.sha }}" 
188+       DOCKER_TOKEN : " ${{ secrets.GITHUB_TOKEN }}" 
175189      SCCACHE_BUCKET : rust-lang-ci-sccache2 
176190      DEPLOY_BUCKET : rust-lang-ci2 
177191      TOOLSTATE_REPO : " https://github.com/rust-lang-nursery/rust-toolstate" 
@@ -221,6 +235,9 @@ jobs:
221235          - name : dist-loongarch64-linux 
222236            os : ubuntu-20.04-8core-32gb 
223237            env : {} 
238+           - name : dist-ohos 
239+             os : ubuntu-20.04-8core-32gb 
240+             env : {} 
224241          - name : dist-powerpc-linux 
225242            os : ubuntu-20.04-8core-32gb 
226243            env : {} 
@@ -291,18 +308,18 @@ jobs:
291308          - name : x86_64-gnu-integration 
292309            env :
293310              CI_ONLY_WHEN_CHANNEL : nightly 
294-             os : ubuntu-20.04-16core-64gb  
311+             os : ubuntu-20.04-8core-32gb  
295312          - name : x86_64-gnu-debug 
296313            os : ubuntu-20.04-8core-32gb 
297314            env : {} 
298315          - name : x86_64-gnu-distcheck 
299316            os : ubuntu-20.04-8core-32gb 
300317            env : {} 
301-           - name : x86_64-gnu-llvm-17  
318+           - name : x86_64-gnu-llvm-18  
302319            env :
303320              RUST_BACKTRACE : 1 
304321            os : ubuntu-20.04-8core-32gb 
305-           - name : x86_64-gnu-llvm-16  
322+           - name : x86_64-gnu-llvm-17  
306323            env :
307324              RUST_BACKTRACE : 1 
308325            os : ubuntu-20.04-8core-32gb 
@@ -316,10 +333,10 @@ jobs:
316333          - name : dist-x86_64-apple 
317334            env :
318335              SCRIPT : " ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin" 
319-               RUST_CONFIGURE_ARGS : " --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false  --set rust.lto=thin " 
336+               RUST_CONFIGURE_ARGS : " --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin  --set rust.codegen-units=1 " 
320337              RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
321338              MACOSX_DEPLOYMENT_TARGET : 10.12 
322-               SELECT_XCODE : /Applications/Xcode_13.4 .1.app 
339+               SELECT_XCODE : /Applications/Xcode_14.3 .1.app 
323340              NO_LLVM_ASSERTIONS : 1 
324341              NO_DEBUG_ASSERTIONS : 1 
325342              NO_OVERFLOW_CHECKS : 1 
@@ -329,51 +346,65 @@ jobs:
329346          - name : dist-apple-various 
330347            env :
331348              SCRIPT : " ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim" 
332-               RUST_CONFIGURE_ARGS : " --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false " 
349+               RUST_CONFIGURE_ARGS : " --enable-sanitizers --enable-profiler --set rust.jemalloc" 
333350              RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
334351              MACOSX_DEPLOYMENT_TARGET : 10.12 
335-               SELECT_XCODE : /Applications/Xcode_13.4 .1.app 
352+               SELECT_XCODE : /Applications/Xcode_14.3 .1.app 
336353              NO_LLVM_ASSERTIONS : 1 
337354              NO_DEBUG_ASSERTIONS : 1 
338355              NO_OVERFLOW_CHECKS : 1 
339356            os : macos-13 
340357          - name : x86_64-apple-1 
341358            env :
342359              SCRIPT : " ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps" 
343-               RUST_CONFIGURE_ARGS : " --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false " 
360+               RUST_CONFIGURE_ARGS : " --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc" 
344361              RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
345362              MACOSX_DEPLOYMENT_TARGET : 10.12 
346363              MACOSX_STD_DEPLOYMENT_TARGET : 10.12 
364+               SELECT_XCODE : /Applications/Xcode_14.3.1.app 
347365              NO_LLVM_ASSERTIONS : 1 
348366              NO_DEBUG_ASSERTIONS : 1 
349367              NO_OVERFLOW_CHECKS : 1 
350368            os : macos-13 
351369          - name : x86_64-apple-2 
352370            env :
353371              SCRIPT : " ./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps" 
354-               RUST_CONFIGURE_ARGS : " --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false " 
372+               RUST_CONFIGURE_ARGS : " --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc" 
355373              RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
356374              MACOSX_DEPLOYMENT_TARGET : 10.12 
357375              MACOSX_STD_DEPLOYMENT_TARGET : 10.12 
376+               SELECT_XCODE : /Applications/Xcode_14.3.1.app 
358377              NO_LLVM_ASSERTIONS : 1 
359378              NO_DEBUG_ASSERTIONS : 1 
360379              NO_OVERFLOW_CHECKS : 1 
361380            os : macos-13 
362381          - name : dist-aarch64-apple 
363382            env :
364-               SCRIPT : " ./x.py dist bootstrap --include-default-paths --stage 2 " 
365-               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" 
383+               SCRIPT : " ./x.py dist bootstrap --include-default-paths --host=aarch64-apple-darwin --target=aarch64-apple-darwin " 
384+               RUST_CONFIGURE_ARGS : " --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin " 
366385              RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
367-               SELECT_XCODE : /Applications/Xcode_13.4 .1.app 
386+               SELECT_XCODE : /Applications/Xcode_14.3 .1.app 
368387              USE_XCODE_CLANG : 1 
369388              MACOSX_DEPLOYMENT_TARGET : 11.0 
370389              MACOSX_STD_DEPLOYMENT_TARGET : 11.0 
371390              NO_LLVM_ASSERTIONS : 1 
372391              NO_DEBUG_ASSERTIONS : 1 
373392              NO_OVERFLOW_CHECKS : 1 
374393              DIST_REQUIRE_ALL_TOOLS : 1 
375-               JEMALLOC_SYS_WITH_LG_PAGE : 14 
376-             os : macos-13 
394+             os : macos-14 
395+           - name : aarch64-apple 
396+             env :
397+               SCRIPT : " ./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin" 
398+               RUST_CONFIGURE_ARGS : " --enable-sanitizers --enable-profiler --set rust.jemalloc" 
399+               RUSTC_RETRY_LINKER_ON_SEGFAULT : 1 
400+               SELECT_XCODE : /Applications/Xcode_14.3.1.app 
401+               USE_XCODE_CLANG : 1 
402+               MACOSX_DEPLOYMENT_TARGET : 11.0 
403+               MACOSX_STD_DEPLOYMENT_TARGET : 11.0 
404+               NO_LLVM_ASSERTIONS : 1 
405+               NO_DEBUG_ASSERTIONS : 1 
406+               NO_OVERFLOW_CHECKS : 1 
407+             os : macos-14 
377408          - name : x86_64-msvc 
378409            env :
379410              RUST_CONFIGURE_ARGS : " --build=x86_64-pc-windows-msvc --enable-profiler" 
@@ -407,7 +438,7 @@ jobs:
407438            os : windows-2019-8core-32gb 
408439          - name : dist-x86_64-msvc 
409440            env :
410-               RUST_CONFIGURE_ARGS : " --build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler" 
441+               RUST_CONFIGURE_ARGS : " --build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1 " 
411442              SCRIPT : python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths 
412443              DIST_REQUIRE_ALL_TOOLS : 1 
413444            os : windows-2019-8core-32gb 
@@ -444,9 +475,20 @@ jobs:
444475              RUST_CONFIGURE_ARGS : " --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler" 
445476              SCRIPT : python x.py dist bootstrap --include-default-paths 
446477            os : windows-2019-8core-32gb 
478+     defaults :
479+       run :
480+         shell : " ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}" 
447481    timeout-minutes : 600 
448482    runs-on : " ${{ matrix.os }}" 
449483    steps :
484+       - if : " contains(matrix.os, 'windows')" 
485+         uses : msys2/setup-msys2@v2.22.0 
486+         with :
487+           msystem : " ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}" 
488+           update : false 
489+           release : true 
490+           path-type : inherit 
491+           install : " make dos2unix diffutils\n " 
450492      - name : disable git crlf conversion 
451493        run : git config --global core.autocrlf false 
452494      - name : checkout the source code 
@@ -524,7 +566,7 @@ jobs:
524566        run : src/ci/scripts/verify-stable-version-number.sh 
525567        if : success() && !env.SKIP_JOB 
526568      - name : run the build 
527-         run : src/ci/scripts/run-build-from-ci.sh 
569+         run : src/ci/scripts/run-build-from-ci.sh 2>&1  
528570        env :
529571          AWS_ACCESS_KEY_ID : " ${{ env.CACHES_AWS_ACCESS_KEY_ID }}" 
530572          AWS_SECRET_ACCESS_KEY : " ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}" 
@@ -534,7 +576,7 @@ jobs:
534576        run : src/ci/scripts/create-doc-artifacts.sh 
535577        if : success() && !env.SKIP_JOB 
536578      - name : upload artifacts to github 
537-         uses : actions/upload-artifact@v3  
579+         uses : actions/upload-artifact@v4  
538580        with :
539581          name : " ${{ env.DOC_ARTIFACT_NAME }}" 
540582          path : obj/artifacts/doc 
@@ -554,6 +596,7 @@ jobs:
554596      CI_JOB_NAME : " ${{ matrix.name }}" 
555597      CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse 
556598      HEAD_SHA : " ${{ github.event.pull_request.head.sha || github.sha }}" 
599+       DOCKER_TOKEN : " ${{ secrets.GITHUB_TOKEN }}" 
557600      SCCACHE_BUCKET : rust-lang-ci-sccache2 
558601      DEPLOY_BUCKET : rust-lang-ci2 
559602      TOOLSTATE_REPO : " https://github.com/rust-lang-nursery/rust-toolstate" 
@@ -571,9 +614,20 @@ jobs:
571614            env :
572615              CODEGEN_BACKENDS : " llvm,cranelift" 
573616            os : ubuntu-20.04-16core-64gb 
617+     defaults :
618+       run :
619+         shell : " ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}" 
574620    timeout-minutes : 600 
575621    runs-on : " ${{ matrix.os }}" 
576622    steps :
623+       - if : " contains(matrix.os, 'windows')" 
624+         uses : msys2/setup-msys2@v2.22.0 
625+         with :
626+           msystem : " ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}" 
627+           update : false 
628+           release : true 
629+           path-type : inherit 
630+           install : " make dos2unix diffutils\n " 
577631      - name : disable git crlf conversion 
578632        run : git config --global core.autocrlf false 
579633      - name : checkout the source code 
@@ -651,7 +705,7 @@ jobs:
651705        run : src/ci/scripts/verify-stable-version-number.sh 
652706        if : success() && !env.SKIP_JOB 
653707      - name : run the build 
654-         run : src/ci/scripts/run-build-from-ci.sh 
708+         run : src/ci/scripts/run-build-from-ci.sh 2>&1  
655709        env :
656710          AWS_ACCESS_KEY_ID : " ${{ env.CACHES_AWS_ACCESS_KEY_ID }}" 
657711          AWS_SECRET_ACCESS_KEY : " ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}" 
@@ -661,7 +715,7 @@ jobs:
661715        run : src/ci/scripts/create-doc-artifacts.sh 
662716        if : success() && !env.SKIP_JOB 
663717      - name : upload artifacts to github 
664-         uses : actions/upload-artifact@v3  
718+         uses : actions/upload-artifact@v4  
665719        with :
666720          name : " ${{ env.DOC_ARTIFACT_NAME }}" 
667721          path : obj/artifacts/doc 
0 commit comments