|
|
|
name: Change tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update && rustup component add rustfmt
|
|
|
|
- run: cargo fmt -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup component add clippy
|
|
|
|
- run: cargo clippy --all-targets --all-features
|
|
|
|
|
|
|
|
deny:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
|
|
|
|
|
|
test_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo test --all-features
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
address_sanitizer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update && rustup toolchain install nightly
|
|
|
|
- run: cargo +nightly test --tests --target x86_64-unknown-linux-gnu --workspace --exclude pyoxigraph --exclude oxigraph_testsuite
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
RUSTFLAGS: -Z sanitizer=address
|
|
|
|
|
|
|
|
test_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
|
|
- run: cargo test --all-features
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
js:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo install wasm-pack
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ./js
|
|
|
|
- run: npm test
|
|
|
|
working-directory: ./js
|
|
|
|
|
|
|
|
python:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
- run: python -m venv python/venv
|
|
|
|
- run: source python/venv/bin/activate && pip install --upgrade 'maturin~=0.12' sphinx
|
|
|
|
- run: source venv/bin/activate && maturin develop
|
|
|
|
working-directory: ./python
|
|
|
|
- run: source ../venv/bin/activate && python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
- run: source ../venv/bin/activate && sphinx-build -M doctest . build
|
|
|
|
working-directory: ./python/docs
|
|
|
|
- run: source ../venv/bin/activate && sphinx-build -M html . build
|
|
|
|
working-directory: ./python/docs
|
|
|
|
|
|
|
|
python_wheel_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: python
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: messense/maturin-action@v1
|
|
|
|
with:
|
|
|
|
manylinux: 2014
|
|
|
|
container: messense/manylinux2014-cross:x86_64
|
|
|
|
command: build
|
|
|
|
args: -m python/Cargo.toml
|
|
|
|
- run: pip install pyoxigraph --no-index --find-links ../../target/wheels && python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
|
|
|
|
python_wheel_mac:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: python
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: messense/maturin-action@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: -m python/Cargo.toml --universal2
|
|
|
|
- run: pip install pyoxigraph --no-index --find-links ../../target/wheels && python -m unittest
|
|
|
|
working-directory: ./python/tests
|
|
|
|
|
|
|
|
python_wheel_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
needs: python
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
architecture: ["x86", "x64"]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
|
|
- uses: messense/maturin-action@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
target: ${{ matrix.architecture }}
|
|
|
|
args: -m python/Cargo.toml
|
|
|
|
- run: pip install pyoxigraph --no-index --find-links ../../target/wheels && python -m unittest
|
|
|
|
working-directory: ./python/tests
|