Skip to content

Commit 707ff42

Browse files
authored
Merge branch 'master' into rosetta
2 parents 219847a + 9747102 commit 707ff42

File tree

157 files changed

+8674
-6754
lines changed

Some content is hidden

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

157 files changed

+8674
-6754
lines changed

.github/renovate.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base"
5+
],
6+
"labels": [
7+
"dependencies"
8+
],
9+
"lockFileMaintenance": {
10+
"enabled": true
11+
},
12+
"prCreation": "not-pending",
13+
"rangeStrategy": "replace",
14+
"stabilityDays": 3,
15+
"github-actions": {
16+
"fileMatch": [
17+
"^ci\\/.*/[^/]+\\.ya?ml$"
18+
]
19+
}
20+
}

.github/workflows/centos-fmt-clippy-on-all.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
branches:
1212
- master
1313
- stable
14+
- renovate/*
1415
schedule:
1516
- cron: "30 0 * * 1" # Every Monday at half past midnight
1617

@@ -21,7 +22,7 @@ jobs:
2122
strategy:
2223
fail-fast: false
2324
steps:
24-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2526
with:
2627
# v2 defaults to a shallow checkout, but we need at least to the previous tag
2728
fetch-depth: 0
@@ -39,7 +40,7 @@ jobs:
3940
run: |
4041
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4142
- name: Cache cargo registry and git trees
42-
uses: actions/cache@v2
43+
uses: actions/cache@v3
4344
with:
4445
path: |
4546
~/.cargo/registry
@@ -48,10 +49,10 @@ jobs:
4849
- name: Get rustc commit hash
4950
id: cargo-target-cache
5051
run: |
51-
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
52+
echo "{rust_hash}={$(rustc -Vv | grep commit-hash | awk '{print $2}')}" >> $GITHUB_OUTPUT
5253
shell: bash
5354
- name: Cache cargo build
54-
uses: actions/cache@v2
55+
uses: actions/cache@v3
5556
with:
5657
path: target
5758
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ runner.os }}-cargo-clippy-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
@@ -78,13 +79,13 @@ jobs:
7879
--tty \
7980
--init \
8081
--rm \
81-
centos:6 \
82+
centos:7 \
8283
sh ./ci/raw_init.sh
8384
- name: Run shell checks
8485
run: |
85-
shellcheck -s dash -- rustup-init.sh
86-
git ls-files -- '*.sh' | xargs shellcheck -s dash -e SC1090
87-
git ls-files -- '*.bash' | xargs shellcheck -s bash -e SC1090
86+
shellcheck -x -s dash -- rustup-init.sh
87+
git ls-files -- '*.sh' | xargs shellcheck -x -s dash
88+
git ls-files -- '*.bash' | xargs shellcheck -x -s bash
8889
- name: Run formatting checks
8990
run: |
9091
cargo fmt --all --check

.github/workflows/deploy-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Documentation
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
1717
- name: Install mdbook

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

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
name: Linux (master) # skip-pr skip-stable
55

66
on:
7-
push: # skip-pr
8-
branches: # skip-pr
9-
- master # skip-pr skip-stable
7+
push: # skip-pr
8+
branches: # skip-pr
9+
- master # skip-pr skip-stable
1010
schedule: # skip-pr skip-stable
1111
- cron: "30 0 * * 1" # Every Monday at half past midnight UTC skip-pr skip-stable
1212

@@ -17,13 +17,18 @@ 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
23-
- aarch64-linux-android
2426
- aarch64-unknown-linux-gnu # skip-pr
2527
- powerpc64-unknown-linux-gnu # skip-pr
2628
- x86_64-unknown-linux-musl # skip-pr
29+
# Temporarily disabled due to https://github.com/rust-lang/rust/issues/103673.
30+
# FIXME(hi-rustin): Re-enable them after the issue is fixed.
31+
# - aarch64-linux-android
2732
include:
2833
- target: x86_64-unknown-linux-gnu
2934
run_tests: YES
@@ -34,7 +39,7 @@ jobs:
3439
#snap_arch: armhf
3540
steps:
3641
- name: Clone repo
37-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
3843
with:
3944
# v2 defaults to a shallow checkout, but we need at least to the previous tag
4045
fetch-depth: 0
@@ -53,11 +58,11 @@ jobs:
5358
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
5459
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
5560
- name: Skip tests
61+
if: matrix.run_tests == '' || matrix.mode == 'release'
5662
run: |
5763
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
58-
if: matrix.run_tests == ''
5964
- name: Cache cargo registry and git trees
60-
uses: actions/cache@v2
65+
uses: actions/cache@v3
6166
with:
6267
path: |
6368
~/.cargo/registry
@@ -66,14 +71,14 @@ jobs:
6671
- name: Get rustc commit hash
6772
id: cargo-target-cache
6873
run: |
69-
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
74+
echo "{rust_hash}={$(rustc -Vv | grep commit-hash | awk '{print $2}')}" >> $GITHUB_OUTPUT
7075
shell: bash
7176
- name: Cache cargo build
72-
uses: actions/cache@v2
77+
uses: actions/cache@v3
7378
with:
7479
path: target
75-
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
76-
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
80+
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
81+
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
7782
- name: Install Rustup using ./rustup-init.sh
7883
run: |
7984
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
@@ -101,51 +106,55 @@ jobs:
101106
docker build -t "$DOCKER" -f "ci/docker/${DOCKER}/Dockerfile" .
102107
fi
103108
- name: Run the build within the docker image
109+
env:
110+
BUILD_PROFILE: ${{ matrix.mode }}
104111
run: |
105112
mkdir -p "${PWD}/target"
106113
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
107114
docker run \
108115
--entrypoint sh \
109-
--user "$(id -u)":"$(id -g)" \
110-
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
111-
--volume "${PWD}":/checkout:ro \
112-
--volume "${PWD}"/target:/checkout/target \
113-
--workdir /checkout \
114-
--env TARGET="${TARGET}" \
115-
--env SKIP_TESTS="${SKIP_TESTS}" \
116-
--volume "${HOME}/.cargo:/cargo" \
116+
--env BUILD_PROFILE="${BUILD_PROFILE}" \
117117
--env CARGO_HOME=/cargo \
118118
--env CARGO_TARGET_DIR=/checkout/target \
119119
--env LIBZ_SYS_STATIC=1 \
120-
--tty \
120+
--env SKIP_TESTS="${SKIP_TESTS}" \
121+
--env TARGET="${TARGET}" \
121122
--init \
122123
--rm \
124+
--tty \
125+
--user "$(id -u)":"$(id -g)" \
126+
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
127+
--volume "${HOME}/.cargo:/cargo" \
128+
--volume "${PWD}":/checkout:ro \
129+
--volume "${PWD}"/target:/checkout/target \
130+
--workdir /checkout \
123131
"${DOCKER}" \
124132
-c 'PATH="${PATH}":/rustc-sysroot/bin bash ci/run.bash'
125133
- name: Upload the built artifact
126-
uses: actions/upload-artifact@v2
134+
uses: actions/upload-artifact@v3
135+
if: matrix.mode == 'release'
127136
with:
128137
name: rustup-init-${{ matrix.target }}
129138
path: |
130139
target/${{ matrix.target }}/release/rustup-init
131140
retention-days: 7
132141
- name: Acquire the AWS tooling
142+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
133143
run: |
134144
pip3 install -U setuptools
135145
pip3 install awscli
136-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
137146
- name: Prepare the dist
147+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
138148
run: |
139149
bash ci/prepare-deploy.bash
140-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
141150
- name: Deploy build to dev-static dist tree for release team
151+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
142152
run: |
143153
aws s3 cp --recursive deploy/ s3://dev-static-rust-lang-org/rustup/
144154
env:
145155
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
146156
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
147157
AWS_DEFAULT_REGION: us-west-1
148-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
149158
- name: Clear the cargo caches
150159
run: |
151160
cargo install cargo-cache --no-default-features --features ci-autoclean

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

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
name: Linux (PR) # skip-master skip-stable
55

66
on:
7-
pull_request: # skip-master skip-stable
8-
branches: # skip-master skip-stable
9-
- "*" # skip-master skip-stable
7+
pull_request: # skip-master skip-stable
8+
branches: # skip-master skip-stable
9+
- "*" # skip-master skip-stable
10+
- renovate/* # skip-master skip-stable
1011

1112
jobs:
1213
build:
@@ -15,10 +16,15 @@ jobs:
1516
strategy:
1617
fail-fast: false
1718
matrix:
19+
mode:
20+
- dev
21+
- release
1822
target:
1923
- x86_64-unknown-linux-gnu
2024
- armv7-unknown-linux-gnueabihf
21-
- aarch64-linux-android
25+
# Temporarily disabled due to https://github.com/rust-lang/rust/issues/103673.
26+
# FIXME(hi-rustin): Re-enable them after the issue is fixed.
27+
# - aarch64-linux-android
2228
include:
2329
- target: x86_64-unknown-linux-gnu
2430
run_tests: YES
@@ -27,7 +33,7 @@ jobs:
2733
#snap_arch: armhf
2834
steps:
2935
- name: Clone repo
30-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3137
with:
3238
# v2 defaults to a shallow checkout, but we need at least to the previous tag
3339
fetch-depth: 0
@@ -46,11 +52,11 @@ jobs:
4652
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4753
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
4854
- name: Skip tests
55+
if: matrix.run_tests == '' || matrix.mode == 'release'
4956
run: |
5057
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
51-
if: matrix.run_tests == ''
5258
- name: Cache cargo registry and git trees
53-
uses: actions/cache@v2
59+
uses: actions/cache@v3
5460
with:
5561
path: |
5662
~/.cargo/registry
@@ -59,14 +65,14 @@ jobs:
5965
- name: Get rustc commit hash
6066
id: cargo-target-cache
6167
run: |
62-
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
68+
echo "{rust_hash}={$(rustc -Vv | grep commit-hash | awk '{print $2}')}" >> $GITHUB_OUTPUT
6369
shell: bash
6470
- name: Cache cargo build
65-
uses: actions/cache@v2
71+
uses: actions/cache@v3
6672
with:
6773
path: target
68-
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
69-
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
74+
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
75+
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-${{ matrix.mode }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
7076
- name: Install Rustup using ./rustup-init.sh
7177
run: |
7278
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
@@ -94,51 +100,55 @@ jobs:
94100
docker build -t "$DOCKER" -f "ci/docker/${DOCKER}/Dockerfile" .
95101
fi
96102
- name: Run the build within the docker image
103+
env:
104+
BUILD_PROFILE: ${{ matrix.mode }}
97105
run: |
98106
mkdir -p "${PWD}/target"
99107
chown -R "$(id -u)":"$(id -g)" "${PWD}/target"
100108
docker run \
101109
--entrypoint sh \
102-
--user "$(id -u)":"$(id -g)" \
103-
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
104-
--volume "${PWD}":/checkout:ro \
105-
--volume "${PWD}"/target:/checkout/target \
106-
--workdir /checkout \
107-
--env TARGET="${TARGET}" \
108-
--env SKIP_TESTS="${SKIP_TESTS}" \
109-
--volume "${HOME}/.cargo:/cargo" \
110+
--env BUILD_PROFILE="${BUILD_PROFILE}" \
110111
--env CARGO_HOME=/cargo \
111112
--env CARGO_TARGET_DIR=/checkout/target \
112113
--env LIBZ_SYS_STATIC=1 \
113-
--tty \
114+
--env SKIP_TESTS="${SKIP_TESTS}" \
115+
--env TARGET="${TARGET}" \
114116
--init \
115117
--rm \
118+
--tty \
119+
--user "$(id -u)":"$(id -g)" \
120+
--volume "$(rustc --print sysroot)":/rustc-sysroot:ro \
121+
--volume "${HOME}/.cargo:/cargo" \
122+
--volume "${PWD}":/checkout:ro \
123+
--volume "${PWD}"/target:/checkout/target \
124+
--workdir /checkout \
116125
"${DOCKER}" \
117126
-c 'PATH="${PATH}":/rustc-sysroot/bin bash ci/run.bash'
118127
- name: Upload the built artifact
119-
uses: actions/upload-artifact@v2
128+
uses: actions/upload-artifact@v3
129+
if: matrix.mode == 'release'
120130
with:
121131
name: rustup-init-${{ matrix.target }}
122132
path: |
123133
target/${{ matrix.target }}/release/rustup-init
124134
retention-days: 7
125135
- name: Acquire the AWS tooling
136+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
126137
run: |
127138
pip3 install -U setuptools
128139
pip3 install awscli
129-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
130140
- name: Prepare the dist
141+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
131142
run: |
132143
bash ci/prepare-deploy.bash
133-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
134144
- name: Deploy build to dev-static dist tree for release team
145+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable' && matrix.mode == 'release'
135146
run: |
136147
aws s3 cp --recursive deploy/ s3://dev-static-rust-lang-org/rustup/
137148
env:
138149
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
139150
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
140151
AWS_DEFAULT_REGION: us-west-1
141-
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
142152
- name: Clear the cargo caches
143153
run: |
144154
cargo install cargo-cache --no-default-features --features ci-autoclean

0 commit comments

Comments
 (0)