Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 90 additions & 90 deletions .github/workflows/ci.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ And it runs on all platforms Rust supports, including Windows.
See [**The Rustup book**](https://rust-lang.github.io/rustup/) for
documentation on installing and using Rustup.

The latest documentation for the master branch can be found
The latest documentation for the main branch can be found
under [devel](https://rust-lang.github.io/rustup/devel/).

## Contributing
Expand All @@ -36,4 +36,4 @@ at your option.

<!-- Badges -->
[actions-default-branch]: https://github.com/rust-lang/rustup/actions/workflows/ci.yaml/badge.svg
[actions-default-branch-status]: https://github.com/rust-lang/rustup/actions?query=branch%3Amaster
[actions-default-branch-status]: https://github.com/rust-lang/rustup/actions?query=branch%3Amain
10 changes: 5 additions & 5 deletions ci/actions-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This directory contains all the workflows we use in Rustup for GitHub Actions.
Rustup has five situations in which we perform CI builds:

1. On PR changes
2. On merge to master
3. Time-based rebuilds of master
2. On merge to main
3. Time-based rebuilds of main
4. Pushes to the stable branch
5. Renovate branches with dependency updates, tested before opening a PR or
merging. They are assessed the same as a PR: if it would be good enough as a
Expand All @@ -17,9 +17,9 @@ Rustup has five situations in which we perform CI builds:
The goals for each of those situations are subtly different. For PR changes,
we want to know as quickly as possible if the change is likely to be an issue.

Once a change hits master, we want to know that all our targets build.
Once a change hits main, we want to know that all our targets build.

Time based rebuilds of master are about determining if updates to the toolchain
Time based rebuilds of main are about determining if updates to the toolchain
have caused us problems, and also to try and highlight if we have flaky tests.

The stable branch is about making releases. Builds from that branch are uploaded
Expand Down Expand Up @@ -65,5 +65,5 @@ Due to limitations in how github workflows work, we have to create our workflows
from template files and then commit them.

The templates are in this directory, and the built workflows end up in the
`.github/workflows` directory. `-all` always runs, `-on-pr` `-on-master` and
`.github/workflows` directory. `-all` always runs, `-on-pr` `-on-main` and
`-on-stable` do the obvious.
10 changes: 5 additions & 5 deletions ci/actions-templates/freebsd-builds-template.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
jobs: # skip-master skip-stable
jobs: # skip-main skip-stable

# This is ci/actions-templates/freebsd-builds-template.yaml
# Do not edit this file in .github/workflows
build-freebsd-master: # job-name skip-stable
build-freebsd-stable: # job-name skip-master
build-freebsd-main: # job-name skip-stable
build-freebsd-stable: # job-name skip-main
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-master
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'schedule' }} # skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-main
steps:
- uses: actions/checkout@v5
with:
Expand Down
8 changes: 4 additions & 4 deletions ci/actions-templates/gen-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- "*"
push:
branches:
- master
- main
- stable
schedule:
- cron: "30 0 * * 1,3,5" # At 00:30 UTC on Monday, Wednesday, and Friday
Expand All @@ -29,17 +29,17 @@ jobs:
EOF

gen_job windows-builds pr
gen_job windows-builds master
gen_job windows-builds main
gen_job windows-builds stable

gen_job linux-builds pr
gen_job linux-builds master
gen_job linux-builds main
gen_job linux-builds stable

gen_job macos-builds x86_64
gen_job macos-builds aarch64

gen_job freebsd-builds master
gen_job freebsd-builds main
gen_job freebsd-builds stable

# The following targets only have a single job
Expand Down
72 changes: 36 additions & 36 deletions ci/actions-templates/linux-builds-template.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
jobs: # skip-master skip-pr skip-stable
jobs: # skip-main skip-pr skip-stable

# This is ci/actions-templates/linux-builds-template.yaml
# Do not edit this file in .github/workflows
build-linux-pr: # job-name skip-master skip-stable
build-linux-master: # job-name skip-pr skip-stable
build-linux-stable: # job-name skip-master skip-pr
build-linux-pr: # job-name skip-main skip-stable
build-linux-main: # job-name skip-pr skip-stable
build-linux-stable: # job-name skip-main skip-pr
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-main skip-stable
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') }} # skip-pr skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-main
permissions:
id-token: write
contents: read
Expand All @@ -23,33 +23,33 @@ jobs: # skip-master skip-pr skip-stable
- armv7-unknown-linux-gnueabihf
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl # skip-pr skip-master
- aarch64-unknown-linux-musl # skip-pr skip-main
- powerpc64-unknown-linux-gnu # skip-pr
- x86_64-unknown-linux-musl # skip-pr
- i686-unknown-linux-gnu # skip-pr skip-master
- arm-unknown-linux-gnueabi # skip-pr skip-master
- arm-unknown-linux-gnueabihf # skip-pr skip-master
- x86_64-pc-solaris # skip-pr skip-master
- x86_64-unknown-freebsd # skip-pr skip-master
- x86_64-unknown-netbsd # skip-pr skip-master
- x86_64-unknown-illumos # skip-pr skip-master
- powerpc-unknown-linux-gnu # skip-pr skip-master
- powerpc64le-unknown-linux-gnu # skip-pr skip-master
- powerpc64le-unknown-linux-musl # skip-pr skip-master
- s390x-unknown-linux-gnu # skip-pr skip-master
- sparcv9-sun-solaris # skip-pr skip-master
- arm-linux-androideabi # skip-pr skip-master
- armv7-linux-androideabi # skip-pr skip-master
- x86_64-linux-android # skip-pr skip-master
- riscv64gc-unknown-linux-gnu # skip-pr skip-master
- loongarch64-unknown-linux-gnu # skip-pr skip-master
- loongarch64-unknown-linux-musl # skip-pr skip-master
- i686-unknown-linux-gnu # skip-pr skip-main
- arm-unknown-linux-gnueabi # skip-pr skip-main
- arm-unknown-linux-gnueabihf # skip-pr skip-main
- x86_64-pc-solaris # skip-pr skip-main
- x86_64-unknown-freebsd # skip-pr skip-main
- x86_64-unknown-netbsd # skip-pr skip-main
- x86_64-unknown-illumos # skip-pr skip-main
- powerpc-unknown-linux-gnu # skip-pr skip-main
- powerpc64le-unknown-linux-gnu # skip-pr skip-main
- powerpc64le-unknown-linux-musl # skip-pr skip-main
- s390x-unknown-linux-gnu # skip-pr skip-main
- sparcv9-sun-solaris # skip-pr skip-main
- arm-linux-androideabi # skip-pr skip-main
- armv7-linux-androideabi # skip-pr skip-main
- x86_64-linux-android # skip-pr skip-main
- riscv64gc-unknown-linux-gnu # skip-pr skip-main
- loongarch64-unknown-linux-gnu # skip-pr skip-main
- loongarch64-unknown-linux-musl # skip-pr skip-main
include:
- target: x86_64-unknown-linux-gnu
run_tests: YES
#snap_arch: amd64
- target: i686-unknown-linux-gnu # skip-pr skip-master
#snap_arch: i386 # skip-pr skip-master
- target: i686-unknown-linux-gnu # skip-pr skip-main
#snap_arch: i386 # skip-pr skip-main
# We add an ARM-based host to the following target.
# We need to do that because rust's CI uses ARM-based runners
# to generate their Dockerfiles.
Expand All @@ -58,10 +58,10 @@ jobs: # skip-master skip-pr skip-stable
run_tests: YES
- target: armv7-unknown-linux-gnueabihf
#snap_arch: armhf
- target: powerpc64le-unknown-linux-gnu # skip-pr skip-master
#snap_arch: ppc64el # skip-pr skip-master
- target: s390x-unknown-linux-gnu # skip-pr skip-master
#snap_arch: s390x # skip-pr skip-master
- target: powerpc64le-unknown-linux-gnu # skip-pr skip-main
#snap_arch: ppc64el # skip-pr skip-main
- target: s390x-unknown-linux-gnu # skip-pr skip-main
#snap_arch: s390x # skip-pr skip-main
steps:
- name: Clone repo
uses: actions/checkout@v5
Expand Down Expand Up @@ -165,12 +165,12 @@ jobs: # skip-master skip-pr skip-stable
target/${{ matrix.target }}/release/rustup-init
retention-days: 7
- name: Ensure that awscli is installed
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
which aws
aws --version
- name: Prepare the dist
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
bash ci/prepare-deploy.bash
- name: Deploy build to dev-static dist tree for release team
Expand All @@ -182,13 +182,13 @@ jobs: # skip-master skip-pr skip-stable
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-1
- name: Configure AWS credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
aws-region: us-east-1
- name: Deploy build to rustup-builds bucket for release team
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
run: |
aws --debug s3 cp --recursive deploy/ s3://rustup-builds/${{ github.sha }}
env:
Expand Down
8 changes: 4 additions & 4 deletions ci/actions-templates/macos-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ jobs: # skip-x86_64 skip-aarch64
target/${{ matrix.target }}/release/rustup-init
retention-days: 7
- name: Ensure that awscli is installed
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
brew install --overwrite awscli
which aws
aws --version
- name: Prepare the dist
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
bash ci/prepare-deploy.bash
- name: Deploy build to dev-static dist tree for release team
Expand All @@ -115,13 +115,13 @@ jobs: # skip-x86_64 skip-aarch64
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-1
- name: Configure AWS credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
aws-region: us-east-1
- name: Deploy build to rustup-builds bucket for release team
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
run: |
aws --debug s3 cp --recursive deploy/ s3://rustup-builds/${{ github.sha }}
env:
Expand Down
14 changes: 7 additions & 7 deletions ci/actions-templates/test-docs-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ jobs: # skip-all
# This is ci/actions-templates/test-docs-templates.yaml
# Do not edit this file in .github/workflows
#
# Builds docs for both stable and master branches.
# stable is placed in the root of the gh-pages branch, while master is placed at /devel
# Builds docs for both stable and main branches.
# stable is placed in the root of the gh-pages branch, while main is placed at /devel
doc: # job-name
runs-on: ubuntu-latest
steps:
Expand All @@ -26,16 +26,16 @@ jobs: # skip-all
cd doc/user-guide || cd doc
mdbook build
mv book ${{ runner.temp }}
- name: Build user-guide (master)
- name: Build user-guide (main)
run: |
git checkout master
git checkout main
cd doc/user-guide
mdbook build
mkdir -p ${{ runner.temp }}/book
mv book ${{ runner.temp }}/book/devel
- name: Build dev-guide (master)
- name: Build dev-guide (main)
run: |
git checkout master
git checkout main
cd doc/dev-guide
mdbook build
mkdir -p ${{ runner.temp }}/book
Expand All @@ -50,4 +50,4 @@ jobs: # skip-all
git add . .nojekyll
git commit -m "Deploy $GITHUB_REF $GITHUB_SHA to gh-pages"
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git push --force --set-upstream origin master:gh-pages
git push --force --set-upstream origin main:gh-pages
34 changes: 17 additions & 17 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
jobs: # skip-master skip-pr skip-stable
jobs: # skip-main skip-pr skip-stable

# This is ci/actions-templates/windows-builds-template.yaml
# Do not edit this file in .github/workflows
build-windows-pr: # job-name skip-master skip-stable
build-windows-master: # job-name skip-pr skip-stable
build-windows-stable: # job-name skip-master skip-pr
build-windows-pr: # job-name skip-main skip-stable
build-windows-main: # job-name skip-pr skip-stable
build-windows-stable: # job-name skip-main skip-pr
runs-on: ${{ matrix.os || 'windows-latest' }}
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-main skip-stable
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') }} # skip-pr skip-stable
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-main
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
RUST_MIN_STACK: 16777216
Expand All @@ -23,10 +23,10 @@ jobs: # skip-master skip-pr skip-stable
- release
target:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc # skip-pr skip-master
- i686-pc-windows-msvc # skip-pr skip-main
- aarch64-pc-windows-msvc
- x86_64-pc-windows-gnu
- i686-pc-windows-gnu # skip-pr skip-master
- i686-pc-windows-gnu # skip-pr skip-main
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
Expand All @@ -39,10 +39,10 @@ jobs: # skip-master skip-pr skip-stable
rustup_arch: aarch64
os: windows-11-arm
run_tests: YES
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
- target: i686-pc-windows-gnu # skip-pr skip-main
arch: i686 # skip-pr skip-main
mingwdir: mingw32 # skip-pr skip-main
gcc: i686-w64-mingw32-gcc # skip-pr skip-main
steps:
- uses: actions/checkout@v5
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand Down Expand Up @@ -148,12 +148,12 @@ jobs: # skip-master skip-pr skip-stable
target/${{ matrix.target }}/release/rustup-init.exe
retention-days: 7
- name: Ensure that awscli is installed
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
Get-Command aws
aws --version
- name: Prepare the dist
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
run: |
.\ci\prepare-deploy.ps1
shell: powershell
Expand All @@ -166,13 +166,13 @@ jobs: # skip-master skip-pr skip-stable
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-1
- name: Configure AWS credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
aws-region: us-east-1
- name: Deploy build to rustup-builds bucket for release team
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
run: |
aws --debug s3 cp --recursive dist s3://rustup-builds/${{ github.sha }}/dist
env:
Expand Down
Loading
Loading