|
|
|
name: Change tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- next
|
|
|
|
schedule:
|
|
|
|
- cron: "12 3 * * *"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: rustup update && rustup component add rustfmt
|
|
|
|
- run: cargo fmt -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/oxsdatatypes
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/oxrdf
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/oxrdfxml
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/oxttl
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/oxrdfio
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/sparesults
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/spargebra
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib/sparopt
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./lib
|
|
|
|
- run: cargo clippy --all-targets --all-features
|
|
|
|
working-directory: ./lib
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./python
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./cli
|
|
|
|
- run: cargo clippy
|
|
|
|
working-directory: ./testsuite
|
|
|
|
|
|
|
|
clippy_wasm_js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup target add wasm32-unknown-unknown && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy --lib --tests --target wasm32-unknown-unknown
|
|
|
|
working-directory: ./js
|
|
|
|
|
|
|
|
clippy_wasi:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup target add wasm32-wasi && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy --lib --tests --target wasm32-wasi
|
|
|
|
working-directory: ./lib
|
|
|
|
|
|
|
|
clippy_wasm_unknown:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup target add wasm32-unknown-unknown && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy --lib --tests --target wasm32-unknown-unknown --features getrandom/custom --features oxsdatatypes/custom-now
|
|
|
|
working-directory: ./lib
|
|
|
|
|
|
|
|
clippy_msv:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup override set 1.70.0 && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/oxsdatatypes
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/oxrdf
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/oxrdfxml
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/oxttl
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/oxrdfio
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/sparesults
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/spargebra
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib/sparopt
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib
|
|
|
|
- run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./python
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./cli
|
|
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./testsuite
|
|
|
|
|
|
|
|
clippy_msv_wasm_js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup override set 1.70.0 && rustup target add wasm32-unknown-unknown && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy --lib --tests --target wasm32-unknown-unknown -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./js
|
|
|
|
|
|
|
|
clippy_msv_wasi:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup override set 1.70.0 && rustup target add wasm32-wasi && rustup component add clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo clippy --lib --tests --target wasm32-wasi -- -D warnings -D clippy::all
|
|
|
|
working-directory: ./lib
|
|
|
|
|
|
|
|
deny:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo install cargo-deny || true
|
|
|
|
- run: cargo deny check
|
|
|
|
|
|
|
|
semver_checks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo install cargo-semver-checks || true
|
|
|
|
- run: cargo semver-checks check-release --exclude oxrocksdb-sys --exclude oxigraph-js --exclude pyoxigraph --exclude oxigraph-testsuite --exclude oxigraph-cli
|
|
|
|
|
|
|
|
test_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo test
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
address_sanitizer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup override set nightly
|
|
|
|
- run: sudo apt install -y llvm
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo test --tests --target x86_64-unknown-linux-gnu --workspace --exclude pyoxigraph --exclude oxigraph-testsuite --exclude oxigraph-cli
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
RUSTFLAGS: -Z sanitizer=address
|
|
|
|
|
|
|
|
test_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
|
|
- run: cargo test
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
test_wasi:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup target add wasm32-wasi
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: taiki-e/install-action@wasmtime
|
|
|
|
- run: cargo install cargo-wasi || true
|
|
|
|
- run: cargo wasi test --workspace --exclude oxigraph-js --exclude oxigraph-cli --exclude oxigraph-testsuite --exclude oxrocksdb-sys --exclude pyoxigraph
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
rustdoc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo doc --all-features
|
|
|
|
working-directory: ./lib
|
|
|
|
|
|
|
|
rustdoc_msrv:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup override set 1.70.0
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo doc --all-features
|
|
|
|
working-directory: ./lib
|
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -D warnings
|
|
|
|
|
|
|
|
js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo install wasm-pack || true
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: "js/package.json"
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ./js
|
|
|
|
- run: npm test
|
|
|
|
working-directory: ./js
|
|
|
|
|
|
|
|
python:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.11"
|
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: '**/requirements.dev.txt'
|
|
|
|
- run: pip install -r python/requirements.dev.txt
|
|
|
|
- run: python -m black --check --diff --color .
|
|
|
|
working-directory: ./python
|
|
|
|
- run: maturin build -m python/Cargo.toml
|
|
|
|
- run: pip install --no-index --find-links=target/wheels/ pyoxigraph
|
|
|
|
- run: rm -r target/wheels
|
|
|
|
- run: python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
- run: sphinx-build -M doctest . build
|
|
|
|
working-directory: ./python/docs
|
|
|
|
- run: sphinx-build -M html . build
|
|
|
|
working-directory: ./python/docs
|
|
|
|
- run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black
|
|
|
|
working-directory: ./python
|
|
|
|
- run: python -m mypy.stubtest pyoxigraph --allowlist=mypy_allowlist.txt
|
|
|
|
working-directory: ./python
|
|
|
|
- run: python -m mypy generate_stubs.py tests --strict
|
|
|
|
working-directory: ./python
|
|
|
|
- run: python -m ruff check .
|
|
|
|
working-directory: ./python
|
|
|
|
|
|
|
|
python_msv:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: '**/requirements.dev.txt'
|
|
|
|
- run: pip install -r python/requirements.dev.txt
|
|
|
|
- run: maturin build -m python/Cargo.toml
|
|
|
|
- run: pip install --no-index --find-links=target/wheels/ pyoxigraph
|
|
|
|
- run: rm -r target/wheels
|
|
|
|
- run: python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
|
|
|
|
python_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: "3.11"
|
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: '**/requirements.dev.txt'
|
|
|
|
- run: pip install "maturin~=1.0"
|
|
|
|
- run: maturin build -m python/Cargo.toml
|
|
|
|
- run: pip install --no-index --find-links=target/wheels/ pyoxigraph
|
|
|
|
- run: rm -r target/wheels
|
|
|
|
- run: python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
|
|
|
|
typos:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- run: cargo install typos-cli || true
|
|
|
|
- run: typos
|
|
|
|
|
|
|
|
clang_fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: sudo apt install -y clang-format
|
|
|
|
- run: clang-format --Werror --dry-run oxrocksdb-sys/api/*
|
|
|
|
|
|
|
|
fuzz_changes:
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
|
|
with:
|
|
|
|
language: rust
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
sanitizer: address
|
|
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
fuzz-seconds: 600
|
|
|
|
mode: code-change
|
|
|
|
sanitizer: address
|
|
|
|
minimize-crashes: true
|
|
|
|
parallel-fuzzing: true
|
|
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
|
|
|
|
fuzz_repo:
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
|
|
with:
|
|
|
|
language: rust
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
sanitizer: address
|
|
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
fuzz-seconds: 3600
|
|
|
|
mode: batch
|
|
|
|
sanitizer: address
|
|
|
|
minimize-crashes: true
|
|
|
|
parallel-fuzzing: true
|
|
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
continue-on-error: true
|
|
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
fuzz-seconds: 3600
|
|
|
|
mode: prune
|
|
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
fuzz_coverage:
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
needs: fuzz_repo
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
|
|
with:
|
|
|
|
language: rust
|
|
|
|
sanitizer: coverage
|
|
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
fuzz-seconds: 3600
|
|
|
|
mode: coverage
|
|
|
|
sanitizer: coverage
|
|
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
|
|
|
|
shellcheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: sudo apt install -y shellcheck
|
|
|
|
- run: git grep -l '^#\( *shellcheck \|!\(/bin/\|/usr/bin/env \)\(sh\|bash\|dash\|ksh\)\)' | xargs shellcheck
|
|
|
|
|
|
|
|
spec_links:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: python test_spec_links.py
|