Skip to content

Commit

Permalink
tools add rust-workflow.sh
Browse files Browse the repository at this point in the history
script to help check things that will happen on github before
they are pushed to github
  • Loading branch information
jtmoon79 committed Dec 30, 2022
1 parent 5593ff8 commit 8e3b72a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tools/rust-workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# Locally run the significant commands done in the
# `.github/workflows/rust.yml` file. Run this before pushing to github.
#
# Developers must manually update this script when `rust.yml` changes.

set -euo pipefail

cd "$(dirname -- "${0}")/.."

declare -r S4R=./target/release/s4
declare -r S4D=./target/debug/s4
declare -ar S4_TEST_FILES=(
./logs/other/tests/dtf2-2.log
./logs/other/tests/dtf3-2a.log
./logs/other/tests/dtf5-6a.log.gz
./logs/other/tests/dtf7-20-LEVELS.log.xz
./logs/other/tests/gen-2-1.tar
./logs/other/tests/gen-20-1-faces.log
./logs/other/tests/gen-20-1-⚀⚁⚂⚃⚄⚅.log
./logs/other/tests/gen-20-2-2-faces.log
)

set -x

cargo build
cargo build --release
cargo test
cargo check --all-targets --release
cargo clippy --no-deps --all-targets --all-features
cargo doc --locked --release --frozen --no-deps
cargo publish --dry-run --allow-dirty
"${S4R}" --color=never "${S4_TEST_FILES[@]}" 2>/dev/null
"${S4D}" --color=never "${S4_TEST_FILES[@]}" 2>/dev/null
./tools/compare-grep-sort.sh

0 comments on commit 8e3b72a

Please sign in to comment.