Resolves https://github.com/Lokathor/tinyvec/issues/191 #203
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build_test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: | |
- 1.47.0 | |
- stable | |
- beta | |
- nightly | |
include: | |
- rust: nightly | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
# On MSRV some dev-dependencies don't build so we can't run tests. | |
- name: Check MSRV | |
if: matrix.rust == '1.47.0' | |
run: | | |
cargo check --features=alloc,std,grab_spare_slice | |
- name: Test non nightly | |
if: matrix.rust != '1.47.0' && matrix.rust != 'nightly' | |
run: | | |
cargo test --features=alloc,std,grab_spare_slice | |
- name: Test on Nightly with All Features | |
if: matrix.rust == 'nightly' | |
run: | | |
cargo test --all-features | |
# The #[debugger_visualizer] attribute is currently gated behind an unstable feature flag. | |
# In order to test the visualizers for the tinyvec crate, they have to be tested on a nightly build. | |
- name: Test debugger_visualizer feature on Nightly | |
if: | | |
matrix.os == 'windows-latest' && | |
matrix.rust == 'nightly' | |
run: | | |
cargo test --all-features --test debugger_visualizer -- --test-threads=1 |