Visitar URL original
build: Cargo workspace + native-common extraction (1/6) (#104) · apache/datafusion-java@ab57cb9 · GitHub
Skip to content

Commit ab57cb9

Browse files
authored
build: Cargo workspace + native-common extraction (1/6) (#104)
1 parent 051b00b commit ab57cb9

33 files changed

Lines changed: 503 additions & 260 deletions

‎.cargo/config.toml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Keep Cargo's workspace output out of `target/` so `mvn clean` (which deletes
19+
# the root `target/`) does not nuke the Rust build cache.
20+
[build]
21+
target-dir = "rust-target"

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
path: |
8484
~/.cargo/registry
8585
~/.cargo/git
86-
native/target
87-
key: ${{ runner.os }}-cargo-${{ hashFiles('native/Cargo.lock') }}
86+
rust-target
87+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
8888
restore-keys: ${{ runner.os }}-cargo-
8989

9090
- name: Build native and run tests

‎.github/workflows/lint.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: ./mvnw -q spotless:check
5555

5656
- name: Check Rust formatting
57-
run: cd native && cargo fmt --all -- --check
57+
run: cargo fmt --all -- --check
5858

5959
clippy:
6060
name: Clippy
@@ -81,9 +81,9 @@ jobs:
8181
path: |
8282
~/.cargo/registry
8383
~/.cargo/git
84-
native/target
85-
key: ${{ runner.os }}-clippy-${{ hashFiles('native/Cargo.lock') }}
84+
rust-target
85+
key: ${{ runner.os }}-clippy-${{ hashFiles('Cargo.lock') }}
8686
restore-keys: ${{ runner.os }}-clippy-
8787

8888
- name: Run clippy
89-
run: cd native && cargo clippy --all-targets -- -D warnings
89+
run: cargo clippy --workspace --all-targets -- -D warnings

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target/
2+
rust-target/
23
*.class
34
.idea/
45
.vscode/

0 commit comments

Comments
 (0)