Skip to content

Commit 6687cae

Browse files
authored
refactor: adopt workspace layout (#99)
* refactor: adopt workspace layout * ci: skip rust publish on PRs
1 parent 1e7767f commit 6687cae

58 files changed

Lines changed: 110 additions & 36 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
- main
66
pull_request:
77
paths:
8-
- rust/**
8+
- crates/**
9+
- Cargo.toml
10+
- Cargo.lock
911
- .github/workflows/build.yml
10-
- rust/lance-graph/Cargo.toml
11-
- rust/lance-graph/Cargo.lock
1212

1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -36,17 +36,17 @@ jobs:
3636
rustup default ${{ matrix.toolchain }}
3737
- uses: Swatinem/rust-cache@v2
3838
with:
39-
workspaces: rust/lance-graph
39+
workspaces: crates/lance-graph
4040
cache-targets: false
4141
- name: Install dependencies
4242
run: |
4343
sudo apt update
4444
sudo apt install -y protobuf-compiler
4545
- name: Build
46-
run: cargo build --manifest-path rust/lance-graph/Cargo.toml
46+
run: cargo build --manifest-path crates/lance-graph/Cargo.toml
4747
- name: Build tests
48-
run: cargo test --manifest-path rust/lance-graph/Cargo.toml --no-run
48+
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --no-run
4949
- name: Run tests
50-
run: cargo test --manifest-path rust/lance-graph/Cargo.toml
50+
run: cargo test --manifest-path crates/lance-graph/Cargo.toml
5151
- name: Check benchmarks
52-
run: cargo check --manifest-path rust/lance-graph/Cargo.toml --benches
52+
run: cargo check --manifest-path crates/lance-graph/Cargo.toml --benches

.github/workflows/python-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
paths:
88
- python/**
9-
- rust/lance-graph/**
9+
- crates/lance-graph/**
10+
- Cargo.toml
11+
- Cargo.lock
1012
- .github/workflows/python-test.yml
1113

1214
concurrency:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
- name: Update Cargo lock version (when version changes)
121121
if: inputs.release_type != 'current'
122122
run: |
123-
cargo check --manifest-path rust/lance-graph/Cargo.toml
123+
cargo check --manifest-path crates/lance-graph/Cargo.toml
124124
cargo check --manifest-path python/Cargo.toml
125125
126126
- name: Create release commit (when version changes)

.github/workflows/rust-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727

2828
jobs:
2929
publish:
30+
if: github.event_name != 'pull_request'
3031
runs-on: ubuntu-24.04
3132
timeout-minutes: 60
3233
steps:
@@ -50,5 +51,5 @@ jobs:
5051
with:
5152
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
5253
args: "--all-features"
53-
path: rust/lance-graph
54+
path: crates/lance-graph
5455
dry-run: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run') }}

.github/workflows/rust-test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
- main
66
pull_request:
77
paths:
8-
- rust/**
9-
- .github/workflows/rust-test.yml
8+
- crates/**
109
- Cargo.toml
1110
- Cargo.lock
11+
- .github/workflows/rust-test.yml
1212

1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -37,18 +37,18 @@ jobs:
3737
rustup default ${{ matrix.toolchain }}
3838
- uses: Swatinem/rust-cache@v2
3939
with:
40-
workspaces: rust/lance-graph
40+
workspaces: crates/lance-graph
4141
cache-targets: false
4242
- name: Install dependencies
4343
run: |
4444
sudo apt update
4545
sudo apt install -y protobuf-compiler
4646
- name: Build tests
47-
run: cargo test --manifest-path rust/lance-graph/Cargo.toml --no-run
47+
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --no-run
4848
- name: Run unit tests
49-
run: cargo test --manifest-path rust/lance-graph/Cargo.toml --lib
49+
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --lib
5050
- name: Run doc tests
51-
run: cargo test --manifest-path rust/lance-graph/Cargo.toml --doc
51+
run: cargo test --manifest-path crates/lance-graph/Cargo.toml --doc
5252

5353
test-with-coverage:
5454
runs-on: ubuntu-24.04
@@ -61,7 +61,7 @@ jobs:
6161
rustup default stable
6262
- uses: Swatinem/rust-cache@v2
6363
with:
64-
workspaces: rust/lance-graph
64+
workspaces: crates/lance-graph
6565
cache-targets: false
6666
- name: Install dependencies
6767
run: |
@@ -71,7 +71,7 @@ jobs:
7171
uses: taiki-e/install-action@cargo-llvm-cov
7272
- name: Run tests with coverage
7373
run: |
74-
cargo llvm-cov --manifest-path rust/lance-graph/Cargo.toml --lcov --output-path lcov.info
74+
cargo llvm-cov --manifest-path crates/lance-graph/Cargo.toml --lcov --output-path lcov.info
7575
- name: Upload coverage to Codecov
7676
uses: codecov/codecov-action@v4
7777
with:

.github/workflows/style.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
- main
66
pull_request:
77
paths:
8-
- rust/**
8+
- crates/**
9+
- Cargo.toml
10+
- Cargo.lock
911
- .github/workflows/style.yml
10-
- rust/lance-graph/Cargo.toml
11-
- rust/lance-graph/Cargo.lock
1212

1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
components: rustfmt
3030
- name: Check formatting
31-
run: cargo fmt --manifest-path rust/lance-graph/Cargo.toml -- --check
31+
run: cargo fmt --manifest-path crates/lance-graph/Cargo.toml -- --check
3232

3333
clippy:
3434
runs-on: ubuntu-24.04
@@ -37,13 +37,13 @@ jobs:
3737
- uses: actions/checkout@v4
3838
- uses: Swatinem/rust-cache@v2
3939
with:
40-
workspaces: rust/lance-graph
40+
workspaces: crates/lance-graph
4141
- name: Install dependencies
4242
run: |
4343
sudo apt update
4444
sudo apt install -y protobuf-compiler
4545
- name: Clippy
46-
run: cargo clippy --manifest-path rust/lance-graph/Cargo.toml --all-targets -- -D warnings
46+
run: cargo clippy --manifest-path crates/lance-graph/Cargo.toml --all-targets -- -D warnings
4747

4848
typos:
4949
name: Spell Check
@@ -52,4 +52,4 @@ jobs:
5252
- name: Checkout
5353
uses: actions/checkout@v4
5454
- name: Check spelling
55-
uses: crate-ci/typos@v1.26.0
55+
uses: crate-ci/typos@v1.26.0

AGENTS.md

Lines changed: 2 additions & 2 deletions
File renamed without changes.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
members = [
3+
"crates/lance-graph",
4+
]
5+
exclude = [
6+
"python",
7+
]
8+
resolver = "2"

README.md

Lines changed: 8 additions & 5 deletions

0 commit comments

Comments
 (0)