Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .github/scripts/gen_dockerfile.sh

This file was deleted.

39 changes: 0 additions & 39 deletions .github/scripts/package.sh

This file was deleted.

71 changes: 27 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,37 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
name: Test (${{ matrix.os }}, Rust ${{ matrix.rust }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
fail-fast: false
matrix:
rust:
- stable
- beta
- nightly
- 1.87.0 # minimum supported version
continue-on-error: ${{ matrix.rust == 'nightly' }}
# Linux runs the full Rust version matrix; Windows and macOS test stable only.
os: [ubuntu-latest]
rust: [stable, beta, nightly, "1.87.0"]
include:
- os: windows-latest
rust: stable
- os: macos-latest
rust: stable
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust}}
components: rustfmt
- name: Build
run: cargo build --all-features
- name: Cargo Test
run: cargo test --workspace --all-features
- name: Format (fix with `cargo fmt`)
run: cargo fmt -- --check
- name: Run unit-tests
run: tests/run_all.sh
shell: bash

test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
with:
toolchain: stable
- name: Build
run: cargo build --all-features
- name: Cargo Test
run: cargo test --workspace --all-features
- name: Run unit-tests
run: tests/run_all.sh
shell: bash

test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
shared-key: ci-test-${{ matrix.os }}-${{ matrix.rust }}
cache-workspace-crates: "true"
- name: Build
run: cargo build --all-features
- name: Cargo Test
Expand All @@ -81,6 +56,10 @@ jobs:
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
with:
shared-key: ci-clippy-${{ runner.os }}-stable
cache-workspace-crates: "true"
- run: cargo clippy --all-features

unused-deps:
Expand All @@ -91,6 +70,10 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: ci-unused-deps-${{ runner.os }}-stable
cache-workspace-crates: "true"
- name: Install machete
run: cargo install cargo-machete
- name: Check for unused dependencies
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cli_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: formatting

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Check Rust formatting
run: cargo fmt -- --check

clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Check C/C++ formatting
uses: DoozyX/clang-format-lint-action@v0.18
with:
source: "."
extensions: "h,hpp,c,cc,cpp,cxx"
exclude: "./crates/bender-slang/vendor"
59 changes: 59 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: release-build

# Verify that a release build succeeds on all platforms that cargo-dist will
# target. Runs on every push to master (and can be triggered manually) so
# that compatibility issues or platform-specific build failures are
# caught before tagging a release.
on:
push:
branches: [master]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-build:
name: Release Build (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container || '' }}
strategy:
fail-fast: false
# Mirror the release matrix from dist-workspace.toml exactly, including
# the manylinux containers, so CI catches compatibility issues early.
matrix:
include:
- target: x86_64-unknown-linux-gnu
runner: ubuntu-22.04
container: quay.io/pypa/manylinux_2_28_x86_64
- target: aarch64-unknown-linux-gnu
runner: ubuntu-22.04-arm
container: quay.io/pypa/manylinux_2_28_aarch64
- target: x86_64-apple-darwin
runner: macos-latest
- target: aarch64-apple-darwin
runner: macos-15
- target: x86_64-pc-windows-msvc
runner: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Rust non-interactively if not already installed
if: ${{ matrix.container }}
run: |
if ! command -v cargo > /dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.container }}
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: release-build-${{ matrix.target }}
cache-workspace-crates: "true"
- name: Build (release)
run: cargo build --release --all-features
Loading