Skip to content

Commit

Permalink
flip order of CI commands, to check fmt and clippy first
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Devolder <[email protected]>
  • Loading branch information
keldonin authored and ionut-arm committed Sep 8, 2024
1 parent 2141f15 commit ef8aff0
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

set -euf -o pipefail

pushd cryptoki-sys
RUST_BACKTRACE=1 cargo build --features generate-bindings
popd

# check formatting before going through all the builds
if cargo fmt --version; then
cargo fmt --all -- --check
fi
if cargo clippy --version; then
cargo clippy --all-targets -- -D clippy::all -D clippy::cargo
fi

RUST_BACKTRACE=1 cargo build

RUST_BACKTRACE=1 cargo build --all-features
Expand All @@ -24,15 +36,4 @@ RUST_BACKTRACE=1 cargo build --target x86_64-apple-darwin
RUST_BACKTRACE=1 cargo build --target aarch64-apple-darwin
RUST_BACKTRACE=1 cargo build --target x86_64-unknown-freebsd

pushd cryptoki-sys
RUST_BACKTRACE=1 cargo build --features generate-bindings
popd

if cargo fmt --version; then
cargo fmt --all -- --check
fi
if cargo clippy --version; then
cargo clippy --all-targets -- -D clippy::all -D clippy::cargo
fi

RUST_BACKTRACE=1 cargo test

0 comments on commit ef8aff0

Please sign in to comment.