Skip to content

Fix clippy lint about sub cfg with only one condition #259

Fix clippy lint about sub cfg with only one condition

Fix clippy lint about sub cfg with only one condition #259

Workflow file for this run

name: Check
on: push
jobs:
x86_64-stable:
name: x86_64 stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
x86_64-nightly:
name: x86_64 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy, rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets --all-features
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features -- -D warnings
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
x86_64-sanitizer:
name: x86_64 sanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
- name: Run tests with address sanitizer
uses: actions-rs/cargo@v1
env:
ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-12/bin/llvm-symbolizer
RUSTFLAGS: -Zsanitizer=address
RUSTDOCFLAGS: -Zsanitizer=address
with:
command: test
args: --workspace --all-features --target x86_64-unknown-linux-gnu -Zbuild-std
wasm32-stable:
name: wasm32 stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
target: wasm32-wasi
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: build
args: --target wasm32-wasi --workspace --all-targets
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target wasm32-wasi --workspace --all-targets -- -D warnings
- name: Install cargo-wasi
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-wasi
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: wasi
args: test --workspace
wasm32-nightly:
name: wasm32 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
target: wasm32-wasi
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: build
args: --target wasm32-wasi --workspace --all-targets --all-features
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target wasm32-wasi --workspace --all-targets --all-features -- -D warnings
- name: Install cargo-wasi
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-wasi
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: wasi
args: test --workspace --all-features
aarch64-nightly:
name: aarch64 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install cross-compilation toolchain
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy, rustfmt
target: aarch64-unknown-linux-gnu
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: build
args: --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features
env:
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features -- -D warnings
bench-stable:
name: Benchmarks stable
runs-on: ubuntu-latest
env:
CXX: clang++
LLVM_CONFIG_PATH: /usr/lib/llvm-12/bin/llvm-config
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path bench/Cargo.toml --all -- --check
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: bench
args: --manifest-path bench/Cargo.toml --workspace --no-run --all-targets
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path bench/Cargo.toml --workspace --all-targets -- -D warnings
bench-nightly:
name: Benchmarks nightly
runs-on: ubuntu-latest
env:
CXX: clang++
LLVM_CONFIG_PATH: /usr/lib/llvm-12/bin/llvm-config
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy, rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path bench/Cargo.toml --all -- --check
- name: Build all targets
uses: actions-rs/cargo@v1
with:
command: bench
args: --manifest-path bench/Cargo.toml --workspace --no-run --all-targets --all-features
- name: Run Clippy linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path bench/Cargo.toml --workspace --all-targets --all-features -- -D warnings