Skip to content

Commit

Permalink
Merge pull request #16 from paolobarbolini/skeptic
Browse files Browse the repository at this point in the history
Stop skeptic from having to be compiled by all downstream users
  • Loading branch information
tatsuya6502 authored Jun 6, 2021
2 parents 2c93e3b + f790630 commit c909209
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
# Run against the last commit on the default branch on Friday at 8pm (UTC?)
- cron: '0 20 * * 5'

env:
RUSTFLAGS: '--cfg skeptic'

jobs:
test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ getrandom = "0.2"
skeptic = "0.13"
tokio = { version = "1", features = ["rt-multi-thread", "macros" ] }

[build-dependencies]
[target.'cfg(skeptic)'.build-dependencies]
skeptic = "0.13"
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#[cfg(skeptic)]
fn main() {
// generates doc tests for `README.md`.
skeptic::generate_doc_tests(&["README.md"]);
}

#[cfg(not(skeptic))]
fn main() {}
1 change: 1 addition & 0 deletions tests/skeptic.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#[cfg(skeptic)]
include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs"));

0 comments on commit c909209

Please sign in to comment.