From fb3d310c38ef3215392a512595878af42c29d9bd Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Tue, 5 May 2026 19:57:19 +0200 Subject: [PATCH] ci: add build/test/lint workflow Mirrors the sister `ibe` crate's CI: lint (cargo fmt), test on ubuntu/windows/macOS, and no-std build for wasm32-unknown-unknown and wasm32-wasip1. Triggered on push to main and on pull_request. Closes #3 --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7d127a2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI checks + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt -- --check --color always + + test: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --release --verbose --all-features + + no-std: + name: Check no-std target ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + matrix: + target: + - wasm32-unknown-unknown + - wasm32-wasip1 + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + - run: cargo build --verbose --target ${{ matrix.target }} --all-features --lib