Skip to content

Commit 511cf7b

Browse files
author
Lea Fairbanks
authored
Merge branch 'master' into self-uninstall-remove-toolchains
2 parents ba0ca3d + e724717 commit 511cf7b

90 files changed

Lines changed: 1666 additions & 2709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux-builds-on-master.yaml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20+
mode:
21+
- dev
22+
- release
2023
target:
2124
- x86_64-unknown-linux-gnu
2225
- armv7-unknown-linux-gnueabihf
26+
- aarch64-linux-android
2327
- aarch64-unknown-linux-gnu # skip-pr
2428
- powerpc64-unknown-linux-gnu # skip-pr
2529
- x86_64-unknown-linux-musl # skip-pr
26-
# Temporarily disabled due to https://github.com/rust-lang/rust/issues/103673.
27-
# FIXME(hi-rustin): Re-enable them after the issue is fixed.
28-
# - aarch64-linux-android
2930
include:
3031
- target: x86_64-unknown-linux-gnu
3132
run_tests: YES
@@ -55,9 +56,9 @@ jobs:
5556
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
5657
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
5758
- name: Skip tests
59+
if: matrix.run_tests == '' || matrix.mode == 'release'
5860
run: |
5961
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
60-
if: matrix.run_tests == ''
6162
- name: Cache cargo registry and git trees
6263
uses: actions/cache@v3
6364
with:
@@ -74,8 +75,8 @@ jobs:
7475
uses: actions/cache@v3
7576
with:
7677
path: target
77-
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
78-
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
78+
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
79+
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
7980
- name: Install Rustup using ./rustup-init.sh
8081
run: |
8182
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
@@ -103,51 +104,55 @@ jobs:
103104
docker build -t "$DOCKER" -f "ci/docker/${DOCKER}/Dockerfile" .
104105
fi
105106
- name: Run the build within the docker image
107+
env:
108+
BUILD_PROFILE: ${{ matrix.mode }}
106109
run: |
107110
mkdir -p "${PWD}/target"
108111
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
109112
docker run \
110113
--entrypoint sh \
111-
--user "$(id -u)":"$(id -g)" \
112-
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
113-
--volume "${PWD}":/checkout:ro \
114-
--volume "${PWD}"/target:/checkout/target \
115-
--workdir /checkout \
116-
--env TARGET="${TARGET}" \
117-
--env SKIP_TESTS="${SKIP_TESTS}" \
118-
--volume "${HOME}/.cargo:/cargo" \
114+
--env BUILD_PROFILE="${BUILD_PROFILE}" \
119115
--env CARGO_HOME=/cargo \
120116
--env CARGO_TARGET_DIR=/checkout/target \
121117
--env LIBZ_SYS_STATIC=1 \
122-
--tty \
118+
--env SKIP_TESTS="${SKIP_TESTS}" \
119+
--env TARGET="${TARGET}" \
123120
--init \
124121
--rm \
122+
--tty \
123+
--user "$(id -u)":"$(id -g)" \
124+
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
125+
--volume "${HOME}/.cargo:/cargo" \
126+
--volume "${PWD}":/checkout:ro \
127+
--volume "${PWD}"/target:/checkout/target \
128+
--workdir /checkout \
125129
"${DOCKER}" \
126130
-c 'PATH="${PATH}":/rustc-sysroot/bin bash ci/run.bash'
127131
- name: Upload the built artifact
128132
uses: actions/upload-artifact@v3
133+
if: matrix.mode == 'release'
129134
with:
130135
name: rustup-init-${{ matrix.target }}
131136
path: |
132137
target/${{ matrix.target }}/release/rustup-init
133138
retention-days: 7
134139
- name: Acquire the AWS tooling
140+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
135141
run: |
136142
pip3 install -U setuptools
137143
pip3 install awscli
138-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
139144
- name: Prepare the dist
145+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
140146
run: |
141147
bash ci/prepare-deploy.bash
142-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
143148
- name: Deploy build to dev-static dist tree for release team
149+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
144150
run: |
145151
aws s3 cp --recursive deploy/ s3://dev-static-rust-lang-org/rustup/
146152
env:
147153
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
148154
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
149155
AWS_DEFAULT_REGION: us-west-1
150-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
151156
- name: Clear the cargo caches
152157
run: |
153158
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-pr.yaml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19+
mode:
20+
- dev
21+
- release
1922
target:
2023
- x86_64-unknown-linux-gnu
2124
- armv7-unknown-linux-gnueabihf
22-
# Temporarily disabled due to https://github.com/rust-lang/rust/issues/103673.
23-
# FIXME(hi-rustin): Re-enable them after the issue is fixed.
24-
# - aarch64-linux-android
25+
- aarch64-linux-android
2526
include:
2627
- target: x86_64-unknown-linux-gnu
2728
run_tests: YES
@@ -49,9 +50,9 @@ jobs:
4950
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
5051
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
5152
- name: Skip tests
53+
if: matrix.run_tests == '' || matrix.mode == 'release'
5254
run: |
5355
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
54-
if: matrix.run_tests == ''
5556
- name: Cache cargo registry and git trees
5657
uses: actions/cache@v3
5758
with:
@@ -68,8 +69,8 @@ jobs:
6869
uses: actions/cache@v3
6970
with:
7071
path: target
71-
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
72-
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
72+
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
73+
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
7374
- name: Install Rustup using ./rustup-init.sh
7475
run: |
7576
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
@@ -97,51 +98,55 @@ jobs:
9798
docker build -t "$DOCKER" -f "ci/docker/${DOCKER}/Dockerfile" .
9899
fi
99100
- name: Run the build within the docker image
101+
env:
102+
BUILD_PROFILE: ${{ matrix.mode }}
100103
run: |
101104
mkdir -p "${PWD}/target"
102105
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
103106
docker run \
104107
--entrypoint sh \
105-
--user "$(id -u)":"$(id -g)" \
106-
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
107-
--volume "${PWD}":/checkout:ro \
108-
--volume "${PWD}"/target:/checkout/target \
109-
--workdir /checkout \
110-
--env TARGET="${TARGET}" \
111-
--env SKIP_TESTS="${SKIP_TESTS}" \
112-
--volume "${HOME}/.cargo:/cargo" \
108+
--env BUILD_PROFILE="${BUILD_PROFILE}" \
113109
--env CARGO_HOME=/cargo \
114110
--env CARGO_TARGET_DIR=/checkout/target \
115111
--env LIBZ_SYS_STATIC=1 \
116-
--tty \
112+
--env SKIP_TESTS="${SKIP_TESTS}" \
113+
--env TARGET="${TARGET}" \
117114
--init \
118115
--rm \
116+
--tty \
117+
--user "$(id -u)":"$(id -g)" \
118+
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
119+
--volume "${HOME}/.cargo:/cargo" \
120+
--volume "${PWD}":/checkout:ro \
121+
--volume "${PWD}"/target:/checkout/target \
122+
--workdir /checkout \
119123
"${DOCKER}" \
120124
-c 'PATH="${PATH}":/rustc-sysroot/bin bash ci/run.bash'
121125
- name: Upload the built artifact
122126
uses: actions/upload-artifact@v3
127+
if: matrix.mode == 'release'
123128
with:
124129
name: rustup-init-${{ matrix.target }}
125130
path: |
126131
target/${{ matrix.target }}/release/rustup-init
127132
retention-days: 7
128133
- name: Acquire the AWS tooling
134+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
129135
run: |
130136
pip3 install -U setuptools
131137
pip3 install awscli
132-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
133138
- name: Prepare the dist
139+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
134140
run: |
135141
bash ci/prepare-deploy.bash
136-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
137142
- name: Deploy build to dev-static dist tree for release team
143+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
138144
run: |
139145
aws s3 cp --recursive deploy/ s3://dev-static-rust-lang-org/rustup/
140146
env:
141147
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
142148
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
143149
AWS_DEFAULT_REGION: us-west-1
144-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
145150
- name: Clear the cargo caches
146151
run: |
147152
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-stable.yaml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
mode:
19+
- dev
20+
- release
1821
target:
1922
- x86_64-unknown-linux-gnu
2023
- armv7-unknown-linux-gnueabihf
24+
- aarch64-linux-android
2125
- aarch64-unknown-linux-gnu # skip-pr
2226
- aarch64-unknown-linux-musl # skip-pr skip-master
2327
- powerpc64-unknown-linux-gnu # skip-pr
@@ -35,13 +39,10 @@ jobs:
3539
- mipsel-unknown-linux-gnu # skip-pr skip-master
3640
- mips64el-unknown-linux-gnuabi64 # skip-pr skip-master
3741
- s390x-unknown-linux-gnu # skip-pr skip-master
38-
# Temporarily disabled due to https://github.com/rust-lang/rust/issues/103673.
39-
# FIXME(hi-rustin): Re-enable them after the issue is fixed.
40-
# - arm-linux-androideabi skip-pr skip-master
41-
# - armv7-linux-androideabi skip-pr skip-master
42-
# - i686-linux-android skip-pr skip-master
43-
# - x86_64-linux-android skip-pr skip-master
44-
# - aarch64-linux-android
42+
- arm-linux-androideabi # skip-pr skip-master
43+
- armv7-linux-androideabi # skip-pr skip-master
44+
- i686-linux-android # skip-pr skip-master
45+
- x86_64-linux-android # skip-pr skip-master
4546
- riscv64gc-unknown-linux-gnu # skip-pr skip-master
4647
include:
4748
- target: x86_64-unknown-linux-gnu
@@ -78,9 +79,9 @@ jobs:
7879
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
7980
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
8081
- name: Skip tests
82+
if: matrix.run_tests == '' || matrix.mode == 'release'
8183
run: |
8284
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
83-
if: matrix.run_tests == ''
8485
- name: Cache cargo registry and git trees
8586
uses: actions/cache@v3
8687
with:
@@ -97,8 +98,8 @@ jobs:
9798
uses: actions/cache@v3
9899
with:
99100
path: target
100-
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
101-
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
101+
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
102+
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
102103
- name: Install Rustup using ./rustup-init.sh
103104
run: |
104105
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
@@ -126,51 +127,55 @@ jobs:
126127
docker build -t "$DOCKER" -f "ci/docker/${DOCKER}/Dockerfile" .
127128
fi
128129
- name: Run the build within the docker image
130+
env:
131+
BUILD_PROFILE: ${{ matrix.mode }}
129132
run: |
130133
mkdir -p "${PWD}/target"
131134
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
132135
docker run \
133136
--entrypoint sh \
134-
--user "$(id -u)":"$(id -g)" \
135-
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
136-
--volume "${PWD}":/checkout:ro \
137-
--volume "${PWD}"/target:/checkout/target \
138-
--workdir /checkout \
139-
--env TARGET="${TARGET}" \
140-
--env SKIP_TESTS="${SKIP_TESTS}" \
141-
--volume "${HOME}/.cargo:/cargo" \
137+
--env BUILD_PROFILE="${BUILD_PROFILE}" \
142138
--env CARGO_HOME=/cargo \
143139
--env CARGO_TARGET_DIR=/checkout/target \
144140
--env LIBZ_SYS_STATIC=1 \
145-
--tty \
141+
--env SKIP_TESTS="${SKIP_TESTS}" \
142+
--env TARGET="${TARGET}" \
146143
--init \
147144
--rm \
145+
--tty \
146+
--user "$(id -u)":"$(id -g)" \
147+
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
148+
--volume "${HOME}/.cargo:/cargo" \
149+
--volume "${PWD}":/checkout:ro \
150+
--volume "${PWD}"/target:/checkout/target \
151+
--workdir /checkout \
148152
"${DOCKER}" \
149153
-c 'PATH="${PATH}":/rustc-sysroot/bin bash ci/run.bash'
150154
- name: Upload the built artifact
151155
uses: actions/upload-artifact@v3
156+
if: matrix.mode == 'release'
152157
with:
153158
name: rustup-init-${{ matrix.target }}
154159
path: |
155160
target/${{ matrix.target }}/release/rustup-init
156161
retention-days: 7
157162
- name: Acquire the AWS tooling
163+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
158164
run: |
159165
pip3 install -U setuptools
160166
pip3 install awscli
161-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
162167
- name: Prepare the dist
168+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
163169
run: |
164170
bash ci/prepare-deploy.bash
165-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
166171
- name: Deploy build to dev-static dist tree for release team
172+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
167173
run: |
168174
aws s3 cp --recursive deploy/ s3://dev-static-rust-lang-org/rustup/
169175
env:
170176
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
171177
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
172178
AWS_DEFAULT_REGION: us-west-1
173-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
174179
- name: Clear the cargo caches
175180
run: |
176181
cargo install cargo-cache --no-default-features --features ci-autoclean

0 commit comments

Comments
 (0)