diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml deleted file mode 100644 index e71b1df8..00000000 --- a/.github/workflows/artifacts.yml +++ /dev/null @@ -1,369 +0,0 @@ -name: Artifacts - -on: - push: - branches: - - main - release: - types: - - published - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - binary_linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: rustup update && rustup target add aarch64-unknown-linux-gnu - - run: | - sudo apt update && sudo apt install -y g++-aarch64-linux-gnu - echo -e "\n\n[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml - - uses: Swatinem/rust-cache@v2 - - run: cargo build --release - working-directory: ./server - - run: cargo build --release --target aarch64-unknown-linux-gnu - working-directory: ./server - env: - BINDGEN_EXTRA_CLANG_ARGS: --sysroot /usr/aarch64-linux-gnu - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_server_x86_64_linux_gnu - path: target/release/oxigraph_server - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_server_aarch64-linux_gnu - path: target/aarch64-unknown-linux-gnu/release/oxigraph_server - - run: mv target/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu - if: github.event_name == 'release' - - run: mv target/aarch64-unknown-linux-gnu/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_aarch64_linux_gnu - if: github.event_name == 'release' - - uses: softprops/action-gh-release@v1 - with: - files: | - oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu - oxigraph_server_${{ github.event.release.tag_name }}_aarch64_linux_gnu - if: github.event_name == 'release' - - binary_mac: - runs-on: macos-latest - env: - DEVELOPER_DIR: '/Applications/Xcode.app/Contents/Developer' - SDKROOT: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' - MACOSX_DEPLOYMENT_TARGET: '10.14' - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: rustup update && rustup target add aarch64-apple-darwin - - uses: Swatinem/rust-cache@v2 - - run: cargo build --release - working-directory: ./server - - run: cargo build --release --target aarch64-apple-darwin - working-directory: ./server - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_server_x86_64_apple - path: target/release/oxigraph_server - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_server_aarch64_apple - path: target/aarch64-apple-darwin/release/oxigraph_server - - run: mv target/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_x86_64_apple - if: github.event_name == 'release' - - run: mv target/aarch64-apple-darwin/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_aarch64_apple - if: github.event_name == 'release' - - uses: softprops/action-gh-release@v1 - with: - files: | - oxigraph_server_${{ github.event.release.tag_name }}_x86_64_apple - oxigraph_server_${{ github.event.release.tag_name }}_aarch64_apple - if: github.event_name == 'release' - - binary_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 build --release - working-directory: ./server - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_server_x86_64_windows_msvc - path: target/release/oxigraph_server.exe - - run: mv target/release/oxigraph_server.exe oxigraph_server_${{ github.event.release.tag_name }}_x86_64_windows_msvc.exe - if: github.event_name == 'release' - - uses: softprops/action-gh-release@v1 - with: - files: oxigraph_server_${{ github.event.release.tag_name }}_x86_64_windows_msvc.exe - if: github.event_name == 'release' - - wheel_linux: - runs-on: ubuntu-latest - strategy: - matrix: - architecture: [ "x86_64", "aarch64" ] - continue-on-error: true - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: docker/setup-qemu-action@v2 - with: - platforms: linux/${{ matrix.architecture }} - if: github.event_name == 'release' && matrix.architecture != 'x86_64' - - run: sed 's/%arch%/${{ matrix.architecture }}/g' .github/workflows/manylinux_build.sh | sed 's/%for_each_version%/${{ github.event_name == 'release' || '' }}/g' > .github/workflows/manylinux_build_script.sh - - run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/manylinux2014_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/manylinux_build_script.sh - if: github.event_name == 'release' || matrix.architecture == 'x86_64' - - uses: actions/upload-artifact@v3 - with: - name: pyoxigraph_wheel_x86_64_linux - path: target/wheels/*.whl - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} - packages-dir: target/wheels - if: github.event_name == 'release' - - wheel_linux_musl: - runs-on: ubuntu-latest - strategy: - matrix: - architecture: [ "x86_64", "aarch64" ] - continue-on-error: true - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: docker/setup-qemu-action@v2 - with: - platforms: linux/${{ matrix.architecture }} - if: github.event_name == 'release' && matrix.architecture != 'x86_64' - - run: sed 's/%arch%/${{ matrix.architecture }}/g' .github/workflows/musllinux_build.sh | sed 's/%for_each_version%/${{ github.event_name == 'release' || '' }}/g' > .github/workflows/musllinux_build_script.sh - - run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/musllinux_1_1_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/musllinux_build_script.sh - if: github.event_name == 'release' || matrix.architecture == 'x86_64' - - uses: actions/upload-artifact@v3 - with: - name: pyoxigraph_wheel_x86_64_linux_musl - path: target/wheels/*.whl - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} - packages-dir: target/wheels - if: github.event_name == 'release' - - wheel_mac: - runs-on: macos-latest - env: - DEVELOPER_DIR: '/Applications/Xcode.app/Contents/Developer' - SDKROOT: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' - MACOSX_DEPLOYMENT_TARGET: '10.14' - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: rustup update && rustup target add aarch64-apple-darwin - - uses: Swatinem/rust-cache@v2 - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - cache: pip - cache-dependency-path: '**/requirements.dev.txt' - - run: pip install -r python/requirements.dev.txt - - run: maturin build --release -m python/Cargo.toml --features abi3 - - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - - run: rm -r target/wheels - - run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black - working-directory: ./python - - run: maturin build --release --target universal2-apple-darwin -m python/Cargo.toml --features abi3 - - run: maturin build --release -m python/Cargo.toml --features abi3 - if: github.event_name == 'release' - - run: maturin build --release --target aarch64-apple-darwin -m python/Cargo.toml --features abi3 - if: github.event_name == 'release' - - uses: actions/upload-artifact@v3 - with: - name: pyoxigraph_wheel_universal2_mac - path: target/wheels/*.whl - - run: pip install twine && twine upload target/wheels/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - if: github.event_name == 'release' - - wheel_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.10" - cache: pip - cache-dependency-path: '**/requirements.dev.txt' - - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - - run: pip install -r python/requirements.dev.txt - - run: maturin build --release -m python/Cargo.toml --features abi3 - - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - - run: rm -r target/wheels - - run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black - working-directory: ./python - - run: maturin build --release -m python/Cargo.toml --features abi3 - - run: maturin sdist -m python/Cargo.toml - - uses: actions/upload-artifact@v3 - with: - name: pyoxigraph_wheel_x86_64_windows - path: target/wheels/*.whl - - run: pip install twine && twine upload target/wheels/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - if: github.event_name == 'release' - - npm_tarball: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - 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" - registry-url: https://registry.npmjs.org - - run: npm run pack - working-directory: ./js - - uses: actions/upload-artifact@v3 - with: - name: oxigraph_wasm_npm - path: js/*.tgz - - run: npm run release - working-directory: ./js - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - if: github.event_name == 'release' - - docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - if: github.event_name == 'release' - - uses: docker/metadata-action@v4 - id: docker_meta - with: - images: | - ${{ github.repository }},enable=${{ github.event_name == 'release' }} - ghcr.io/${{ github.repository }} - - uses: docker/build-push-action@v4 - with: - context: . - file: server/Dockerfile - platforms: linux/amd64,linux/arm64 - pull: true - push: true - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - publish_crates: - if: github.event_name == 'release' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: rustup update - - run: cargo login $CRATES_IO_TOKEN - env: - CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - - run: cargo publish - working-directory: ./oxrocksdb-sys - continue-on-error: true - - run: cargo publish - working-directory: ./lib/oxsdatatypes - continue-on-error: true - - run: cargo publish - working-directory: ./lib/oxrdf - continue-on-error: true - - run: cargo publish - working-directory: ./lib/sparesults - continue-on-error: true - - run: cargo publish - working-directory: ./lib/spargebra - continue-on-error: true - - run: cargo publish - working-directory: ./lib/sparql-smith - continue-on-error: true - - run: cargo publish - working-directory: ./lib - continue-on-error: true - - run: cargo publish - working-directory: ./server - - homebrew: - if: "github.event_name == 'release' && !contains('-', github.event.release.tag_name)" - runs-on: ubuntu-latest - needs: full_archive - steps: - - uses: actions/checkout@v3 - with: - repository: oxigraph/homebrew-oxigraph - token: ${{ secrets.FULL_ACCESS_TOKEN }} - - run: | - wget "https://github.com/oxigraph/oxigraph/releases/download/${{ github.event.release.tag_name }}/oxigraph_${{ github.event.release.tag_name }}.tar.gz" - SHA=`shasum -a 256 "oxigraph_${{ github.event.release.tag_name }}.tar.gz" | awk '{ print $1 }'` - rm "oxigraph_${{ github.event.release.tag_name }}.tar.gz" - sed -i "s/download\/.*\.tar/download\/${{ github.event.release.tag_name }}\/oxigraph_${{ github.event.release.tag_name }}.tar/g" Formula/oxigraph.rb - sed -i "s/sha256 \".*\"/sha256 \"$SHA\"/g" Formula/oxigraph.rb - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git diff-index --quiet HEAD || git commit -m "Upgrades to ${{ github.event.release.tag_name }}" - git push - - full_archive: - if: github.event_name == 'release' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: | - rm -rf .git bench fuzz - zip -r oxigraph_${{ github.event.release.tag_name }}.zip . - tar -czf /tmp/oxigraph_${{ github.event.release.tag_name }}.tar.gz . - mv /tmp/oxigraph_${{ github.event.release.tag_name }}.tar.gz . - - uses: softprops/action-gh-release@v1 - with: - files: | - oxigraph_${{ github.event.release.tag_name }}.zip - oxigraph_${{ github.event.release.tag_name }}.tar.gz diff --git a/.github/workflows/manylinux_build.sh b/.github/workflows/manylinux_build.sh deleted file mode 100644 index 1ed3f3e2..00000000 --- a/.github/workflows/manylinux_build.sh +++ /dev/null @@ -1,21 +0,0 @@ -cd /workdir -yum -y install centos-release-scl-rh -yum -y install llvm-toolset-7.0 -source scl_source enable llvm-toolset-7.0 -curl https://static.rust-lang.org/rustup/dist/%arch%-unknown-linux-gnu/rustup-init --output rustup-init -chmod +x rustup-init -./rustup-init -y --profile minimal -source "$HOME/.cargo/env" -export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin" -cd python -python3.10 -m venv venv -source venv/bin/activate -pip install -r requirements.dev.txt -maturin develop --release -m Cargo.toml -python generate_stubs.py pyoxigraph pyoxigraph.pyi --black -maturin build --release -m Cargo.toml --features abi3 --compatibility manylinux2014 -if [ %for_each_version% ]; then - for VERSION in 7 8 9 10 11; do - maturin build --release -m Cargo.toml --interpreter "python3.$VERSION" --compatibility manylinux2014 - done -fi diff --git a/.github/workflows/musllinux_build.sh b/.github/workflows/musllinux_build.sh deleted file mode 100644 index 7dd2fb4c..00000000 --- a/.github/workflows/musllinux_build.sh +++ /dev/null @@ -1,19 +0,0 @@ -cd /workdir -apk add clang-dev -curl https://static.rust-lang.org/rustup/dist/%arch%-unknown-linux-musl/rustup-init --output rustup-init -chmod +x rustup-init -./rustup-init -y --profile minimal -source "$HOME/.cargo/env" -export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin" -cd python -python3.10 -m venv venv -source venv/bin/activate -pip install -r requirements.dev.txt -maturin develop --release -m Cargo.toml -python generate_stubs.py pyoxigraph pyoxigraph.pyi --black -maturin build --release -m Cargo.toml --features abi3 --compatibility musllinux_1_1 -if [ %for_each_version% ]; then - for VERSION in 7 8 9 10 11; do - maturin build --release -m Cargo.toml --interpreter "python3.$VERSION" --compatibility musllinux_1_1 - done -fi diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 363c26ef..9e83790b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,28 +37,6 @@ jobs: working-directory: ./lib/spargebra - run: cargo clippy --all-targets --all-features - 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_msv: runs-on: ubuntu-latest steps: @@ -78,28 +56,6 @@ jobs: - run: cargo clippy --all-targets -- -D warnings -D clippy::all working-directory: ./server - clippy_msv_wasm_js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: rustup update && rustup override set 1.60.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.60.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: @@ -159,20 +115,6 @@ jobs: 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_server --exclude oxigraph_testsuite --exclude oxrocksdb-sys --exclude pyoxigraph - env: - RUST_BACKTRACE: 1 - rustdoc: runs-on: ubuntu-latest steps: @@ -197,97 +139,6 @@ jobs: 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.10" - 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.7" - 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.10" - 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: @@ -372,16 +223,3 @@ jobs: 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