name: build
on: [push, pull_request]
jobs:
build:
name: Build on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Build
run: cargo build --verbose --all-targets
- name: Clippy check
run: cargo clippy --all-targets
- name: Run tests
run: cargo test --verbose
- name: Run rustfmt
run: cargo fmt -- --check
- name: Generate doc
run: |
cargo doc --all --no-deps
echo '<meta http-equiv=refresh content=0;url=uhlc/index.html>' > ./target/doc/index.html
nostd:
name: Run no_std checks
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install nightly Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-none override: true
- name: Perform no_std checks
uses: actions-rs/cargo@v1
with:
command: check
args: --bin nostd_check --target x86_64-unknown-none --manifest-path ci/nostd-check/Cargo.toml