mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 00:56:38 +11:00
Have just 1 script which runs all the different parts of the build
This commit is contained in:
parent
727e9829d8
commit
231db021a6
1 changed files with 23 additions and 0 deletions
23
.github/scripts/run-branch-build.sh
vendored
Normal file
23
.github/scripts/run-branch-build.sh
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e # Fail if any command fails
|
||||||
|
|
||||||
|
CARGO_PROJECT_FILES=( agb-*/Cargo.toml agb/Cargo.toml examples/*/Cargo.toml book/games/*/Cargo.toml )
|
||||||
|
|
||||||
|
for CARGO_PROJECT_FILE in "${CARGO_PROJECT_FILES[@]}"; do
|
||||||
|
PROJECT_DIR=$(dirname "$CARGO_PROJECT_FILE")
|
||||||
|
|
||||||
|
echo "Checking project $PROJECT_DIR"
|
||||||
|
(cd "$PROJECT_DIR" && cargo build)
|
||||||
|
|
||||||
|
if echo "$PROJECT_DIR" | grep -qE '^agb'; then
|
||||||
|
echo "Running clippy on $PROJECT_DIR"
|
||||||
|
(cd "$PROJECT_DIR" && cargo clippy)
|
||||||
|
|
||||||
|
echo "Testing $PROJECT_DIR in debug mode"
|
||||||
|
(cd "$PROJECT_DIR" && cargo test)
|
||||||
|
|
||||||
|
echo "Testing $PROJECT_DIR and release mode"
|
||||||
|
(cd "$PROJECT_DIR" && cargo test --release)
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Add table
Reference in a new issue