Skip to content

Commit

Permalink
Updates README (#537)
Browse files Browse the repository at this point in the history
The original text suggested using `--all-targets` for building.  This
replaces that with `--all-features` as the suggestion for both building
and testing.  Removing `--all-targets`, especially for tests, is good
because doc tests don't get built/run with that parameter.

Adds a clean/build everything script to make it easier to run most of what
CI does.  Adds this to the README as well.
  • Loading branch information
almann authored Apr 29, 2023
1 parent c03ed2d commit 33a8fb9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ $ git submodule update --init --recursive
Building the project:

```bash
$ cargo build --workspace --all-targets
$ cargo build --workspace --all-features
```

Running all tests for `ion-rust`:

```bash
$ cargo test --workspace
$ cargo test --workspace --all-features
```

Our continuous integration builds/tests, checks formatting, builds all API docs including private,
and clippy linting, you will likely want to check most of these to avoid having to wait until the
CI finds it:

```bash
$ ./clean-rebuild.sh
```

[spec]: https://amazon-ion.github.io/ion-docs/docs/spec.html
Expand Down
23 changes: 23 additions & 0 deletions clean-rebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

# update the index
cargo update

# default build
cargo clean
cargo test --workspace

# all features
cargo clean
cargo test --workspace --all-features

# make sure formatting is good
cargo fmt -- --check

# make sure we deal with lints
cargo clippy --workspace --all-features --tests -- -Dwarnings

# general **all** rustdoc
cargo doc --document-private-items --all-features

0 comments on commit 33a8fb9

Please sign in to comment.