on: [push]
name: Build and Test
env:
RUST_TOOLCHAIN: nightly-2025-12-22
jobs:
lint:
name: Lint (fmt + clippy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm --force
- run: cargo make fmt-check
- run: cargo make clippy
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm --force
- run: cargo make test
codecov:
needs: test
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm --force
- run: cargo make codecov
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: twitchax/conclave
build_linux:
needs: test
name: Build Linux
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: x86_64-unknown-linux-gnu
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo binstall cargo-make --no-confirm --force
- run: cargo make build-linux
- uses: actions/upload-artifact@v4
with:
name: conclave_x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release/conclave
build_windows:
needs: test
name: Build Windows
runs-on: windows-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: x86_64-pc-windows-msvc
- name: Install NASM (required by aws-lc-sys)
uses: ilammy/setup-nasm@v1
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo build --target x86_64-pc-windows-msvc --release
- uses: actions/upload-artifact@v4
with:
name: conclave_x86_64-pc-windows-msvc
path: target/x86_64-pc-windows-msvc/release/conclave.exe
build_macos:
needs: test
name: Build MacOS
runs-on: macos-15
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- run: cargo build --target aarch64-apple-darwin --release
- uses: actions/upload-artifact@v4
with:
name: conclave_aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/conclave