From d14e11e64e94fc9e2885ffbaf6acc2317d7a132d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 27 Feb 2026 12:49:17 +0300 Subject: [PATCH 1/2] ci: set up base workflows for testing, linting and benchmarking Signed-off-by: NotAShelf Change-Id: I44afdff316a93aeac90c38598469ec946a6a6964 --- .github/workflows/bench.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/build.yml | 19 +++++++++++++++++++ .github/workflows/clippy.yml | 19 +++++++++++++++++++ .github/workflows/test.yml | 19 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 .github/workflows/bench.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/clippy.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 0000000..10e632f --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,28 @@ +name: Benchmark + +on: + pull_request: + +jobs: + bench: + name: Benchmark + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.base_ref }} + fetch-depth: 0 + + - name: Install Rust + uses: dtolnay/rust-action@stable + + - name: Run benchmarks (base) + run: cargo bench --bench fmt -- --save-baseline base + + - uses: actions/checkout@v6 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Compare benchmarks + run: cargo bench --bench fmt -- --compare base diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cbc95ec --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: Build + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install Rust + uses: dtolnay/rust-action@stable + + - name: Build + run: cargo build --release --verbose diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..4dc7a4c --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,19 @@ +name: Clippy + +on: + push: + branches: [main] + pull_request: + +jobs: + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install Rust + uses: dtolnay/rust-action@stable + + - name: Run clippy + run: cargo clippy -- -D warnings diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b878660 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install Rust + uses: dtolnay/rust-action@stable + + - name: Run tests + run: cargo test --verbose From 8dfbce5fa02a27bf8113a150c99913504bae7e94 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 27 Feb 2026 12:55:28 +0300 Subject: [PATCH 2/2] ci: fixup action name for rust setup Signed-off-by: NotAShelf Change-Id: Ieb17e80523f0e79fefc70c97587627f96a6a6964 --- .github/workflows/bench.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/clippy.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 10e632f..2a86cad 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -14,7 +14,7 @@ jobs: fetch-depth: 0 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@stable - name: Run benchmarks (base) run: cargo bench --bench fmt -- --save-baseline base diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbc95ec..c9c85ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@stable - name: Build run: cargo build --release --verbose diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 4dc7a4c..6a3d824 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@stable - name: Run clippy run: cargo clippy -- -D warnings diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b878660..ae58185 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@stable - name: Run tests run: cargo test --verbose