mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-19 18:45:51 -07:00
Update CI for the 1.0 workspace layout
- rust.yml: modernize (checkout@v4), build/test the whole workspace, add a wasm32 core build check and a Node package build+test job. Checks out visioncortex next to the repo so the local path dependency resolves. - python.yml: build crates/vtracer-py (was the deleted cmdapp/); note that manylinux builds need visioncortex 0.9.0 published to crates.io. - release.yml: note the same visioncortex prerequisite for the CLI binary.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user