diff options
Diffstat (limited to '.github/ci/rustfmt.sh')
| -rwxr-xr-x | .github/ci/rustfmt.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.github/ci/rustfmt.sh b/.github/ci/rustfmt.sh new file mode 100755 index 000000000..369239cfe --- /dev/null +++ b/.github/ci/rustfmt.sh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ## on push branch~=gh-readonly-queue/main/.* | ||
| 3 | ## on pull_request | ||
| 4 | |||
| 5 | set -euo pipefail | ||
| 6 | |||
| 7 | export RUSTUP_HOME=/ci/cache/rustup | ||
| 8 | export CARGO_HOME=/ci/cache/cargo | ||
| 9 | export CARGO_TARGET_DIR=/ci/cache/target | ||
| 10 | mv rust-toolchain-nightly.toml rust-toolchain.toml | ||
| 11 | |||
| 12 | find . -name '*.rs' -not -path '*target*' | xargs rustfmt --check --skip-children --unstable-features --edition 2021 | ||
