diff --git a/.github/workflows/full_ci.yml b/.github/workflows/full_ci.yml index 4389a54375ba8..3655d53605073 100644 --- a/.github/workflows/full_ci.yml +++ b/.github/workflows/full_ci.yml @@ -19,12 +19,22 @@ jobs: i686-unknown-linux-gnu, x86_64-unknown-linux-gnu, ] + bits: [ + default, + 32, + 64 + ] + exclude: + - target: x86_64-unknown-linux-gnu + bits: 32 + - target: x86_64-unknown-linux-gnu + bits: 64 steps: - uses: actions/checkout@v4 - name: Setup Rust toolchain run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh - name: Execute run-docker.sh - run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }} + run: LIBC_CI=1 RUST_LIBC_TIME_BITS=${{ matrix.bits }} sh ./ci/run-docker.sh ${{ matrix.target }} macos: permissions: @@ -133,12 +143,22 @@ jobs: # aren't defined on redox actually. # x86_64-unknown-redox, ] + include: + - bits: default + - bits: 32 + target: arm-unknown-linux-gnueabihf + - bits: 64 + target: arm-unknown-linux-gnueabihf + - bits: 32 + target: powerpc-unknown-linux-gnu + - bits: 64 + target: powerpc-unknown-linux-gnu steps: - uses: actions/checkout@v4 - name: Setup Rust toolchain run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh - name: Execute run-docker.sh - run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }} + run: LIBC_CI=1 RUST_LIBC_TIME_BITS=${{ matrix.bits }} sh ./ci/run-docker.sh ${{ matrix.target }} # These targets are tier 3 or otherwise need to have CI build std via -Zbuild-std. # Because of this, only the nightly compiler can be used on these targets. diff --git a/ci/build.sh b/ci/build.sh index e22b893222312..4809218e1bf96 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -23,6 +23,29 @@ test_target() { TARGET="${2}" NO_STD="${3}" + if [ "$RUST_LIBC_TIME_BITS" = "" ]; then + while true; do + case "$TARGET" in + arm-unknown-linux-gnueabi);; + arm-unknown-linux-gnueabihf);; + armv7-unknown-linux-gnueabihf);; + i586-unknown-linux-gnu);; + i686-unknown-linux-gnu);; + powerpc-unknown-linux-gnu);; + armv5te-unknown-linux-gnueabi);; + mips-unknown-linux-gnu);; + mipsel-unknown-linux-gnu);; + powerpc-unknown-linux-gnuspe);; + riscv32gc-unknown-linux-gnu);; + sparc-unknown-linux-gnu);; + *) break; + esac + RUST_LIBC_TIME_BITS=32 test_target "$BUILD_CMD" "$TARGET" "$NO_STD" + RUST_LIBC_TIME_BITS=64 test_target "$BUILD_CMD" "$TARGET" "$NO_STD" + break # also build without RUST_LIBC_TIME_BITS set + done + fi + # If there is a std component, fetch it: if [ "${NO_STD}" != "1" ]; then # FIXME: rustup often fails to download some artifacts due to network diff --git a/ci/run-docker.sh b/ci/run-docker.sh index 042303846f3fe..a00ca4321ffa3 100755 --- a/ci/run-docker.sh +++ b/ci/run-docker.sh @@ -43,6 +43,7 @@ run() { --env LIBC_CI_ZBUILD_STD \ --env CARGO_HOME=/cargo \ --env CARGO_TARGET_DIR=/checkout/target \ + --env RUST_LIBC_TIME_BITS \ --volume "$CARGO_HOME":/cargo \ --volume "$(rustc --print sysroot)":/rust:ro \ --volume "$(pwd)":/checkout:ro \