@@ -6,6 +6,7 @@ parameters:
6
6
jobs :
7
7
- job : test
8
8
timeoutInMinutes : 0
9
+ condition : ne(variables['Build.Reason'], 'IndividualCI') # TODO: Think this thru. Intended to stop dupe tests.
9
10
10
11
variables : ${{ parameters.default }}
11
12
strategy :
@@ -105,32 +106,31 @@ jobs:
105
106
WORKSPACE_ROOT=$(pwd)
106
107
for WORKSPACE_MEMBER in $(find . -type f -name Cargo.toml | sort); do ( # TODO: ensure this matches cargo metadata
107
108
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
116
117
[ "$WORKSPACE_ROOT" == $(pwd) ] || unset RUST_TEST_FLAGS RUST_TEST_RELEASE_FLAGS
117
118
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
121
122
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
123
124
for example in examples/*.rs examples/*/; do example=${example#"examples/"}; example=${example%".rs"}; example=${example%"/"}; (
124
125
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
126
127
); done
127
128
); done
128
129
popd > /dev/null
129
130
); done
130
131
); done; IFS=$OLD_IFS
131
132
); done; IFS=$OLD_IFS
132
133
); done
133
- condition: ne(variables['Build.Reason'], 'IndividualCI') # TODO: Think this thru. Intended to stop dupe tests.
134
134
displayName: Build & Run
135
135
136
136
- bash : |
0 commit comments