1name: Rust 2 3on: 4 push: 5 branches: [ master ] 6 pull_request: 7 branches: [ master ] 8 9env: 10 CARGO_TERM_COLOR: always 11 12permissions: read-all 13 14jobs: 15 test: 16 runs-on: ubuntu-latest 17 strategy: 18 fail-fast: false 19 matrix: 20 rust: [stable, beta, nightly] 21 22 steps: 23 - uses: actions/checkout@v3 24 - name: Install Rust 25 run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} 26 - name: Run Tests 27 run: cargo test --verbose 28 - run: cargo build --all --all-features --all-targets 29 - name: Catch missing feature flags 30 if: startsWith(matrix.rust, 'nightly') 31 run: cargo check -Z features=dev_dep 32 - name: Install cargo-hack 33 uses: taiki-e/install-action@cargo-hack 34 - run: rustup target add thumbv7m-none-eabi 35 - name: Ensure we don't depend on libstd 36 run: cargo hack build --target thumbv7m-none-eabi --no-dev-deps --no-default-features 37 38 msrv: 39 runs-on: ubuntu-latest 40 strategy: 41 matrix: 42 version: [1.38.0] 43 steps: 44 - uses: actions/checkout@v3 45 - name: Install Rust 46 run: rustup update ${{ matrix.version }} && rustup default ${{ matrix.version }} 47 - run: cargo check --all --all-features 48 49 miri: 50 runs-on: ubuntu-latest 51 steps: 52 - uses: actions/checkout@v3 53 - name: Install Rust 54 run: rustup toolchain install nightly --component miri && rustup default nightly 55 - run: cargo miri test 56 env: 57 MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks 58 RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout 59