Skip to content

Update CI #172

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

Merged
merged 5 commits into from
Dec 26, 2020
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
40 changes: 26 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: CI
on: [push, pull_request]
on:
push:
branches: [ master, "v0.3.x" ]
pull_request:
branches: [ master, "v0.3.x" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full

jobs:
test:
Test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -32,34 +36,42 @@ jobs:
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
shell: bash
- run: cargo test
- run: cargo test --features all
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Run tests
run: cargo hack test --feature-powerset && cargo hack test --feature-powerset --release

rustfmt:
Rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check
- name: Check formatting
run: cargo fmt --all -- --check

check:
Check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-redox, x86_64-fuchsia]
# TODO: add the following targets, currently broken.
# "x86_64-fuchsia"
# "x86_64-unknown-redox"
target: ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "x86_64-sun-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu", "x86_64-unknown-netbsd"]
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: rustup target add ${{ matrix.target }}
- run: cargo check --target ${{ matrix.target }} --all-targets --examples --bins --tests --no-default-features
- run: cargo check --target ${{ matrix.target }} --all-targets --examples --bins --tests --all-features
continue-on-error: true
run: rustup update stable && rustup default stable
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Install Target
run: rustup target add ${{ matrix.target }}
- name: Run check
run: cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}

publish_docs:
Publish_docs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
Expand Down