diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 365b14d..f51b200 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,8 +1,11 @@ -# This file is autogenerated by maturin v1.11.5 -# To update, run -# -# maturin generate-ci github +# Python wheels for crates/vtracer-py (maturin). Regenerate the skeleton with: +# maturin generate-ci github -m crates/vtracer-py/Cargo.toml # +# PREREQUISITE: the framework depends on visioncortex 0.9.0. maturin's Linux +# builds run in manylinux containers where the local `../visioncortex` path is +# not visible, so this workflow only succeeds once visioncortex 0.9.0 is +# published to crates.io and the workspace uses the registry version (not the +# local path). name: Python on: @@ -42,7 +45,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path cmdapp/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/vtracer-py/Cargo.toml sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: auto - name: Upload wheels @@ -73,7 +76,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path cmdapp/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/vtracer-py/Cargo.toml sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 - name: Upload wheels @@ -106,7 +109,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path cmdapp/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/vtracer-py/Cargo.toml sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} - name: Upload wheels uses: actions/upload-artifact@v5 @@ -132,7 +135,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter --manifest-path cmdapp/Cargo.toml + args: --release --out dist --find-interpreter --manifest-path crates/vtracer-py/Cargo.toml sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} - name: Upload wheels uses: actions/upload-artifact@v5 @@ -148,7 +151,7 @@ jobs: uses: PyO3/maturin-action@v1 with: command: sdist - args: --out dist --manifest-path cmdapp/Cargo.toml + args: --out dist --manifest-path crates/vtracer-py/Cargo.toml - name: Upload sdist uses: actions/upload-artifact@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7fcdd06..4d3f112 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,10 @@ name: Release +# Builds the `vtracer` CLI binary (crates/vtracer-cli) for each target. +# PREREQUISITE: the workspace depends on visioncortex 0.9.0; this succeeds once +# 0.9.0 is published to crates.io and the workspace uses the registry version +# instead of the local `../visioncortex` path. + on: release: types: [published] diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 277438a..78b2cd9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,7 +12,6 @@ on: branches: - master - 0.*.x - - pr/**/ci - ci-* concurrency: @@ -22,14 +21,62 @@ concurrency: env: CARGO_TERM_COLOR: always +# NOTE: the workspace depends on visioncortex 0.9.0 via a local path +# (`../visioncortex`). Until 0.9.0 is published to crates.io, CI checks out the +# visioncortex repo next to this one so the path resolves. This requires the +# 0.9.x changes to be present on visioncortex's default branch. jobs: - build: - + test: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v4 + with: + path: vtracer + - uses: actions/checkout@v4 + with: + repository: visioncortex/visioncortex + path: visioncortex + - name: Build + working-directory: vtracer + run: cargo build --workspace --verbose + - name: Test + working-directory: vtracer + run: cargo test --workspace --verbose + + wasm: + name: wasm-safety (core) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: vtracer + - uses: actions/checkout@v4 + with: + repository: visioncortex/visioncortex + path: visioncortex + - run: rustup target add wasm32-unknown-unknown + - name: Build core for wasm32 + working-directory: vtracer + run: cargo build --target wasm32-unknown-unknown -p vtracer + + nodejs: + name: Node package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: vtracer + - uses: actions/checkout@v4 + with: + repository: visioncortex/visioncortex + path: visioncortex + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - name: Build & test + working-directory: vtracer/nodejs + run: | + wasm-pack build --target nodejs --out-dir pkg + node test.js