Version 0.5 #18
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: ci | ||
on: | ||
pull_request: | ||
push: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
rust: ["stable", "nightly"] | ||
feature_no_std: [true, false] | ||
feature_debug: [true, false] | ||
feature_unsafe_impl: [true, false] | ||
feature_ptr_metadata: [true, false] | ||
feature_error_in_core: [true, false] | ||
feature_allocator_api: [true, false] | ||
exclude: | ||
- rust: stable | ||
ptr_metadata: true | ||
- rust: stable | ||
error_in_core: true | ||
- rust: stable | ||
allocator_api: true | ||
- rust: nightly | ||
ptr_metadata: false | ||
- rust: nightly | ||
error_in_core: false | ||
- rust: nightly | ||
allocator_api: false | ||
runs-on: ${{ matrix.os }} | ||
name: | | ||
test - ${{ matrix.os }}; ${{ matrix.rust }} rust; features: join(matrix.feature_*, ',') }} | ||
env: | ||
RUST_BACKTRACE: 1 # Emit backtraces on panics. | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
- run: | | ||
Check failure on line 47 in .github/workflows/ci.yml GitHub Actions / ciInvalid workflow file
|
||
echo "FEATURES= | ||
${{ (matrix.feature_no_std == true && "no_std,") || "" }} | ||
${{ (matrix.feature_debug == true && "debug,") || "" }} | ||
${{ (matrix.feature_unsafe_impl == true && "unsafe_impl,") || "" }} | ||
${{ (matrix.feature_ptr_metadata == true && "ptr_metadata,") || "" }} | ||
${{ (matrix.feature_error_in_core == true && "error_in_core,") || "" }} | ||
${{ (matrix.feature_allocator_api == true && "allocator_api,") || "" }} | ||
" >> $GITHUB_ENV | ||
- run: cargo test --no-default-features --features=${{ env.FEATURES }} --verbose | ||
lint: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
profile: minimal | ||
components: clippy | ||
override: true | ||
- run: cargo clippy --all-features -- -D warnings # Deny clippy warnings | ||
miri: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Miri | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
profile: minimal | ||
components: miri | ||
override: true | ||
- run: cargo miri setup | ||
- run: cargo miri test --all-features --verbose --color=always |