Skip to content

Commit a97a5b1

Browse files
committed
[ci] Fix Rust toolchain roller
gherrit-pr-id: Gzl33f6ysumidym5su2pyyxp4nak4e7je
1 parent b7fc71d commit a97a5b1

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/roll-pinned-toolchain-versions.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ jobs:
6565
# worry about what time of day this job runs.
6666
echo "ZC_TARGET_TOOLCHAIN=nightly-$(date -d '-1 day' +%Y-%m-%d)" >> $GITHUB_ENV
6767
fi
68+
- name: Install stable Rust for use in 'cargo.sh'
69+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
70+
with:
71+
toolchain: stable
6872
- name: Install Rust with ${{ env.ZC_TARGET_TOOLCHAIN }} toolchain
6973
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
7074
with:
@@ -104,30 +108,14 @@ jobs:
104108
# Confirm that the update didn't bork `Cargo.toml`.
105109
validate-file "$REGEX" Cargo.toml
106110
107-
export RUSTFLAGS='--cfg zerocopy_derive_union_into_bytes'
108-
109111
# Run `cargo fix` in case there are any warnings or errors
110112
# introduced on this new toolchain that we can fix automatically.
111113
# This is best-effort, so we don't let failure cause the whole job
112114
# to fail.
113-
#
114-
# We use the full package filepaths here since our dev-dependencies
115-
# sometimes depend on zerocopy. When this happens, the names
116-
# `zerocopy` and `zerocopy-derive` alone are ambiguous (they refer
117-
# both to the local filesystem versions and to the crates.io
118-
# versions).
119-
cargo "+$VERSION_FOR_CARGO" fix --allow-dirty --tests --package file:///home/runner/work/zerocopy/zerocopy $ZEROCOPY_FEATURES || true
120-
cargo "+$VERSION_FOR_CARGO" fix --allow-dirty --tests --package file:///home/runner/work/zerocopy/zerocopy/zerocopy-derive || true
121-
122-
# Update `.stderr` files as needed for the new version.
123-
#
124-
# We use the full package filepaths here since our dev-dependencies
125-
# sometimes depend on zerocopy. When this happens, the names
126-
# `zerocopy` and `zerocopy-derive` alone are ambiguous (they refer
127-
# both to the local filesystem versions and to the crates.io
128-
# versions).
129-
TRYBUILD=overwrite cargo "+$VERSION_FOR_CARGO" test --package file:///home/runner/work/zerocopy/zerocopy $ZEROCOPY_FEATURES
130-
TRYBUILD=overwrite cargo "+$VERSION_FOR_CARGO" test --package file:///home/runner/work/zerocopy/zerocopy/zerocopy-derive
115+
./cargo.sh "+$VERSION_NAME" fix --allow-dirty --tests --package zerocopy $ZEROCOPY_FEATURES || true
116+
./cargo.sh "+$VERSION_NAME" fix --allow-dirty --tests --package zerocopy-derive || true
117+
118+
./tools/update-expected-test-output.sh
131119
}
132120
133121
if [ "$TOOLCHAIN" == stable ]; then

0 commit comments

Comments
 (0)