Skip to content
Merged
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
109 changes: 99 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
workflow_call: # Allow this workflow to be called by other workflows
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
Expand All @@ -16,20 +19,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check formatting
run: cargo fmt --all -- --check
lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
msrv:
name: MSRV (core crates, rust 1.88.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install Rust 1.88.0
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -48,6 +57,8 @@ jobs:
- target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
Expand All @@ -61,47 +72,107 @@ jobs:
- name: cargo check
run: cargo check -p ipcprims-transport -p ipcprims-frame --all-targets --target ${{ matrix.target }}
windows-test:
name: Windows Test
runs-on: windows-latest
name: Windows Test (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
target: x86_64-pc-windows-msvc
- runner: windows-latest-arm64-s
target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- name: Verify native host
shell: bash
run: test "$(rustc -vV | awk '/^host:/{print $2}')" = "${{ matrix.target }}"
- name: Run tests
run: cargo test --workspace --all-features
windows-test-async:
name: Windows Test (async)
runs-on: windows-latest
name: Windows Test (async, ${{ matrix.target }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
target: x86_64-pc-windows-msvc
- runner: windows-latest-arm64-s
target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- name: Verify native host
shell: bash
run: test "$(rustc -vV | awk '/^host:/{print $2}')" = "${{ matrix.target }}"
- name: Run async tests
run: cargo test --workspace --features async
windows-dogfood:
name: Windows Dogfood (CLI)
runs-on: windows-latest
name: Windows Dogfood (CLI, ${{ matrix.target }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
target: x86_64-pc-windows-msvc
- runner: windows-latest-arm64-s
target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- name: Verify native host
shell: bash
run: test "$(rustc -vV | awk '/^host:/{print $2}')" = "${{ matrix.target }}"
- name: Run CLI dogfood matrix
shell: bash
run: bash scripts/dogfood/cli-matrix.sh
test:
name: Test (${{ matrix.target }})
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runner: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest-arm64-s
runner: ubuntu-latest-arm64-s
- target: aarch64-apple-darwin
os: macos-latest
runner: macos-latest
- target: x86_64-pc-windows-msvc
runner: windows-latest
- target: aarch64-pc-windows-msvc
runner: windows-latest-arm64-s
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Verify native host
shell: bash
run: test "$(rustc -vV | awk '/^host:/{print $2}')" = "${{ matrix.target }}"
- name: Run tests
run: cargo test --workspace --all-features
platforms:
name: platforms
if: always()
needs: [test, windows-test, windows-test-async, windows-dogfood]
runs-on: ubuntu-latest
steps:
- name: Require all native platforms and Windows runtime jobs
run: |
test "${{ needs.test.result }}" = "success"
test "${{ needs.windows-test.result }}" = "success"
test "${{ needs.windows-test-async.result }}" = "success"
test "${{ needs.windows-dogfood.result }}" = "success"
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
Expand All @@ -117,13 +188,17 @@ jobs:
os: macos-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Build release
run: cargo build --workspace --release
test-musl:
name: Test (Linux musl)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install musl tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Add musl target
Expand All @@ -145,6 +220,8 @@ jobs:
os: macos-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install cbindgen
run: cargo install cbindgen --locked
- name: Build FFI crate
Expand All @@ -171,6 +248,8 @@ jobs:
os: macos-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
Expand Down Expand Up @@ -202,6 +281,8 @@ jobs:
os: macos-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@v6
with:
Expand All @@ -223,6 +304,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: License check
Expand All @@ -234,6 +317,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Security audit
Expand All @@ -244,12 +329,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check version consistency
run: ./scripts/check-version.sh
planning-hygiene:
name: Planning Hygiene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check no tracked planning-plane references
run: bash scripts/check-planning-hygiene.sh
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.PHONY: check-windows check-windows-msvc check-windows-gnu check-windows-arm64-msvc
.PHONY: check-unix-clippy
.PHONY: ffi-header build-ffi go-bindings-sync go-build go-test ts-build ts-test
.PHONY: precommit prepush ci-clippy npm-publish-prereqs-check deny audit
.PHONY: precommit prepush ci-clippy check-targets npm-publish-prereqs-check deny audit
.PHONY: msrv
.PHONY: build-release
.PHONY: version-patch version-minor version-major version-set version-sync version-check
Expand Down Expand Up @@ -86,6 +86,7 @@ help: ## Show available targets
@echo " precommit Pre-commit checks (fast: fmt, clippy)"
@echo " prepush Pre-push checks (including current CI stable Clippy)"
@echo " ci-clippy Update stable Rust and run the CI Clippy command"
@echo " check-targets Check async Rust peer code for Linux x64/arm64 and Windows x64"
@echo " msrv Verify build+test on MSRV toolchain (core crates)"
@echo " deny Run cargo-deny license and advisory checks"
@echo " audit Run cargo-audit security scan"
Expand Down Expand Up @@ -462,7 +463,13 @@ ci-clippy: ## Match the floating stable Rust toolchain used by CI
rustup update stable --no-self-update
RUSTFLAGS="-Dwarnings" cargo +stable clippy --workspace --all-targets --all-features -- -D warnings

prepush: check ci-clippy version-check npm-publish-prereqs-check $(PREPUSH_EXTRA) ## Run pre-push checks (thorough)
check-targets: ## Check async peer transport on cross-platform CI targets
@for target in x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-pc-windows-msvc; do \
rustup target add "$$target" || exit $$?; \
cargo check --locked -p ipcprims-peer --features async --target "$$target" || exit $$?; \
done

prepush: check ci-clippy check-targets version-check npm-publish-prereqs-check $(PREPUSH_EXTRA) ## Run pre-push checks (thorough)
@echo "[ok] Pre-push checks passed"

npm-publish-prereqs-check: ## Validate TypeScript npm trusted-publishing workflow prerequisites
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ targets = [
"aarch64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-pc-windows-gnu",
"aarch64-pc-windows-msvc",
]

# ============================================================================
Expand Down
Loading