Skip to content

Commit

Permalink
update build scripts (#241)
Browse files Browse the repository at this point in the history
* Adds the `typos` utility, mirroring Freta's internal development practices
* Runs tests & lints earlier in the build
  • Loading branch information
demoray authored Jan 18, 2023
1 parent 29d6a52 commit a06c9df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[files]
extend-exclude = [
# there are a test input files, not source code which we manage
"test/*.txt",
]
10 changes: 6 additions & 4 deletions eng/build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/usr/bin/bash

set -exu

set -uvex -o pipefail

DEBIAN_FRONTEND=noninteractive sudo apt-get install musl-dev musl-tools musl

rustup component add rustfmt
rustup target add x86_64-unknown-linux-musl
rustup update stable

cargo install typos-cli
typos

cargo fmt -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::pedantic -A clippy::missing_errors_doc
cargo test --release --target x86_64-unknown-linux-musl --locked --all-targets --all-features
cargo build --release --no-default-features --target x86_64-unknown-linux-musl --locked
cp target/x86_64-unknown-linux-musl/release/avml target/x86_64-unknown-linux-musl/release/avml-minimal
cargo build --release --target x86_64-unknown-linux-musl --locked
cargo build --release --target x86_64-unknown-linux-musl --locked --bin avml-upload --features "put blobstore status"
cargo test --release --target x86_64-unknown-linux-musl --locked
cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::pedantic -A clippy::missing_errors_doc
strip target/x86_64-unknown-linux-musl/release/avml
strip target/x86_64-unknown-linux-musl/release/avml-minimal
strip target/x86_64-unknown-linux-musl/release/avml-convert
Expand Down

0 comments on commit a06c9df

Please sign in to comment.