Skip to content

Adding semgrep yaml file #298

Adding semgrep yaml file

Adding semgrep yaml file #298

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@v4
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Run rustfmt
run: cargo +${{steps.toolchain.outputs.name}} fmt --all -- --check
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --workspace --all-targets
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --workspace --all-targets -- -D warnings
- name: Run tests
run: cargo +${{steps.toolchain.outputs.name}} test --workspace
x86_64-nightly:
name: x86_64 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
- name: Run rustfmt
run: cargo +${{steps.toolchain.outputs.name}} fmt --all -- --check
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --workspace --all-targets --all-features
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --workspace --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo +${{steps.toolchain.outputs.name}} test --workspace --all-features
x86_64-sanitizer:
name: x86_64 sanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src
- name: Run tests with address sanitizer
env:
ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-14/bin/llvm-symbolizer
RUSTFLAGS: -Zsanitizer=address
RUSTDOCFLAGS: -Zsanitizer=address
run: cargo +${{steps.toolchain.outputs.name}} test --workspace --all-features --target x86_64-unknown-linux-gnu -Zbuild-std
wasm32-stable:
name: wasm32 stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
target: wasm32-wasi
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --target wasm32-wasi --workspace --all-targets
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --target wasm32-wasi --workspace --all-targets -- -D warnings
- name: Install cargo-wasi
run: cargo +${{steps.toolchain.outputs.name}} install cargo-wasi
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Run tests
run: cargo +${{steps.toolchain.outputs.name}} wasi test --workspace
wasm32-nightly:
name: wasm32 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
target: wasm32-wasi
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --target wasm32-wasi --workspace --all-targets --all-features
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --target wasm32-wasi --workspace --all-targets --all-features -- -D warnings
- name: Install cargo-wasi
run: cargo +${{steps.toolchain.outputs.name}} install cargo-wasi
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Run tests
run: cargo +${{steps.toolchain.outputs.name}} wasi test --workspace --all-features
aarch64-stable:
name: aarch64 stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cross-compilation toolchain
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
target: aarch64-unknown-linux-gnu
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --target aarch64-unknown-linux-gnu --workspace --all-targets
env:
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --target aarch64-unknown-linux-gnu --workspace --all-targets -- -D warnings
aarch64-nightly:
name: aarch64 nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cross-compilation toolchain
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
- name: Install nightly toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
target: aarch64-unknown-linux-gnu
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} build --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features
env:
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --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-14/bin/llvm-config
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Run rustfmt
run: cargo +${{steps.toolchain.outputs.name}} fmt --manifest-path bench/Cargo.toml --all -- --check
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} bench --manifest-path bench/Cargo.toml --workspace --no-run --all-targets
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --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-14/bin/llvm-config
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install nightly toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
- name: Run rustfmt
run: cargo +${{steps.toolchain.outputs.name}} fmt --manifest-path bench/Cargo.toml --all -- --check
- name: Build all targets
run: cargo +${{steps.toolchain.outputs.name}} bench --manifest-path bench/Cargo.toml --workspace --no-run --all-targets --all-features
- name: Run Clippy linter
run: cargo +${{steps.toolchain.outputs.name}} clippy --manifest-path bench/Cargo.toml --workspace --all-targets --all-features -- -D warnings