Skip to content

fix: normalize Windows IPC object ownership #23

fix: normalize Windows IPC object ownership

fix: normalize Windows IPC object ownership #23

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- name: Install Linux keyring dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: stable
components: clippy,rustfmt
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.8.1
- name: Format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --exclude chat2db-desktop --all-targets --all-features --locked -- -D warnings
- name: Test
run: cargo test --workspace --exclude chat2db-desktop --locked
- name: Process supervisor tests
run: cargo test -p chat2db-java-bridge --features test-fixture --test supervisor --locked
rust-msrv:
name: Rust 1.88
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- name: Install Linux keyring dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: 1.88.0
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.8.1
with:
shared-key: msrv
- name: Check minimum supported Rust version
run: cargo check --workspace --exclude chat2db-desktop --all-targets --all-features --locked
java:
name: Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.7.1
with:
distribution: temurin
java-version: "17"
cache: maven
cache-dependency-path: |
java/pom.xml
java/compat-runtime/pom.xml
- name: Verify tests and driver isolation
working-directory: java
run: ./mvnw -B clean verify
ipc-integration:
name: Rust-Java IPC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- name: Install Linux keyring dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.8.1
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.7.1
with:
distribution: temurin
java-version: "17"
cache: maven
cache-dependency-path: |
java/pom.xml
java/compat-runtime/pom.xml
- name: Package Java engine
working-directory: java
run: ./mvnw -B -DskipTests package
- name: Verify Rust-Java process protocol
env:
CHAT2DB_JAVA_ENGINE_JAR: "${{ github.workspace }}/java/compat-runtime/target/chat2db-compat-runtime-0.1.0-SNAPSHOT.jar"
CHAT2DB_H2_DRIVER_JAR: "${{ github.workspace }}/java/compat-runtime/target/test-drivers/h2-2.3.232.jar"
run: cargo test -p chat2db-java-bridge --features java-integration --test java_engine --locked
- name: Verify H2 JDBC vertical slice
env:
CHAT2DB_JAVA_ENGINE_JAR: "${{ github.workspace }}/java/compat-runtime/target/chat2db-compat-runtime-0.1.0-SNAPSHOT.jar"
CHAT2DB_H2_DRIVER_JAR: "${{ github.workspace }}/java/compat-runtime/target/test-drivers/h2-2.3.232.jar"
run: cargo test -p chat2db-java-bridge --features java-integration --test java_jdbc_h2 --locked
- name: Verify product H2 vertical slice
env:
CHAT2DB_JAVA_ENGINE_JAR: "${{ github.workspace }}/java/compat-runtime/target/chat2db-compat-runtime-0.1.0-SNAPSHOT.jar"
CHAT2DB_H2_DRIVER_JAR: "${{ github.workspace }}/java/compat-runtime/target/test-drivers/h2-2.3.232.jar"
run: cargo test -p chat2db-core --features java-integration --test java_h2_product --locked
contracts:
name: Generated contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- name: Install Linux keyring dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.8.1
with:
shared-key: contracts
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- name: Install frontend generator
working-directory: apps/frontend
run: npm ci
- name: Verify generated OpenAPI and TypeScript
run: ./scripts/check-contracts.sh
frontend:
name: Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- name: Install
working-directory: apps/frontend
run: npm ci
- name: Typecheck
working-directory: apps/frontend
run: npm run typecheck
- name: Test
working-directory: apps/frontend
run: npm test
- name: Build
working-directory: apps/frontend
run: npm run build
desktop:
name: Desktop (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
- name: Install Linux desktop dependencies
if: runner.os == 'Linux'
run: >-
sudo apt-get update && sudo apt-get install -y
libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev
libssl-dev libayatana-appindicator3-dev librsvg2-dev libdbus-1-dev
pkg-config
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4
with:
toolchain: 1.88.0
components: clippy
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.8.1
with:
shared-key: desktop-${{ matrix.os }}
- name: Test local attachment
run: cargo test -p chat2db-local --locked
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22.22.2"
cache: npm
cache-dependency-path: apps/frontend/package-lock.json
- name: Build shared frontend
working-directory: apps/frontend
run: npm ci && npm run build
- name: Test desktop adapter
run: cargo test -p chat2db-desktop --locked
- name: Lint desktop adapter
run: cargo clippy -p chat2db-desktop --all-targets --features custom-protocol --locked -- -D warnings
- name: Compile Tauri custom protocol
run: cargo check -p chat2db-desktop --all-targets --features custom-protocol --locked