Skip to content

Commit 66c4922

Browse files
authored
disable target-cpu=native
until rust-lang/rust#54688 is resolved
1 parent ebf60c8 commit 66c4922

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

rust.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ parameters:
66
jobs:
77
- job: test
88
timeoutInMinutes: 0
9+
condition: ne(variables['Build.Reason'], 'IndividualCI') # TODO: Think this thru. Intended to stop dupe tests.
910

1011
variables: ${{ parameters.default }}
1112
strategy:
@@ -105,32 +106,31 @@ jobs:
105106
WORKSPACE_ROOT=$(pwd)
106107
for WORKSPACE_MEMBER in $(find . -type f -name Cargo.toml | sort); do ( # TODO: ensure this matches cargo metadata
107108
pushd ${WORKSPACE_MEMBER%/Cargo.toml} > /dev/null
108-
# for TARGET in $RUST_TARGET_CHECK $RUST_TARGET_BUILD $RUST_TARGET_RUN; do (
109-
# cargo +$RUST_LINT_TOOLCHAIN clippy --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES -- -D warnings
110-
# ); done
111-
# for TARGET in $RUST_TARGET_BUILD $RUST_TARGET_RUN; do (
112-
# cargo +$TOOLCHAIN build --verbose --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES
113-
# case "${TARGET%%-*}" in i386|i686|x86_64) RUSTFLAGS="$RUSTFLAGS -C target-cpu=native";; esac
114-
# cargo +$TOOLCHAIN build --verbose --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES --release
115-
# ); done
109+
for TARGET in $RUST_TARGET_CHECK $RUST_TARGET_BUILD $RUST_TARGET_RUN; do (
110+
cargo +$RUST_LINT_TOOLCHAIN clippy --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES -- -D warnings
111+
); done
112+
for TARGET in $RUST_TARGET_BUILD $RUST_TARGET_RUN; do (
113+
cargo +$TOOLCHAIN build --verbose --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES
114+
case "${TARGET%%-*}" in i386|i686|x86_64) RUSTFLAGS="$RUSTFLAGS ";; esac
115+
cargo +$TOOLCHAIN build --verbose --target "$TARGET" --all-targets --no-default-features --features "$FEATURES" $ALL_FEATURES --release
116+
); done
116117
[ "$WORKSPACE_ROOT" == $(pwd) ] || unset RUST_TEST_FLAGS RUST_TEST_RELEASE_FLAGS
117118
for TARGET in $RUST_TARGET_RUN; do (
118-
# eval 'RUST_BACKTRACE=full cargo +$TOOLCHAIN test --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES' "${RUST_TEST_FLAGS-}"
119-
# eval 'RUSTFLAGS="$RUSTFLAGS -C target-cpu=native" RUST_BACKTRACE=full cargo +$TOOLCHAIN test --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES --release' "${RUST_TEST_RELEASE_FLAGS-}"
120-
# RUSTFLAGS="$RUSTFLAGS -C target-cpu=native" RUST_BACKTRACE=full cargo +$TOOLCHAIN bench --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES
119+
eval 'RUST_BACKTRACE=full cargo +$TOOLCHAIN test --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES' "${RUST_TEST_FLAGS-}"
120+
eval 'RUSTFLAGS="$RUSTFLAGS " RUST_BACKTRACE=full cargo +$TOOLCHAIN test --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES --release' "${RUST_TEST_RELEASE_FLAGS-}"
121+
RUSTFLAGS="$RUSTFLAGS " RUST_BACKTRACE=full cargo +$TOOLCHAIN bench --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES
121122
RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES
122-
RUSTFLAGS="$RUSTFLAGS -C target-cpu=native" RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES --release
123+
RUSTFLAGS="$RUSTFLAGS " RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --no-default-features --features "$FEATURES" $ALL_FEATURES --release
123124
for example in examples/*.rs examples/*/; do example=${example#"examples/"}; example=${example%".rs"}; example=${example%"/"}; (
124125
RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --example "$example" --no-default-features --features "$FEATURES" $ALL_FEATURES
125-
RUSTFLAGS="$RUSTFLAGS -C target-cpu=native" RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --example "$example" --no-default-features --features "$FEATURES" $ALL_FEATURES --release
126+
RUSTFLAGS="$RUSTFLAGS " RUST_BACKTRACE=full cargo +$TOOLCHAIN run --target "$TARGET" --example "$example" --no-default-features --features "$FEATURES" $ALL_FEATURES --release
126127
); done
127128
); done
128129
popd > /dev/null
129130
); done
130131
); done; IFS=$OLD_IFS
131132
); done; IFS=$OLD_IFS
132133
); done
133-
condition: ne(variables['Build.Reason'], 'IndividualCI') # TODO: Think this thru. Intended to stop dupe tests.
134134
displayName: Build & Run
135135
136136
- bash: |

0 commit comments

Comments
 (0)