Skip to content

Commit 01977e8

Browse files
Kobzolmarcoieni
authored andcommitted
Move the default branch from master to main
1 parent 8d79896 commit 01977e8

15 files changed

+184
-184
lines changed

.github/workflows/ci.yaml

Lines changed: 90 additions & 90 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ And it runs on all platforms Rust supports, including Windows.
1515
See [**The Rustup book**](https://rust-lang.github.io/rustup/) for
1616
documentation on installing and using Rustup.
1717

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

2121
## Contributing
@@ -36,4 +36,4 @@ at your option.
3636

3737
<!-- Badges -->
3838
[actions-default-branch]: https://github.com/rust-lang/rustup/actions/workflows/ci.yaml/badge.svg
39-
[actions-default-branch-status]: https://github.com/rust-lang/rustup/actions?query=branch%3Amaster
39+
[actions-default-branch-status]: https://github.com/rust-lang/rustup/actions?query=branch%3Amain

ci/actions-templates/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This directory contains all the workflows we use in Rustup for GitHub Actions.
77
Rustup has five situations in which we perform CI builds:
88

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

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

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

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

6767
The templates are in this directory, and the built workflows end up in the
68-
`.github/workflows` directory. `-all` always runs, `-on-pr` `-on-master` and
68+
`.github/workflows` directory. `-all` always runs, `-on-pr` `-on-main` and
6969
`-on-stable` do the obvious.

ci/actions-templates/freebsd-builds-template.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
jobs: # skip-master skip-stable
1+
jobs: # skip-main skip-stable
22

33
# This is ci/actions-templates/freebsd-builds-template.yaml
44
# Do not edit this file in .github/workflows
5-
build-freebsd-master: # job-name skip-stable
6-
build-freebsd-stable: # job-name skip-master
5+
build-freebsd-main: # job-name skip-stable
6+
build-freebsd-stable: # job-name skip-main
77
runs-on: ubuntu-latest
8-
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-stable
9-
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-master
8+
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'schedule' }} # skip-stable
9+
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-main
1010
steps:
1111
- uses: actions/checkout@v5
1212
with:

ci/actions-templates/gen-workflows.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
- "*"
2121
push:
2222
branches:
23-
- master
23+
- main
2424
- stable
2525
schedule:
2626
- cron: "30 0 * * 1,3,5" # At 00:30 UTC on Monday, Wednesday, and Friday
@@ -29,17 +29,17 @@ jobs:
2929
EOF
3030

3131
gen_job windows-builds pr
32-
gen_job windows-builds master
32+
gen_job windows-builds main
3333
gen_job windows-builds stable
3434

3535
gen_job linux-builds pr
36-
gen_job linux-builds master
36+
gen_job linux-builds main
3737
gen_job linux-builds stable
3838

3939
gen_job macos-builds x86_64
4040
gen_job macos-builds aarch64
4141

42-
gen_job freebsd-builds master
42+
gen_job freebsd-builds main
4343
gen_job freebsd-builds stable
4444

4545
# The following targets only have a single job

ci/actions-templates/linux-builds-template.yaml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
jobs: # skip-master skip-pr skip-stable
1+
jobs: # skip-main skip-pr skip-stable
22

33
# This is ci/actions-templates/linux-builds-template.yaml
44
# Do not edit this file in .github/workflows
5-
build-linux-pr: # job-name skip-master skip-stable
6-
build-linux-master: # job-name skip-pr skip-stable
7-
build-linux-stable: # job-name skip-master skip-pr
5+
build-linux-pr: # job-name skip-main skip-stable
6+
build-linux-main: # job-name skip-pr skip-stable
7+
build-linux-stable: # job-name skip-main skip-pr
88
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
9-
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
10-
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
11-
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
9+
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-main skip-stable
10+
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') }} # skip-pr skip-stable
11+
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-main
1212
permissions:
1313
id-token: write
1414
contents: read
@@ -23,33 +23,33 @@ jobs: # skip-master skip-pr skip-stable
2323
- armv7-unknown-linux-gnueabihf
2424
- aarch64-linux-android
2525
- aarch64-unknown-linux-gnu
26-
- aarch64-unknown-linux-musl # skip-pr skip-master
26+
- aarch64-unknown-linux-musl # skip-pr skip-main
2727
- powerpc64-unknown-linux-gnu # skip-pr
2828
- x86_64-unknown-linux-musl # skip-pr
29-
- i686-unknown-linux-gnu # skip-pr skip-master
30-
- arm-unknown-linux-gnueabi # skip-pr skip-master
31-
- arm-unknown-linux-gnueabihf # skip-pr skip-master
32-
- x86_64-pc-solaris # skip-pr skip-master
33-
- x86_64-unknown-freebsd # skip-pr skip-master
34-
- x86_64-unknown-netbsd # skip-pr skip-master
35-
- x86_64-unknown-illumos # skip-pr skip-master
36-
- powerpc-unknown-linux-gnu # skip-pr skip-master
37-
- powerpc64le-unknown-linux-gnu # skip-pr skip-master
38-
- powerpc64le-unknown-linux-musl # skip-pr skip-master
39-
- s390x-unknown-linux-gnu # skip-pr skip-master
40-
- sparcv9-sun-solaris # skip-pr skip-master
41-
- arm-linux-androideabi # skip-pr skip-master
42-
- armv7-linux-androideabi # skip-pr skip-master
43-
- x86_64-linux-android # skip-pr skip-master
44-
- riscv64gc-unknown-linux-gnu # skip-pr skip-master
45-
- loongarch64-unknown-linux-gnu # skip-pr skip-master
46-
- loongarch64-unknown-linux-musl # skip-pr skip-master
29+
- i686-unknown-linux-gnu # skip-pr skip-main
30+
- arm-unknown-linux-gnueabi # skip-pr skip-main
31+
- arm-unknown-linux-gnueabihf # skip-pr skip-main
32+
- x86_64-pc-solaris # skip-pr skip-main
33+
- x86_64-unknown-freebsd # skip-pr skip-main
34+
- x86_64-unknown-netbsd # skip-pr skip-main
35+
- x86_64-unknown-illumos # skip-pr skip-main
36+
- powerpc-unknown-linux-gnu # skip-pr skip-main
37+
- powerpc64le-unknown-linux-gnu # skip-pr skip-main
38+
- powerpc64le-unknown-linux-musl # skip-pr skip-main
39+
- s390x-unknown-linux-gnu # skip-pr skip-main
40+
- sparcv9-sun-solaris # skip-pr skip-main
41+
- arm-linux-androideabi # skip-pr skip-main
42+
- armv7-linux-androideabi # skip-pr skip-main
43+
- x86_64-linux-android # skip-pr skip-main
44+
- riscv64gc-unknown-linux-gnu # skip-pr skip-main
45+
- loongarch64-unknown-linux-gnu # skip-pr skip-main
46+
- loongarch64-unknown-linux-musl # skip-pr skip-main
4747
include:
4848
- target: x86_64-unknown-linux-gnu
4949
run_tests: YES
5050
#snap_arch: amd64
51-
- target: i686-unknown-linux-gnu # skip-pr skip-master
52-
#snap_arch: i386 # skip-pr skip-master
51+
- target: i686-unknown-linux-gnu # skip-pr skip-main
52+
#snap_arch: i386 # skip-pr skip-main
5353
# We add an ARM-based host to the following target.
5454
# We need to do that because rust's CI uses ARM-based runners
5555
# to generate their Dockerfiles.
@@ -58,10 +58,10 @@ jobs: # skip-master skip-pr skip-stable
5858
run_tests: YES
5959
- target: armv7-unknown-linux-gnueabihf
6060
#snap_arch: armhf
61-
- target: powerpc64le-unknown-linux-gnu # skip-pr skip-master
62-
#snap_arch: ppc64el # skip-pr skip-master
63-
- target: s390x-unknown-linux-gnu # skip-pr skip-master
64-
#snap_arch: s390x # skip-pr skip-master
61+
- target: powerpc64le-unknown-linux-gnu # skip-pr skip-main
62+
#snap_arch: ppc64el # skip-pr skip-main
63+
- target: s390x-unknown-linux-gnu # skip-pr skip-main
64+
#snap_arch: s390x # skip-pr skip-main
6565
steps:
6666
- name: Clone repo
6767
uses: actions/checkout@v5
@@ -165,12 +165,12 @@ jobs: # skip-master skip-pr skip-stable
165165
target/${{ matrix.target }}/release/rustup-init
166166
retention-days: 7
167167
- name: Ensure that awscli is installed
168-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
168+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
169169
run: |
170170
which aws
171171
aws --version
172172
- name: Prepare the dist
173-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
173+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
174174
run: |
175175
bash ci/prepare-deploy.bash
176176
- name: Deploy build to dev-static dist tree for release team
@@ -182,13 +182,13 @@ jobs: # skip-master skip-pr skip-stable
182182
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
183183
AWS_DEFAULT_REGION: us-west-1
184184
- name: Configure AWS credentials
185-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
185+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
186186
uses: aws-actions/configure-aws-credentials@v5
187187
with:
188188
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
189189
aws-region: us-east-1
190190
- name: Deploy build to rustup-builds bucket for release team
191-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
191+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
192192
run: |
193193
aws --debug s3 cp --recursive deploy/ s3://rustup-builds/${{ github.sha }}
194194
env:

ci/actions-templates/macos-builds-template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ jobs: # skip-x86_64 skip-aarch64
9797
target/${{ matrix.target }}/release/rustup-init
9898
retention-days: 7
9999
- name: Ensure that awscli is installed
100-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
100+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
101101
run: |
102102
brew install --overwrite awscli
103103
which aws
104104
aws --version
105105
- name: Prepare the dist
106-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
106+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
107107
run: |
108108
bash ci/prepare-deploy.bash
109109
- name: Deploy build to dev-static dist tree for release team
@@ -115,13 +115,13 @@ jobs: # skip-x86_64 skip-aarch64
115115
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
116116
AWS_DEFAULT_REGION: us-west-1
117117
- name: Configure AWS credentials
118-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
118+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
119119
uses: aws-actions/configure-aws-credentials@v5
120120
with:
121121
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
122122
aws-region: us-east-1
123123
- name: Deploy build to rustup-builds bucket for release team
124-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
124+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
125125
run: |
126126
aws --debug s3 cp --recursive deploy/ s3://rustup-builds/${{ github.sha }}
127127
env:

ci/actions-templates/test-docs-template.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ jobs: # skip-all
33
# This is ci/actions-templates/test-docs-templates.yaml
44
# Do not edit this file in .github/workflows
55
#
6-
# Builds docs for both stable and master branches.
7-
# stable is placed in the root of the gh-pages branch, while master is placed at /devel
6+
# Builds docs for both stable and main branches.
7+
# stable is placed in the root of the gh-pages branch, while main is placed at /devel
88
doc: # job-name
99
runs-on: ubuntu-latest
1010
steps:
@@ -26,16 +26,16 @@ jobs: # skip-all
2626
cd doc/user-guide || cd doc
2727
mdbook build
2828
mv book ${{ runner.temp }}
29-
- name: Build user-guide (master)
29+
- name: Build user-guide (main)
3030
run: |
31-
git checkout master
31+
git checkout main
3232
cd doc/user-guide
3333
mdbook build
3434
mkdir -p ${{ runner.temp }}/book
3535
mv book ${{ runner.temp }}/book/devel
36-
- name: Build dev-guide (master)
36+
- name: Build dev-guide (main)
3737
run: |
38-
git checkout master
38+
git checkout main
3939
cd doc/dev-guide
4040
mdbook build
4141
mkdir -p ${{ runner.temp }}/book
@@ -50,4 +50,4 @@ jobs: # skip-all
5050
git add . .nojekyll
5151
git commit -m "Deploy $GITHUB_REF $GITHUB_SHA to gh-pages"
5252
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
53-
git push --force --set-upstream origin master:gh-pages
53+
git push --force --set-upstream origin main:gh-pages

ci/actions-templates/windows-builds-template.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
jobs: # skip-master skip-pr skip-stable
1+
jobs: # skip-main skip-pr skip-stable
22

33
# This is ci/actions-templates/windows-builds-template.yaml
44
# Do not edit this file in .github/workflows
5-
build-windows-pr: # job-name skip-master skip-stable
6-
build-windows-master: # job-name skip-pr skip-stable
7-
build-windows-stable: # job-name skip-master skip-pr
5+
build-windows-pr: # job-name skip-main skip-stable
6+
build-windows-main: # job-name skip-pr skip-stable
7+
build-windows-stable: # job-name skip-main skip-pr
88
runs-on: ${{ matrix.os || 'windows-latest' }}
9-
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable
10-
if: ${{ (github.event_name == 'push' && github.ref_name == 'master') }} # skip-pr skip-stable
11-
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-master
9+
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-main skip-stable
10+
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') }} # skip-pr skip-stable
11+
if: ${{ github.event_name == 'push' && github.ref_name == 'stable' || github.event_name == 'schedule' }} # skip-pr skip-main
1212
env:
1313
RUSTFLAGS: -Ctarget-feature=+crt-static
1414
RUST_MIN_STACK: 16777216
@@ -23,10 +23,10 @@ jobs: # skip-master skip-pr skip-stable
2323
- release
2424
target:
2525
- x86_64-pc-windows-msvc
26-
- i686-pc-windows-msvc # skip-pr skip-master
26+
- i686-pc-windows-msvc # skip-pr skip-main
2727
- aarch64-pc-windows-msvc
2828
- x86_64-pc-windows-gnu
29-
- i686-pc-windows-gnu # skip-pr skip-master
29+
- i686-pc-windows-gnu # skip-pr skip-main
3030
include:
3131
- target: x86_64-pc-windows-msvc
3232
run_tests: YES
@@ -39,10 +39,10 @@ jobs: # skip-master skip-pr skip-stable
3939
rustup_arch: aarch64
4040
os: windows-11-arm
4141
run_tests: YES
42-
- target: i686-pc-windows-gnu # skip-pr skip-master
43-
arch: i686 # skip-pr skip-master
44-
mingwdir: mingw32 # skip-pr skip-master
45-
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
42+
- target: i686-pc-windows-gnu # skip-pr skip-main
43+
arch: i686 # skip-pr skip-main
44+
mingwdir: mingw32 # skip-pr skip-main
45+
gcc: i686-w64-mingw32-gcc # skip-pr skip-main
4646
steps:
4747
- uses: actions/checkout@v5
4848
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -148,12 +148,12 @@ jobs: # skip-master skip-pr skip-stable
148148
target/${{ matrix.target }}/release/rustup-init.exe
149149
retention-days: 7
150150
- name: Ensure that awscli is installed
151-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
151+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
152152
run: |
153153
Get-Command aws
154154
aws --version
155155
- name: Prepare the dist
156-
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/master')
156+
if: github.event_name == 'push' && matrix.mode == 'release' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/main')
157157
run: |
158158
.\ci\prepare-deploy.ps1
159159
shell: powershell
@@ -166,13 +166,13 @@ jobs: # skip-master skip-pr skip-stable
166166
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
167167
AWS_DEFAULT_REGION: us-west-1
168168
- name: Configure AWS credentials
169-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
169+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
170170
uses: aws-actions/configure-aws-credentials@v5
171171
with:
172172
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--rustup
173173
aws-region: us-east-1
174174
- name: Deploy build to rustup-builds bucket for release team
175-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.mode == 'release'
175+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.mode == 'release'
176176
run: |
177177
aws --debug s3 cp --recursive dist s3://rustup-builds/${{ github.sha }}/dist
178178
env:

0 commit comments

Comments
 (0)