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
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 :
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