Skip to content

dep: Rm array-init by initialising from a const variable (#12) #119

dep: Rm array-init by initialising from a const variable (#12)

dep: Rm array-init by initialising from a const variable (#12) #119

Workflow file for this run

name: Rust
env:
CARGO_TERM_COLOR: always
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
jobs:
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check format
run: cargo fmt --all -- --check
Run_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}-v2
- name: Run clippy
run: cargo clippy --all --all-features
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-test-v3
- name: Run tests
run: cargo test
test-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-test-release-v3
- name: Run tests
run: cargo test --release
test-sanitize-address:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-test-sanitize-address-v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Run tests
run: cargo +nightly test
env:
RUSTFLAGS: -Zsanitizer=address
RUSTDOCFLAGS: -Zsanitizer=address
test-sanitize-thread:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-test-sanitize-thread-v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rust-src
- name: Run tests
run: |
cargo +nightly test \
-Z build-std \
--target $(rustc -vV | grep host | cut -d : -f 2) \
--features thread-sanitizer
env:
RUSTFLAGS: -Zsanitizer=thread
RUSTDOCFLAGS: -Zsanitizer=thread