diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1e2c904b4941..25e826839c9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,122 +27,123 @@ defaults: shell: bash jobs: - style_check: - name: Style check - runs-on: ubuntu-26.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - name: Setup Rust toolchain - run: ./ci/install-rust.sh && rustup component add rustfmt - - name: Check style - run: ./ci/style.py + # style_check: + # name: Style check + # runs-on: ubuntu-26.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - name: Setup Rust toolchain + # run: ./ci/install-rust.sh && rustup component add rustfmt + # - name: Check style + # run: ./ci/style.py - clippy: - name: Clippy on ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-26.04, macos-26, windows-2025] - runs-on: ${{ matrix.os }} - timeout-minutes: 10 - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - run: rustup update stable --no-self-update - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - # Here we use the latest stable Rust toolchain already installed by GitHub - # Ideally we should run it for every target, but we cannot rely on unstable toolchains - # due to Clippy not being consistent between them. - - run: cargo clippy --workspace --exclude libc-test --exclude ctest-test --all-targets -- -D warnings + # clippy: + # name: Clippy on ${{ matrix.os }} + # strategy: + # matrix: + # os: [ubuntu-26.04, macos-26, windows-2025] + # runs-on: ${{ matrix.os }} + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - run: rustup update stable --no-self-update + # - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + # # Here we use the latest stable Rust toolchain already installed by GitHub + # # Ideally we should run it for every target, but we cannot rely on unstable toolchains + # # due to Clippy not being consistent between them. + # - run: cargo clippy --workspace --exclude libc-test --exclude ctest-test --all-targets -- -D warnings # This runs `cargo build --target ...` for all T1 and T2 targets` - verify_build: - name: Verify build - strategy: - matrix: - toolchain: [stable, 1.65.0] - include: - # Nightly has a lot of targets, so split it in half - - toolchain: nightly - half: 1 - - toolchain: nightly - half: 2 - - toolchain: beta - only: '(aarch64|x86_64)' # just a spot check for beta - - toolchain: stable - - toolchain: 1.65.0 # msrv - runs-on: ubuntu-26.04 - timeout-minutes: 25 - env: - TOOLCHAIN: ${{ matrix.toolchain }} - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - name: Setup Rust toolchain - run: ./ci/install-rust.sh + # verify_build: + # name: Verify build + # strategy: + # matrix: + # toolchain: [stable, 1.65.0] + # include: + # # Nightly has a lot of targets, so split it in half + # - toolchain: nightly + # half: 1 + # - toolchain: nightly + # half: 2 + # - toolchain: beta + # only: '(aarch64|x86_64)' # just a spot check for beta + # - toolchain: stable + # - toolchain: 1.65.0 # msrv + # runs-on: ubuntu-26.04 + # timeout-minutes: 25 + # env: + # TOOLCHAIN: ${{ matrix.toolchain }} + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - name: Setup Rust toolchain + # run: ./ci/install-rust.sh - - name: Install semver-checks - uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2.84.0 - if: matrix.toolchain == 'stable' - with: - tool: cargo-semver-checks + # - name: Install semver-checks + # uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2.84.0 + # if: matrix.toolchain == 'stable' + # with: + # tool: cargo-semver-checks - - name: Retrieve semver baseline - if: matrix.toolchain == 'stable' - run: ./ci/prep-semver-baseline.sh + # - name: Retrieve semver baseline + # if: matrix.toolchain == 'stable' + # run: ./ci/prep-semver-baseline.sh - # FIXME(ci): These `du` statements are temporary for debugging cache - - name: Target size before restoring cache - run: du -sh target | sort -k 2 || true - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - with: - key: ${{ matrix.os }}-${{ matrix.toolchain }} - - name: Target size after restoring cache - run: du -sh target | sort -k 2 || true + # # FIXME(ci): These `du` statements are temporary for debugging cache + # - name: Target size before restoring cache + # run: du -sh target | sort -k 2 || true + # - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + # with: + # key: ${{ matrix.os }}-${{ matrix.toolchain }} + # - name: Target size after restoring cache + # run: du -sh target | sort -k 2 || true - - name: Execute build check - run: | - set -eux - if [ "${{ matrix.toolchain }}" = "1.65.0" ]; then - # * Remove `-Dwarnings` at the MSRV since lints may be different - # * Allow `improper_ctypes` since pointers to ZSTs got the warning prior - # to 1.72. - # * Enable `unknown_lints` since we have some config not known at this - # version. - # FIXME(msrv): update this list when possible. - export RUSTFLAGS="-Aimproper_ctypes -Aunknown_lints" - # Remove `ctest` which uses the 2024 edition - perl -i -ne 'print unless /"ctest(-test)?",/ || /"libc-test",/' Cargo.toml - fi + # - name: Execute build check + # run: | + # set -eux + # if [ "${{ matrix.toolchain }}" = "1.65.0" ]; then + # # * Remove `-Dwarnings` at the MSRV since lints may be different + # # * Allow `improper_ctypes` since pointers to ZSTs got the warning prior + # # to 1.72. + # # * Enable `unknown_lints` since we have some config not known at this + # # version. + # # FIXME(msrv): update this list when possible. + # export RUSTFLAGS="-Aimproper_ctypes -Aunknown_lints" + # # Remove `ctest` which uses the 2024 edition + # perl -i -ne 'print unless /"ctest(-test)?",/ || /"libc-test",/' Cargo.toml + # fi - python3 ci/verify-build.py \ - --toolchain "$TOOLCHAIN" \ - ${BASELINE_CRATE_DIR:+"--baseline-crate-dir" "$BASELINE_CRATE_DIR"} \ - ${{ matrix.only && format('--only "{0}"', matrix.only) }} \ - ${{ matrix.half && format('--half "{0}"', matrix.half) }} - - name: Target size after job completion - run: du -sh target | sort -k 2 + # python3 ci/verify-build.py \ + # --toolchain "$TOOLCHAIN" \ + # ${BASELINE_CRATE_DIR:+"--baseline-crate-dir" "$BASELINE_CRATE_DIR"} \ + # ${{ matrix.only && format('--only "{0}"', matrix.only) }} \ + # ${{ matrix.half && format('--half "{0}"', matrix.half) }} + # - name: Target size after job completion + # run: du -sh target | sort -k 2 test_tier1: name: Test tier1 strategy: + fail-fast: false matrix: include: - - target: aarch64-apple-darwin - os: macos-26 + # - target: aarch64-apple-darwin + # os: macos-26 - target: aarch64-pc-windows-msvc os: windows-11-arm - - target: aarch64-unknown-linux-gnu - os: ubuntu-26.04-arm + # - target: aarch64-unknown-linux-gnu + # os: ubuntu-26.04-arm - target: i686-pc-windows-gnu os: windows-2025 - target: i686-pc-windows-msvc os: windows-2025 - - target: i686-unknown-linux-gnu + # - target: i686-unknown-linux-gnu - target: x86_64-pc-windows-gnu os: windows-2025 - target: x86_64-pc-windows-msvc @@ -187,255 +188,255 @@ jobs: path: ${{ env.ARCHIVE_PATH }} retention-days: 5 - test_tier2: - name: Test tier2 - needs: [test_tier1, style_check] - strategy: - fail-fast: true - max-parallel: 16 - matrix: - include: - - target: aarch64-linux-android - - target: aarch64-unknown-linux-musl - - target: aarch64-unknown-linux-musl - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - - target: arm-linux-androideabi - - target: arm-unknown-linux-gnueabihf - - target: arm-unknown-linux-musleabihf - - target: arm-unknown-linux-musleabihf - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - # FIXME(#4297): Disabled due to spurious failue - # - target: i686-linux-android - - target: i686-unknown-linux-musl - - target: i686-unknown-linux-musl - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - - target: loongarch64-unknown-linux-gnu - - target: loongarch64-unknown-linux-musl - - target: loongarch64-unknown-linux-musl - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - - target: powerpc64-unknown-linux-gnu - - target: powerpc64-unknown-linux-musl - - target: powerpc64-unknown-linux-musl - env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - - target: powerpc64le-unknown-linux-gnu - - target: powerpc64le-unknown-linux-musl - - target: powerpc64le-unknown-linux-musl - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - - target: riscv64gc-unknown-linux-gnu - - target: s390x-unknown-linux-gnu - - target: sparc64-unknown-linux-gnu - - target: wasm32-unknown-emscripten - - target: wasm32-wasip1 - - target: wasm32-wasip2 - - target: x86_64-apple-darwin - os: macos-26-intel - - target: x86_64-linux-android - env: { TEST_CUTTLEFISH: 1 } - # Keep in sync with the Android build pinned in ci/cuttlefish-setup.sh - artifact-tag: android17 - # FIXME: Exec format error (os error 8) - # - target: x86_64-unknown-linux-gnux32 - - target: x86_64-unknown-linux-musl - - target: x86_64-unknown-linux-musl - env: { TEST_MUSL_V1_2_3: 1 } - artifact-tag: new-musl - # FIXME: It seems some items in `src/unix/mod.rs` aren't defined on redox actually. - # - target: x86_64-unknown-redox + # test_tier2: + # name: Test tier2 + # needs: [test_tier1, style_check] + # strategy: + # fail-fast: true + # max-parallel: 16 + # matrix: + # include: + # - target: aarch64-linux-android + # - target: aarch64-unknown-linux-musl + # - target: aarch64-unknown-linux-musl + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # - target: arm-linux-androideabi + # - target: arm-unknown-linux-gnueabihf + # - target: arm-unknown-linux-musleabihf + # - target: arm-unknown-linux-musleabihf + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # # FIXME(#4297): Disabled due to spurious failue + # # - target: i686-linux-android + # - target: i686-unknown-linux-musl + # - target: i686-unknown-linux-musl + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # - target: loongarch64-unknown-linux-gnu + # - target: loongarch64-unknown-linux-musl + # - target: loongarch64-unknown-linux-musl + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # - target: powerpc64-unknown-linux-gnu + # - target: powerpc64-unknown-linux-musl + # - target: powerpc64-unknown-linux-musl + # env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # - target: powerpc64le-unknown-linux-gnu + # - target: powerpc64le-unknown-linux-musl + # - target: powerpc64le-unknown-linux-musl + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # - target: riscv64gc-unknown-linux-gnu + # - target: s390x-unknown-linux-gnu + # - target: sparc64-unknown-linux-gnu + # - target: wasm32-unknown-emscripten + # - target: wasm32-wasip1 + # - target: wasm32-wasip2 + # - target: x86_64-apple-darwin + # os: macos-26-intel + # - target: x86_64-linux-android + # env: { TEST_CUTTLEFISH: 1 } + # # Keep in sync with the Android build pinned in ci/cuttlefish-setup.sh + # artifact-tag: android17 + # # FIXME: Exec format error (os error 8) + # # - target: x86_64-unknown-linux-gnux32 + # - target: x86_64-unknown-linux-musl + # - target: x86_64-unknown-linux-musl + # env: { TEST_MUSL_V1_2_3: 1 } + # artifact-tag: new-musl + # # FIXME: It seems some items in `src/unix/mod.rs` aren't defined on redox actually. + # # - target: x86_64-unknown-redox - # FIXME(ppc): SIGILL running tests, see - # https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713 - # - target: powerpc-unknown-linux-gnu - runs-on: ${{ matrix.os && matrix.os || 'ubuntu-26.04' }} - timeout-minutes: 25 - env: - TARGET: ${{ matrix.target }} - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - name: Setup Rust toolchain - run: ./ci/install-rust.sh - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - with: - key: ${{ matrix.target }} + # # FIXME(ppc): SIGILL running tests, see + # # https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713 + # # - target: powerpc-unknown-linux-gnu + # runs-on: ${{ matrix.os && matrix.os || 'ubuntu-26.04' }} + # timeout-minutes: 25 + # env: + # TARGET: ${{ matrix.target }} + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - name: Setup Rust toolchain + # run: ./ci/install-rust.sh + # - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + # with: + # key: ${{ matrix.target }} - - name: Add matrix env variables to the environment - if: matrix.env - run: | - echo '${{ toJson(matrix.env) }}' | - jq -r 'to_entries | map("\(.key)=\(.value|tostring)") | .[]' >>$GITHUB_ENV - shell: bash + # - name: Add matrix env variables to the environment + # if: matrix.env + # run: | + # echo '${{ toJson(matrix.env) }}' | + # jq -r 'to_entries | map("\(.key)=\(.value|tostring)") | .[]' >>$GITHUB_ENV + # shell: bash - - name: Run natively - if: runner.os != 'Linux' - run: ./ci/run.sh ${{ matrix.target }} - - name: Run in Docker - if: runner.os == 'Linux' - run: ./ci/run-docker.sh ${{ matrix.target }} + # - name: Run natively + # if: runner.os != 'Linux' + # run: ./ci/run.sh ${{ matrix.target }} + # - name: Run in Docker + # if: runner.os == 'Linux' + # run: ./ci/run-docker.sh ${{ matrix.target }} - - name: Create CI artifacts - id: create_artifacts - if: always() - run: ./ci/create-artifacts.py - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: always() && steps.create_artifacts.outcome == 'success' - with: - name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }} - path: ${{ env.ARCHIVE_PATH }} - retention-days: 5 + # - name: Create CI artifacts + # id: create_artifacts + # if: always() + # run: ./ci/create-artifacts.py + # - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + # if: always() && steps.create_artifacts.outcome == 'success' + # with: + # name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }} + # path: ${{ env.ARCHIVE_PATH }} + # retention-days: 5 - test_tier2_vm: - name: Test tier2 VM - needs: [test_tier1, style_check] - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - include: - - release: "15.0" - target: i686-unknown-freebsd - - release: "14.4" - target: x86_64-unknown-freebsd - - release: "15.0" - target: x86_64-unknown-freebsd - - target: x86_64-pc-solaris - - target: x86_64-unknown-netbsd - - target: x86_64-unknown-illumos - timeout-minutes: 25 - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - name: Test on FreeBSD - uses: vmactions/freebsd-vm@77ed28d336d03fe19a3f4f7266c1d2c4714dd79d # v1.5.2 - if: contains(matrix.target, 'freebsd') - with: - release: ${{ matrix.release }} - envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE - usesh: true - copyback: false - prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} - run: | - set -ex - . "$HOME/.cargo/env" - LIBC_CI=1 ./ci/run.sh ${{ matrix.target }} - ./ci/run.sh ${{ matrix.target }} + # test_tier2_vm: + # name: Test tier2 VM + # needs: [test_tier1, style_check] + # runs-on: ubuntu-latest + # strategy: + # fail-fast: true + # matrix: + # include: + # - release: "15.0" + # target: i686-unknown-freebsd + # - release: "14.4" + # target: x86_64-unknown-freebsd + # - release: "15.0" + # target: x86_64-unknown-freebsd + # - target: x86_64-pc-solaris + # - target: x86_64-unknown-netbsd + # - target: x86_64-unknown-illumos + # timeout-minutes: 25 + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - name: Test on FreeBSD + # uses: vmactions/freebsd-vm@77ed28d336d03fe19a3f4f7266c1d2c4714dd79d # v1.5.2 + # if: contains(matrix.target, 'freebsd') + # with: + # release: ${{ matrix.release }} + # envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE + # usesh: true + # copyback: false + # prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} + # run: | + # set -ex + # . "$HOME/.cargo/env" + # LIBC_CI=1 ./ci/run.sh ${{ matrix.target }} + # ./ci/run.sh ${{ matrix.target }} - - name: Test on Solaris - uses: vmactions/solaris-vm@315163f088b66e55bbcc45928bd224d4973b2312 # v1.3.8 - if: contains(matrix.target, 'solaris') - with: - release: "11.4-gcc" - envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE - usesh: true - mem: 4096 - copyback: false - prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} - run: ./ci/bsd-run.sh ${{ matrix.target }} + # - name: Test on Solaris + # uses: vmactions/solaris-vm@315163f088b66e55bbcc45928bd224d4973b2312 # v1.3.8 + # if: contains(matrix.target, 'solaris') + # with: + # release: "11.4-gcc" + # envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE + # usesh: true + # mem: 4096 + # copyback: false + # prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} + # run: ./ci/bsd-run.sh ${{ matrix.target }} - - name: Test on NetBSD - uses: vmactions/netbsd-vm@0c26a4c4a5e234038862a4a53a00c905b8a107c9 # v1.4.2 - if: contains(matrix.target, 'netbsd') - with: - release: "10.1" - envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE - usesh: true - mem: 4096 - copyback: false - prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} - run: ./ci/bsd-run.sh ${{ matrix.target }} + # - name: Test on NetBSD + # uses: vmactions/netbsd-vm@0c26a4c4a5e234038862a4a53a00c905b8a107c9 # v1.4.2 + # if: contains(matrix.target, 'netbsd') + # with: + # release: "10.1" + # envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE + # usesh: true + # mem: 4096 + # copyback: false + # prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} + # run: ./ci/bsd-run.sh ${{ matrix.target }} - - name: Test on illumos - uses: vmactions/omnios-vm@027e3ec08fed6fb740ab5f300c2605f9de02997a # v1.3.4 - if: contains(matrix.target, 'illumos') - with: - # Use the latest LTS - release: "r151054-build" - envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE - usesh: true - mem: 4096 - copyback: false - prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} - run: ./ci/bsd-run.sh ${{ matrix.target }} + # - name: Test on illumos + # uses: vmactions/omnios-vm@027e3ec08fed6fb740ab5f300c2605f9de02997a # v1.3.4 + # if: contains(matrix.target, 'illumos') + # with: + # # Use the latest LTS + # release: "r151054-build" + # envs: CARGO_TERM_COLOR CARGO_TERM_VERBOSE RUSTDOCFLAGS RUSTFLAGS RUST_BACKTRACE + # usesh: true + # mem: 4096 + # copyback: false + # prepare: ./ci/bsd-prepare.sh ${{ matrix.target }} + # run: ./ci/bsd-run.sh ${{ matrix.target }} - ctest_msrv: - name: Check ctest MSRV - runs-on: ubuntu-26.04 - timeout-minutes: 10 - env: - RUSTFLAGS: "" # No need to check warnings on old MSRV, clear `-Dwarnings` - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - run: | - msrv="$( - cargo metadata --format-version 1 | - jq -r --arg CRATE_NAME ctest '.packages | map(select((.name == $CRATE_NAME) and (.id | startswith("path+file")))) | first | .rust_version' - )" - echo "MSRV: $msrv" - echo "MSRV=$msrv" >> "$GITHUB_ENV" - - name: Install Rust - run: rustup update "$MSRV" --no-self-update && rustup default "$MSRV" - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - - run: cargo build -p ctest + # ctest_msrv: + # name: Check ctest MSRV + # runs-on: ubuntu-26.04 + # timeout-minutes: 10 + # env: + # RUSTFLAGS: "" # No need to check warnings on old MSRV, clear `-Dwarnings` + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - run: | + # msrv="$( + # cargo metadata --format-version 1 | + # jq -r --arg CRATE_NAME ctest '.packages | map(select((.name == $CRATE_NAME) and (.id | startswith("path+file")))) | first | .rust_version' + # )" + # echo "MSRV: $msrv" + # echo "MSRV=$msrv" >> "$GITHUB_ENV" + # - name: Install Rust + # run: rustup update "$MSRV" --no-self-update && rustup default "$MSRV" + # - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + # - run: cargo build -p ctest - docs: - name: Ensure docs build - runs-on: ubuntu-26.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - name: Install Rust - run: rustup update nightly --no-self-update && rustup default nightly - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - - run: cargo doc --workspace --no-deps + # docs: + # name: Ensure docs build + # runs-on: ubuntu-26.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false + # - name: Install Rust + # run: rustup update nightly --no-self-update && rustup default nightly + # - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + # - run: cargo doc --workspace --no-deps - zizmor: - name: Zizmor (Static analysis for GitHub Actions) - runs-on: ubuntu-24.04 - permissions: - security-events: write - timeout-minutes: 10 - steps: - - name: Checkout repository - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false + # zizmor: + # name: Zizmor (Static analysis for GitHub Actions) + # runs-on: ubuntu-24.04 + # permissions: + # security-events: write + # timeout-minutes: 10 + # steps: + # - name: Checkout repository + # uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + # with: + # persist-credentials: false - - name: Run zizmor - uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7 + # - name: Run zizmor + # uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7 - # One job that "summarizes" the success state of this pipeline. This can then be added to branch - # protection, rather than having to add each job separately. - success: - name: success - runs-on: ubuntu-26.04 - needs: - - style_check - - test_tier1 - - test_tier2 - - test_tier2_vm - - verify_build - - ctest_msrv - - docs - - clippy - - zizmor - # GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency - # failed" as success. So we have to do some contortions to ensure the job fails if any of its - # dependencies fails. - if: always() # make sure this is never "skipped" - env: - NEEDS: ${{ toJson(needs) }} - steps: - # Manually check the status of all dependencies. `if: failure()` does not work. - - name: check if any dependency failed - run: jq --exit-status 'all(.result == "success")' <<< "$NEEDS" + # # One job that "summarizes" the success state of this pipeline. This can then be added to branch + # # protection, rather than having to add each job separately. + # success: + # name: success + # runs-on: ubuntu-26.04 + # needs: + # - style_check + # - test_tier1 + # - test_tier2 + # - test_tier2_vm + # - verify_build + # - ctest_msrv + # - docs + # - clippy + # - zizmor + # # GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency + # # failed" as success. So we have to do some contortions to ensure the job fails if any of its + # # dependencies fails. + # if: always() # make sure this is never "skipped" + # env: + # NEEDS: ${{ toJson(needs) }} + # steps: + # # Manually check the status of all dependencies. `if: failure()` does not work. + # - name: check if any dependency failed + # run: jq --exit-status 'all(.result == "success")' <<< "$NEEDS" diff --git a/libc-test/build.rs b/libc-test/build.rs index 20f3f750b613..4b83c5f849bd 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -916,7 +916,7 @@ fn test_windows(target: &str) { cfg.skip_struct_field(move |s, field| s.ident() == "CONTEXT" && field.ident() == "Fp"); // FIXME(windows): All functions point to the wrong addresses? - cfg.skip_fn_ptrcheck(|_| true); + // cfg.skip_fn_ptrcheck(|_| true); cfg.skip_signededness(move |c| { match c { diff --git a/src/windows/mod.rs b/src/windows/mod.rs index b156c450ca6b..22413aaa1cec 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -281,6 +281,7 @@ cfg_if! { } } +#[link(name = "ucrt")] extern "C" { pub fn isalnum(c: c_int) -> c_int; pub fn isalpha(c: c_int) -> c_int;