Skip to content

Merge pull request #54 from SOF3/get-many-mut #301

Merge pull request #54 from SOF3/get-many-mut

Merge pull request #54 from SOF3/get-many-mut #301

Workflow file for this run

name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["**"]
jobs:
fmt:
name: rustfmt check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: default
default: true
components: rustfmt
- run: cargo fmt --all -- --check
- run: make README.md && git diff --exit-code
- uses: crate-ci/typos@master
lint-test:
name: clippy lint and unit tests
runs-on: ubuntu-latest
strategy:
matrix:
profile:
- ""
- "--release"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: default
default: true
components: clippy
- uses: actions/cache@v2
with:
path: |
/home/runner/.cargo
**/target
key: ${{ hashFiles('**/Cargo.lock') }}-nocov
if: ${{ matrix.profile != '' }}
- uses: actions/cache@v2
with:
path: |
/home/runner/.cargo
**/target
key: ${{ hashFiles('**/Cargo.lock') }}-cov
if: ${{ matrix.profile == '' }}
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
args: --tests --all ${{matrix.profile}}
name: clippy
- name: cargo test
if: ${{ matrix.profile != '' }}
run: "cargo test --all ${{matrix.profile}}"
- name: cargo test
if: ${{ matrix.profile == '' }}
run: "cargo test --no-fail-fast --all"
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
- id: coverage
name: coverage report
if: ${{ matrix.profile == '' }}
uses: actions-rs/[email protected]
- name: upload to codecov
if: ${{ matrix.profile == '' }}
uses: codecov/[email protected]
with:
files: ${{ steps.coverage.outputs.report }}
miri:
name: miri tests
runs-on: ubuntu-latest
strategy:
matrix:
profile:
- ""
- "--release"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
default: true
components: miri
- name: cargo miri test
run: |
UNSAFE_TESTS=(
storage::vec
)
for test in "${UNSAFE_TESTS[@]}"; do
cargo miri test $test ${{ matrix.profile }}
done
env:
CONCURRENT_TEST_REPETITIONS: "1"