Skip to content

Commit c2768f7

Browse files
authored
feat: Setup lance-c crate (#1)
1 parent 92f89e4 commit c2768f7

27 files changed

Lines changed: 10589 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
RUST_BACKTRACE: "1"
17+
18+
jobs:
19+
format:
20+
name: Rustfmt
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 10
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions-rust-lang/setup-rust-toolchain@v1
26+
with:
27+
components: rustfmt
28+
- name: Check formatting
29+
run: cargo fmt -- --check
30+
31+
clippy:
32+
name: Clippy
33+
runs-on: ubuntu-24.04
34+
timeout-minutes: 30
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions-rust-lang/setup-rust-toolchain@v1
38+
with:
39+
components: clippy
40+
- uses: Swatinem/rust-cache@v2
41+
- name: Clippy
42+
run: cargo clippy --all-targets -- -D warnings
43+
44+
test-linux:
45+
name: Tests (Linux)
46+
runs-on: ubuntu-24.04
47+
timeout-minutes: 30
48+
env:
49+
CC: clang
50+
CXX: clang++
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: actions-rust-lang/setup-rust-toolchain@v1
54+
- uses: Swatinem/rust-cache@v2
55+
- name: Run tests
56+
run: cargo test
57+
- name: Run C/C++ compilation tests
58+
run: cargo test --test compile_and_run_test -- --ignored
59+
60+
test-macos:
61+
name: Tests (macOS)
62+
runs-on: macos-14
63+
timeout-minutes: 30
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions-rust-lang/setup-rust-toolchain@v1
67+
- uses: Swatinem/rust-cache@v2
68+
- name: Run tests
69+
run: cargo test
70+
- name: Run C/C++ compilation tests
71+
run: cargo test --test compile_and_run_test -- --ignored
72+
73+
rustdoc:
74+
name: Rustdoc
75+
runs-on: ubuntu-24.04
76+
timeout-minutes: 30
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions-rust-lang/setup-rust-toolchain@v1
80+
- uses: Swatinem/rust-cache@v2
81+
- name: Check documentation
82+
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
83+
84+
msrv:
85+
name: MSRV (1.91.0)
86+
runs-on: ubuntu-24.04
87+
timeout-minutes: 30
88+
steps:
89+
- uses: actions/checkout@v4
90+
- uses: actions-rust-lang/setup-rust-toolchain@v1
91+
with:
92+
toolchain: "1.91.0"
93+
- uses: Swatinem/rust-cache@v2
94+
- name: Check MSRV
95+
run: cargo check --all-targets
96+
97+
license-headers:
98+
name: License headers
99+
runs-on: ubuntu-24.04
100+
timeout-minutes: 5
101+
steps:
102+
- uses: actions/checkout@v4
103+
- name: Check Rust files for SPDX headers
104+
run: |
105+
MISSING=""
106+
for f in $(find src tests -name '*.rs'); do
107+
if ! head -2 "$f" | grep -q 'SPDX-License-Identifier'; then
108+
MISSING="$MISSING $f"
109+
fi
110+
done
111+
if [ -n "$MISSING" ]; then
112+
echo "Missing SPDX license header in:$MISSING"
113+
exit 1
114+
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Rust build output
2+
/target
3+
14
# Prerequisites
25
*.d
36

0 commit comments

Comments
 (0)