-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up GitHub Actions CI #10
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,78 @@ | ||||||
name: CI | ||||||
|
||||||
on: | ||||||
pull_request: | ||||||
branches: | ||||||
- master | ||||||
push: | ||||||
branches: | ||||||
- master | ||||||
|
||||||
env: | ||||||
RUSTFLAGS: -Dwarnings | ||||||
RUST_BACKTRACE: 1 | ||||||
|
||||||
jobs: | ||||||
test: | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- name: Install Rust | ||||||
run: rustup update stable | ||||||
- run: cargo test --all-features --workspace | ||||||
- run: cargo build --all-features --all-targets --workspace | ||||||
|
||||||
no-std: | ||||||
strategy: | ||||||
matrix: | ||||||
target: | ||||||
# TODO: Currently, valuable cannot build with targets that do not have atomic CAS. | ||||||
# We should port https://github.com/rust-lang/futures-rs/pull/2400. | ||||||
# - thumbv6m-none-eabi | ||||||
- thumbv7m-none-eabi | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- name: Install Rust | ||||||
run: rustup update stable | ||||||
- run: rustup target add ${{ matrix.target }} | ||||||
# TODO: Currently, valuable cannot build without `alloc` feature | ||||||
# because `Debug` impl of `dyn Enumerable` uses `format!` macro. | ||||||
Comment on lines
+39
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mainly due to the following two lines. valuable/valuable/src/enumerable.rs Line 109 in 7640b04
valuable/valuable/src/enumerable.rs Line 124 in 7640b04
@carllerche: Do you think it's ok to change it to print only variant name when alloc feature is disabled? (like the following) #[cfg(feature = "alloc")]
let name = format!("{}::{}", self.name, variant.name());
#[cfg(not(feature = "alloc"))]
let name = variant.name(); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah... we can probably tweak that. I'm fine w/ your proposal. Another PR 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. filed #11 |
||||||
# - run: cargo build --target ${{ matrix.target }} --no-default-features | ||||||
# working-directory: valuable | ||||||
# - run: cargo build --target ${{ matrix.target }} --no-default-features --features derive | ||||||
# working-directory: valuable | ||||||
- run: cargo build --target ${{ matrix.target }} --no-default-features --features alloc | ||||||
working-directory: valuable | ||||||
- run: cargo build --target ${{ matrix.target }} --no-default-features --features alloc,derive | ||||||
working-directory: valuable | ||||||
|
||||||
# TODO: Currently, valuable cannot build without `alloc` feature | ||||||
# because `Debug` impl of `dyn Enumerable` uses `format!` macro. | ||||||
# features: | ||||||
# runs-on: ubuntu-latest | ||||||
# steps: | ||||||
# - uses: actions/checkout@v2 | ||||||
# - name: Install Rust | ||||||
# run: rustup update stable | ||||||
# - name: Install cargo-hack | ||||||
# run: cargo install cargo-hack | ||||||
# - run: cargo hack build --workspace --feature-powerset --no-dev-deps | ||||||
|
||||||
fmt: | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- name: Install Rust | ||||||
run: rustup update stable | ||||||
- run: cargo fmt --all -- --check | ||||||
|
||||||
docs: | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- name: Install Rust | ||||||
run: rustup update nightly && rustup default nightly | ||||||
- run: cargo doc --no-deps --all-features | ||||||
env: | ||||||
RUSTDOCFLAGS: -Dwarnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix of this is in my other branch (be24a36), but it is bigger than this PR, so perhaps separate PR would be preferable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed #12