Skip to content

chore: release v0.16.0 #103

chore: release v0.16.0

chore: release v0.16.0 #103

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mold linker
run: |
sudo apt-get update && sudo apt-get install -y mold
mkdir -p ~/.cargo
echo '[target.x86_64-unknown-linux-gnu]' >> ~/.cargo/config.toml
echo 'linker = "clang"' >> ~/.cargo/config.toml
echo 'rustflags = ["-C", "link-arg=-fuse-ld=mold"]' >> ~/.cargo/config.toml
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Setup sccache
uses: mozilla-actions/[email protected]
continue-on-error: true
- name: Configure sccache
continue-on-error: true
run: |
if command -v sccache &> /dev/null && sccache --start-server 2>/dev/null; then
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
else
echo "sccache unavailable, running without cache"
fi
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-registry-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-${{ runner.os }}-
- name: Run clippy
run: |
cargo clippy --all-targets --all-features -- \
-D clippy::correctness \
-D clippy::suspicious \
-D clippy::complexity \
-A clippy::collapsible_if \
-A clippy::too_many_arguments \
-A clippy::type_complexity \
-A clippy::only_used_in_recursion \
-A clippy::single_match \
-A clippy::unnecessary_filter_map \
-A clippy::unnecessary_map_or
test:
name: Test (${{ matrix.partition }}/3)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
partition: [1, 2, 3]
steps:
- uses: actions/checkout@v4
- name: Install mold linker
run: |
sudo apt-get update && sudo apt-get install -y mold
mkdir -p ~/.cargo
echo '[target.x86_64-unknown-linux-gnu]' >> ~/.cargo/config.toml
echo 'linker = "clang"' >> ~/.cargo/config.toml
echo 'rustflags = ["-C", "link-arg=-fuse-ld=mold"]' >> ~/.cargo/config.toml
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup sccache
uses: mozilla-actions/[email protected]
continue-on-error: true
- name: Configure sccache
continue-on-error: true
run: |
if command -v sccache &> /dev/null && sccache --start-server 2>/dev/null; then
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
else
echo "sccache unavailable, running without cache"
fi
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-registry-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-${{ runner.os }}-
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run tests (partition ${{ matrix.partition }}/3)
run: cargo nextest run --workspace --partition count:${{ matrix.partition }}/3