Skip to content

Commit 9ca8f49

Browse files
committed
Try to adjust infrastructure and solve some clippy issues
1 parent 669f534 commit 9ca8f49

Some content is hidden

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

66 files changed

+646
-928
lines changed

.devcontainer/Containerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM rust:1.86.0
2+
3+
RUN apt-get update && apt-get install -y \
4+
git \
5+
make \
6+
shellcheck \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
# Install development tools
10+
RUN cargo install just cargo-deny cargo-semver-checks typos-cli

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// .devcontainer/devcontainer.json
2+
{
3+
"name": "Rust CI",
4+
"build": {
5+
"dockerfile": "Containerfile"
6+
},
7+
"customizations": {
8+
}
9+
}

.github/workflows/tests.yml

Lines changed: 5 additions & 329 deletions
Original file line numberDiff line numberDiff line change
@@ -15,335 +15,11 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
fmt:
18+
check:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: ./.github/actions/setup-rust
21+
- name: Build and run dev container task
22+
uses: devcontainers/ci@v0.3
2323
with:
24-
component: rustfmt
25-
- run: cargo fmt -- --check
26-
27-
clippy:
28-
runs-on: ubuntu-latest
29-
steps:
30-
- uses: actions/checkout@v4
31-
with:
32-
submodules: true
33-
- uses: ./.github/actions/setup-rust
34-
with:
35-
version: 1.82.0
36-
component: clippy
37-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
38-
working-directory: ./lib/oxsdatatypes
39-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
40-
working-directory: ./lib/oxrdf
41-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
42-
working-directory: ./lib/oxrdfxml
43-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
44-
working-directory: ./lib/oxttl
45-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
46-
working-directory: ./lib/oxrdfio
47-
- run: cargo clippy --all-targets --features async-tokio -- -D warnings -D clippy::all
48-
working-directory: ./lib/oxrdfio
49-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
50-
working-directory: ./lib/sparesults
51-
- run: cargo clippy --all-targets --features async-tokio -- -D warnings -D clippy::all
52-
working-directory: ./lib/sparesults
53-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
54-
working-directory: ./lib/spargebra
55-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
56-
working-directory: ./lib/sparopt
57-
- run: cargo clippy --all-targets --no-default-features -- -D warnings -D clippy::all
58-
working-directory: ./lib/oxigraph
59-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
60-
working-directory: ./lib/oxigraph
61-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
62-
working-directory: ./cli
63-
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
64-
working-directory: ./testsuite
65-
66-
deny:
67-
runs-on: ubuntu-latest
68-
steps:
69-
- uses: actions/checkout@v4
70-
- uses: taiki-e/install-action@v2
71-
with: { tool: cargo-deny }
72-
- run: cargo deny check
73-
74-
semver_checks:
75-
runs-on: ubuntu-latest
76-
steps:
77-
- uses: actions/checkout@v4
78-
with:
79-
submodules: true
80-
- uses: ./.github/actions/setup-rust
81-
- uses: taiki-e/install-action@v2
82-
with: { tool: cargo-semver-checks }
83-
- uses: actions/cache@v4
84-
with:
85-
path: rocksdb
86-
key: ${{ runner.os }}-rocksdb-8.0.0
87-
- run: bash .github/workflows/install_rocksdb.sh
88-
- run: cargo semver-checks check-release --exclude oxrocksdb-sys --exclude oxigraph-testsuite --exclude oxigraph-cli --exclude spargeo
89-
90-
test_linux_x86_64:
91-
runs-on: ubuntu-latest
92-
steps:
93-
- uses: actions/checkout@v4
94-
with:
95-
submodules: true
96-
- uses: ./.github/actions/setup-rust
97-
- run: cargo test
98-
99-
test_linux_i686:
100-
runs-on: ubuntu-latest
101-
steps:
102-
- uses: actions/checkout@v4
103-
with:
104-
submodules: true
105-
- uses: ./.github/actions/setup-rust
106-
with:
107-
target: i686-unknown-linux-gnu
108-
- run: sudo apt-get update && sudo apt-get install -y g++-multilib
109-
- run: cargo test --target i686-unknown-linux-gnu --all-features
110-
working-directory: ./lib/oxsdatatypes
111-
- run: cargo test --target i686-unknown-linux-gnu --all-features
112-
working-directory: ./lib/oxrdf
113-
- run: cargo test --target i686-unknown-linux-gnu --all-features
114-
working-directory: ./lib/oxrdfxml
115-
- run: cargo test --target i686-unknown-linux-gnu --all-features
116-
working-directory: ./lib/oxttl
117-
- run: cargo test --target i686-unknown-linux-gnu --all-features
118-
working-directory: ./lib/oxrdfio
119-
- run: cargo test --target i686-unknown-linux-gnu --all-features
120-
working-directory: ./lib/sparesults
121-
- run: cargo test --target i686-unknown-linux-gnu --all-features
122-
working-directory: ./lib/spargebra
123-
- run: cargo test --target i686-unknown-linux-gnu --all-features
124-
working-directory: ./lib/sparopt
125-
- run: cargo test --target i686-unknown-linux-gnu --features http-client-rustls-native
126-
working-directory: ./lib/oxigraph
127-
- run: cargo test --target i686-unknown-linux-gnu
128-
working-directory: ./testsuite
129-
130-
test_linux_msv:
131-
runs-on: ubuntu-latest
132-
steps:
133-
- uses: actions/checkout@v4
134-
with:
135-
submodules: true
136-
- name: Read MSRV from Cargo.toml
137-
id: metadata
138-
run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT
139-
- uses: ./.github/actions/setup-rust
140-
with:
141-
version: ${{ steps.metadata.outputs.rust-version }}
142-
- run: rustup toolchain install nightly
143-
- run: rm Cargo.lock && cargo +nightly update -Z direct-minimal-versions && cargo update -p libm --precise 0.2.8
144-
- run: cargo test --workspace --exclude sparql-smith
145-
146-
test_linux_latest:
147-
runs-on: ubuntu-latest
148-
steps:
149-
- uses: actions/checkout@v4
150-
with:
151-
submodules: true
152-
- uses: ./.github/actions/setup-rust
153-
- run: rm Cargo.lock && cargo update
154-
- run: cargo test
155-
156-
test_linux_address_sanitizer:
157-
runs-on: ubuntu-latest
158-
continue-on-error: true
159-
steps:
160-
- uses: actions/checkout@v4
161-
with:
162-
submodules: true
163-
- uses: ./.github/actions/setup-rust
164-
with:
165-
version: nightly
166-
- run: sudo apt-get update && sudo apt-get install -y llvm
167-
- run: cargo test --tests --target x86_64-unknown-linux-gnu --workspace --exclude oxigraph-testsuite --exclude oxigraph-cli
168-
env:
169-
RUSTFLAGS: -Z sanitizer=address
170-
171-
test_linux_dynamic_linking:
172-
runs-on: ubuntu-latest
173-
steps:
174-
- uses: actions/checkout@v4
175-
with:
176-
submodules: true
177-
- uses: ./.github/actions/setup-rust
178-
- uses: actions/cache@v4
179-
with:
180-
path: rocksdb
181-
key: ${{ runner.os }}-rocksdb-8.0.0
182-
- run: bash .github/workflows/install_rocksdb.sh
183-
- run: cargo test --tests --features oxrocksdb-sys/pkg-config
184-
185-
test_windows:
186-
runs-on: windows-latest
187-
steps:
188-
- uses: actions/checkout@v4
189-
with:
190-
submodules: true
191-
- uses: ./.github/actions/setup-rust
192-
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
193-
- run: cargo test
194-
195-
test_wasip1:
196-
runs-on: ubuntu-latest
197-
steps:
198-
- uses: actions/checkout@v4
199-
with:
200-
submodules: true
201-
- uses: ./.github/actions/setup-rust
202-
with:
203-
target: wasm32-wasip1
204-
- uses: taiki-e/install-action@v2
205-
with: { tool: "wasmtime,cargo-wasi" }
206-
- run: cargo wasi test --workspace --exclude oxigraph-cli --exclude oxigraph-testsuite --exclude oxrocksdb-sys
207-
208-
rustdoc:
209-
runs-on: ubuntu-latest
210-
steps:
211-
- uses: actions/checkout@v4
212-
with:
213-
submodules: true
214-
- uses: ./.github/actions/setup-rust
215-
with:
216-
version: 1.82.0
217-
- run: cargo doc
218-
env:
219-
RUSTDOCFLAGS: -D warnings
220-
221-
typos:
222-
runs-on: ubuntu-latest
223-
steps:
224-
- uses: actions/checkout@v4
225-
- uses: taiki-e/install-action@v2
226-
with: { tool: typos-cli }
227-
- run: typos
228-
229-
clang_fmt:
230-
runs-on: ubuntu-latest
231-
steps:
232-
- uses: actions/checkout@v4
233-
- run: sudo apt-get update && sudo apt-get install -y clang-format
234-
- run: clang-format --Werror --dry-run oxrocksdb-sys/api/*
235-
236-
fuzz_changes:
237-
strategy:
238-
matrix:
239-
include:
240-
- target: "sparql_query_eval"
241-
build_args: "--features sparql-smith/service"
242-
run_args: "-fork=1 -ignore_timeouts=1"
243-
- target: "sparql_update_eval"
244-
build_args: "--features rocksdb"
245-
run_args: "-fork=1 -ignore_timeouts=1"
246-
- target: "sparql_results_json"
247-
- target: "sparql_results_tsv"
248-
- target: "sparql_results_xml"
249-
- target: "n3"
250-
- target: "nquads"
251-
- target: "trig"
252-
- target: "rdf_xml"
253-
runs-on: ubuntu-latest
254-
continue-on-error: true
255-
steps:
256-
- uses: actions/checkout@v4
257-
with:
258-
submodules: true
259-
- uses: actions/cache@v4
260-
id: cache-corpus
261-
with:
262-
path: fuzz/corpus/${{ matrix.target }}
263-
key: fuzz-${{ matrix.target }}-${{ github.run_id }}
264-
restore-keys: |
265-
fuzz-${{ matrix.target }}
266-
- uses: ./.github/actions/setup-rust
267-
- run: cargo install cargo-fuzz || true
268-
- run: python3 build_corpus.py
269-
working-directory: ./fuzz
270-
if: steps.cache-corpus.outputs.cache-hit != 'true'
271-
- run: cargo fuzz run ${{ matrix.target }} --sanitizer none ${{ matrix.build_args }} -- -max_total_time=200 -timeout=5 ${{ matrix.run_args }}
272-
- run: cargo fuzz cmin ${{ matrix.target }} --sanitizer none ${{ matrix.build_args }}
273-
- uses: actions/upload-artifact@v4
274-
if: failure()
275-
with:
276-
name: fuzz-artifacts-${{ matrix.target }}
277-
path: fuzz/artifacts/${{ matrix.target }}
278-
279-
shellcheck:
280-
runs-on: ubuntu-latest
281-
steps:
282-
- uses: actions/checkout@v4
283-
- run: sudo apt-get update && sudo apt-get install -y shellcheck
284-
- run: git grep -l '^#\( *shellcheck \|!\(/bin/\|/usr/bin/env \)\(sh\|bash\|dash\|ksh\)\)' | xargs shellcheck
285-
286-
spec_links:
287-
runs-on: ubuntu-latest
288-
steps:
289-
- uses: actions/checkout@v4
290-
- run: python lints/test_spec_links.py
291-
292-
debian_compatibility:
293-
runs-on: ubuntu-latest
294-
steps:
295-
- uses: actions/checkout@v4
296-
- uses: ./.github/actions/setup-rust
297-
- run: python lints/test_debian_compatibility.py
298-
299-
codspeed:
300-
runs-on: ubuntu-latest
301-
steps:
302-
- uses: actions/checkout@v4
303-
with:
304-
submodules: true
305-
- uses: ./.github/actions/setup-rust
306-
- uses: taiki-e/install-action@v2
307-
with: { tool: cargo-codspeed }
308-
- uses: actions/setup-node@v4
309-
with:
310-
node-version: 22
311-
cache: npm
312-
cache-dependency-path: "js/package.json"
313-
- run: npm install
314-
working-directory: ./js
315-
- run: cargo codspeed build -p oxigraph --features http-client-native-tls
316-
- run: cargo codspeed build -p oxigraph-testsuite
317-
- uses: CodSpeedHQ/action@v3
318-
with:
319-
run: cargo codspeed run && npm run --prefix js bench
320-
token: ${{ secrets.CODSPEED_TOKEN }}
321-
322-
codecov:
323-
runs-on: ubuntu-latest
324-
steps:
325-
- uses: actions/checkout@v4
326-
with:
327-
submodules: true
328-
- uses: ./.github/actions/setup-rust
329-
with:
330-
component: llvm-tools-preview
331-
- uses: actions/setup-python@v5
332-
with:
333-
python-version: "3.12"
334-
cache: pip
335-
- uses: taiki-e/install-action@v2
336-
with: { tool: cargo-llvm-cov }
337-
- run: |
338-
source <(cargo llvm-cov show-env --export-prefix)
339-
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
340-
cargo llvm-cov clean --workspace
341-
cargo test --features oxrdfio/async-tokio,sparesults/async-tokio
342-
pip install "maturin~=1.0"
343-
cargo llvm-cov report --codecov --output-path codecov.json
344-
- uses: codecov/codecov-action@v5
345-
with:
346-
files: codecov.json
347-
flags: rust
348-
fail_ci_if_error: true
349-
token: ${{ secrets.CODECOV_TOKEN }}
24+
# Change this to be your CI task/script
25+
runCmd: just check

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Cargo.lock
44
.idea
55
*.iml
66
js/node_modules
7-
lib/tests/rocksdb_bc_data
87
venv
98
.env
109
data/

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
[submodule "bench/bsbm-tools"]
88
path = bench/bsbm-tools
99
url = https://github.com/Tpt/bsbm-tools.git
10-
[submodule "oxrocksdb-sys/rocksdb"]
11-
path = oxrocksdb-sys/rocksdb
12-
url = https://github.com/oxigraph/rocksdb.git
13-
[submodule "oxrocksdb-sys/lz4"]
14-
path = oxrocksdb-sys/lz4
15-
url = https://github.com/lz4/lz4.git
1610
[submodule "testsuite/N3"]
1711
path = testsuite/N3
1812
url = https://github.com/w3c/N3.git

.readthedocs.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,5 @@ build:
1111
apt_packages:
1212
- clang
1313

14-
python:
15-
install:
16-
- requirements: python/requirements.dev.txt
17-
- method: pip
18-
path: python
19-
2014
submodules:
2115
include: all

0 commit comments

Comments
 (0)