mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
Remove std_detect
from stdarch's CI
This commit is contained in:
parent
608297247a
commit
847f8db5ad
13
library/stdarch/.github/workflows/main.yml
vendored
13
library/stdarch/.github/workflows/main.yml
vendored
@ -258,7 +258,7 @@ jobs:
|
||||
# Check that the generated files agree with the checked-in versions.
|
||||
check-stdarch-gen:
|
||||
needs: [style]
|
||||
name: Check stdarch-gen-{arm, loongarch} output
|
||||
name: Check stdarch-gen-{arm, loongarch} output
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -277,22 +277,11 @@ jobs:
|
||||
cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lasx.spec
|
||||
git diff --exit-code
|
||||
|
||||
build-std-detect:
|
||||
needs: [style]
|
||||
name: Build std_detect
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
run: rustup update nightly && rustup default nightly
|
||||
- run: ./ci/build-std-detect.sh
|
||||
|
||||
conclusion:
|
||||
needs:
|
||||
- docs
|
||||
- verify
|
||||
- test
|
||||
- build-std-detect
|
||||
- check-stdarch-gen
|
||||
runs-on: ubuntu-latest
|
||||
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||
|
@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build std_detect on non-Linux & non-x86 targets.
|
||||
#
|
||||
# In std_detect, non-x86 targets have OS-specific implementations,
|
||||
# but we can test only Linux in CI. This script builds targets supported
|
||||
# by std_detect but cannot be tested in CI.
|
||||
|
||||
set -ex
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
targets=(
|
||||
# Linux
|
||||
aarch64-unknown-linux-musl
|
||||
armv5te-unknown-linux-musleabi
|
||||
aarch64-unknown-linux-ohos
|
||||
armv7-unknown-linux-ohos
|
||||
|
||||
# Android
|
||||
aarch64-linux-android
|
||||
arm-linux-androideabi
|
||||
|
||||
# FreeBSD
|
||||
aarch64-unknown-freebsd
|
||||
armv6-unknown-freebsd
|
||||
powerpc-unknown-freebsd
|
||||
powerpc64-unknown-freebsd
|
||||
|
||||
# OpenBSD
|
||||
aarch64-unknown-openbsd
|
||||
|
||||
# Windows
|
||||
aarch64-pc-windows-msvc
|
||||
)
|
||||
|
||||
rustup component add rust-src # for -Z build-std
|
||||
|
||||
cd crates/std_detect
|
||||
for target in "${targets[@]}"; do
|
||||
if rustup target add "${target}" &>/dev/null; then
|
||||
cargo build --target "${target}"
|
||||
else
|
||||
# tier 3 targets requires -Z build-std.
|
||||
cargo build -Z build-std="core,alloc" --target "${target}"
|
||||
fi
|
||||
done
|
@ -16,10 +16,7 @@ dox() {
|
||||
cargo clean --target "${1}"
|
||||
|
||||
cargo build --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
|
||||
cargo build --verbose --target "${1}" --manifest-path crates/std_detect/Cargo.toml
|
||||
|
||||
cargo doc --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
|
||||
cargo doc --verbose --target "${1}" --manifest-path crates/std_detect/Cargo.toml
|
||||
}
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
|
@ -37,7 +37,6 @@ run() {
|
||||
--env NORUN \
|
||||
--env RUSTFLAGS \
|
||||
--env CARGO_UNSTABLE_BUILD_STD \
|
||||
--env RUST_STD_DETECT_UNSTABLE \
|
||||
--volume "${HOME}/.cargo":/cargo \
|
||||
--volume "$(rustc --print sysroot)":/rust:ro \
|
||||
--volume "$(pwd)":/checkout:ro \
|
||||
|
@ -78,20 +78,12 @@ cargo_test() {
|
||||
}
|
||||
|
||||
CORE_ARCH="--manifest-path=crates/core_arch/Cargo.toml"
|
||||
STD_DETECT="--manifest-path=crates/std_detect/Cargo.toml"
|
||||
STDARCH_EXAMPLES="--manifest-path=examples/Cargo.toml"
|
||||
INTRINSIC_TEST="--manifest-path=crates/intrinsic-test/Cargo.toml"
|
||||
|
||||
cargo_test "${CORE_ARCH} ${PROFILE}"
|
||||
|
||||
if [ "$NOSTD" != "1" ]; then
|
||||
cargo_test "${STD_DETECT} ${PROFILE}"
|
||||
|
||||
cargo_test "${STD_DETECT} --no-default-features"
|
||||
cargo_test "${STD_DETECT} --no-default-features --features=std_detect_file_io"
|
||||
cargo_test "${STD_DETECT} --no-default-features --features=std_detect_dlsym_getauxval"
|
||||
cargo_test "${STD_DETECT} --no-default-features --features=std_detect_dlsym_getauxval,std_detect_file_io"
|
||||
|
||||
cargo_test "${STDARCH_EXAMPLES} ${PROFILE}"
|
||||
fi
|
||||
|
||||
@ -139,7 +131,7 @@ case ${TARGET} in
|
||||
cargo_test "${PROFILE}"
|
||||
;;
|
||||
|
||||
# Setup aarch64 & armv7 specific variables, the runner, along with some
|
||||
# Setup aarch64 & armv7 specific variables, the runner, along with some
|
||||
# tests to skip
|
||||
aarch64-unknown-linux-gnu*)
|
||||
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/aarch64-linux-gnu/include/ -I/usr/aarch64-linux-gnu/include/c++/9/aarch64-linux-gnu/"
|
||||
|
Loading…
x
Reference in New Issue
Block a user