name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
env:
CARGO_TERM_COLOR: always
jobs:
main:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
toolchain: x86_64-unknown-linux-gnu
- os: windows-latest
triple: x86_64-pc-windows-msvc
toolchain: x86_64-pc-windows-msvc
- os: windows-latest
triple: i686-pc-windows-msvc
toolchain: x86_64-pc-windows-msvc
- os: macOS-latest
triple: x86_64-apple-darwin
toolchain: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- run: "rustup target add ${{ matrix.triple }}"
- run: "rustup default nightly-${{ matrix.triple }}"
- run: "rustup component add clippy"
- run: "rustup component add rust-src --toolchain nightly-${{ matrix.toolchain }}"
- uses: actions/checkout@v2
- run: "cargo build --verbose"
- run: "cargo test --verbose --tests"
- run: "cargo test --verbose --doc"
- run: "cargo doc --verbose"
- name: cargo test --docsrs
run: "cargo test --verbose --doc"
env:
RUSTFLAGS: "--cfg docsrs"
RUSTDOCFLAGS: "--cfg docsrs"
- name: cargo --docsrs
run: "cargo doc --verbose"
env:
RUSTFLAGS: "--cfg docsrs"
RUSTDOCFLAGS: "--cfg docsrs"
- run: "cargo build --verbose --release"
- run: "cargo run --verbose --example rs_trigger"
- run: "cargo run --verbose --example inventory"
- run: "cargo run --verbose --example item"
- run: "cargo run --verbose --example item_with_builder"
- run: "cargo run --verbose --example item_obj"
- run: "cargo outdated --verbose --aggresssive --root-deps-only --exit-code 1"
- run: "cargo clippy --verbose"
- run: "cargo +nightly build --verbose -Z build-std=core,alloc,panic_abort --target ${{ matrix.triple }} --release"
working-directory: ensure_no_std
- run: "./ensure_no_std/target/${{ matrix.triple }}/release/ensure_no_std"