Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,18 @@ cargo tree $ARGS -e normal,build $TREE_FMT > evidence/$TARGET/tree.txt
cargo tree $ARGS -e normal,no-proc-macro $TREE_FMT > evidence/$TARGET/runtime-tree.txt
```

Always pass `--target`, even for a native build: without it `cargo tree` does not separate
host and target features, so a dependency that builds with different features for a build
script and for the product (e.g. `tracing-core` in dnp3) makes the cross-check fail.

Use `cross build` instead of `cargo build` for cross builds; the trees can run on the runner
when its host triple equals the container's. The trees must come from the build's host:
build dependencies are resolved for the host, so a tree produced on a Linux packaging runner
does not describe a build that ran on Windows.

A complete example of the recipe in CI, including Windows, macOS and `cross`, is dnp3's
[`build-evidence.sh`](https://github.com/stepfunc/dnp3/blob/main/.github/scripts/build-evidence.sh).

Once, anywhere, from the same checkout:

```sh
Expand Down
Loading