Skip to content

Commit

Permalink
RUSTFLAGS is not passed to doc tests (actions-rs#74)
Browse files Browse the repository at this point in the history
- RUSTDOCFLAGS is used to pass arguments to doc tests

Tracking issue: rust-lang/rust#43031
  • Loading branch information
sharksforarms authored Jun 4, 2020
1 parent 770fa90 commit d9881ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- uses: actions-rs/grcov@v0.1
```
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
3. Create a configuration file for `grcov`, see [config section](#config) for details.

4. Execute the `cargo test` command.
It is required to add `CARGO_INCREMENTAL` and `RUSTFLAGS` environment variables
It is required to add `CARGO_INCREMENTAL`, `RUSTFLAGS` and `RUSTDOCFLAGS` environment variables
for this command, see [grcov](https://github.com/mozilla/grcov) page for details.

```yaml
Expand All @@ -70,6 +71,7 @@ jobs:
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
```

Note that `-Clink-dead-code` flag might be broken for macOS environments,
Expand Down

0 comments on commit d9881ad

Please sign in to comment.