Skip to content

Updated invalid_mut to without_provenance_mut due to recent change in… #292

Updated invalid_mut to without_provenance_mut due to recent change in…

Updated invalid_mut to without_provenance_mut due to recent change in… #292

Workflow file for this run

# cspell:disable
name: Rust
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: Test matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
rust:
- stable
- nightly
os:
- ubuntu-latest
- macos-latest
- windows-latest
target_feature:
- avx2
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Rustup ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
default: true
- name: Cache restore
id: cache-restore
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ matrix.rust }}-${{ matrix.target_feature }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Install cargo-hack
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
env:
CARGO_TARGET_DIR: target/
- name: Build all feature sets
uses: actions-rs/cargo@v1
with:
command: hack
args: build --feature-powerset --skip default
env:
RUSTFLAGS: "-C target-feature=+${{ matrix.target_feature }} --deny warnings"
- name: Test all feature sets
uses: actions-rs/cargo@v1
with:
command: hack
args: test --feature-powerset --skip default
env:
RUSTFLAGS: "-C target-feature=+${{ matrix.target_feature }} --deny warnings"
simd-sizes:
name: SIMD size test matrix
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Rustup stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rustup nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Setup Python
uses: actions/[email protected]
- name: Cache restore
id: cache-restore
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: simd-sizes-${{ matrix.config.feature }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Run test_simd_sizes.py
run: python ./tests/test_simd_sizes.py
clippy:
permissions:
checks: write
name: Clippy (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rustup stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
default: true
- name: Build all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
env:
RUSTFLAGS: "-C target-feature=+avx2 --deny warnings"
- name: Clippy all features
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- --deny warnings
env:
RUSTFLAGS: "-C target-feature=+avx2"
clippy-nightly:
permissions:
checks: write
name: Clippy (nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rustup nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
default: true
- name: Build all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
env:
RUSTFLAGS: "-C target-feature=+avx2 --deny warnings"
- name: Clippy all features
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- --deny warnings
env:
RUSTFLAGS: "-C target-feature=+avx2"
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rustup nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
default: true
- name: cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features --no-deps
env:
RUSTFLAGS: "-C target-feature=+avx2"
RUSTDOCFLAGS: "-Dwarnings --cfg docsrs"
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rustup stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
default: true
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check