Skip to content

Commit 941a680

Browse files
Merge pull request #40 from SkardiLabs/reduce_to_module_for_docs
Reduce to pipeline/engine/model to modules for single crate generation
2 parents 401ea4b + b819474 commit 941a680

28 files changed

Lines changed: 168 additions & 230 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ jobs:
2929
- name: Install protoc
3030
run: sudo apt-get install -y protobuf-compiler
3131
- name: Build documentation
32-
run: |
33-
cargo doc \
34-
--no-deps \
35-
-p skardi-engine \
36-
-p pipeline \
37-
-p sources \
38-
-p model
32+
run: cargo doc --no-deps -p skardi
3933

4034
test:
4135
name: Test

.github/workflows/docs.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,13 @@ jobs:
4747
run: sudo apt-get install -y protobuf-compiler
4848

4949
- name: Build documentation
50-
# Document library crates only; skip model's onnx feature (downloads native binaries).
5150
# --no-deps keeps the output focused on skardi's own APIs.
52-
run: |
53-
cargo doc \
54-
--no-deps \
55-
-p skardi-engine \
56-
-p pipeline \
57-
-p sources \
58-
-p model
51+
# sources is excluded from the facade crate until the lance git dep is resolved.
52+
run: cargo doc --no-deps -p skardi
5953

60-
- name: Add redirect from root to skardi_engine
54+
- name: Add redirect from root to skardi
6155
run: |
62-
echo '<meta http-equiv="refresh" content="0; url=skardi_engine/index.html">' \
56+
echo '<meta http-equiv="refresh" content="0; url=skardi/index.html">' \
6357
> target/doc/index.html
6458
6559
- name: Upload Pages artifact

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,37 @@ jobs:
249249
"${IMAGE}:${VERSION}-arm64"
250250
docker manifest push "${IMAGE}:latest"
251251
252+
publish:
253+
name: "Publish to crates.io (${{ inputs.version }})"
254+
needs: validate
255+
runs-on: ubuntu-latest
256+
if: ${{ !inputs.dry_run }}
257+
env:
258+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
259+
steps:
260+
- name: Checkout code
261+
uses: actions/checkout@v4
262+
with:
263+
ref: ${{ inputs.version }}
264+
265+
- name: Install system dependencies
266+
run: |
267+
sudo apt-get update
268+
sudo apt-get install -y protobuf-compiler
269+
270+
- name: Install Rust
271+
run: rustup toolchain install stable
272+
273+
- uses: Swatinem/rust-cache@v2
274+
275+
- name: Publish skardi
276+
run: cargo publish -p skardi
277+
278+
# skardi-sources is not published yet: it depends on lance via git which crates.io disallows.
279+
# Once lance v4 is stable on crates.io, replace the git deps in Cargo.toml, add it to
280+
# the skardi facade crate, and publish with:
281+
# cargo publish -p skardi-sources (before cargo publish -p skardi)
282+
252283
release:
253284
name: "Create Release (${{ inputs.version }})"
254285
needs: [build, docker-manifest]

Cargo.lock

Lines changed: 61 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ license = "Apache-2.0"
99

1010
[workspace]
1111
members = [ "crates/cli",
12-
"crates/engine",
12+
"crates/skardi",
1313
"crates/sources",
14-
"crates/model",
15-
"crates/pipeline",
1614
"crates/server"]
1715

1816
resolver = "2"
@@ -64,7 +62,6 @@ rstest = "0.25.0"
6462
serde = { version = "1.0", features = ["derive"] }
6563
serde_json = "1.0"
6664
serde_yaml = "0.9"
67-
skardi-engine = { path = "crates/engine" }
6865
sqlparser = "0.55.0"
6966
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls", "postgres"] }
7067
tempfile = "3.23.0"

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object_store = { workspace = true, features = ["aws", "gcp", "azure", "http"] }
2626
serde = { workspace = true }
2727
serde_json = { workspace = true }
2828
serde_yaml = { workspace = true }
29-
sources = { path = "../sources" }
29+
sources = { package = "skardi-sources", path = "../sources" }
3030
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
3131
url = { workspace = true }
3232

crates/engine/Cargo.toml

Lines changed: 0 additions & 23 deletions
This file was deleted.

crates/pipeline/Cargo.toml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)