|
|
|
name: Nightly artifacts
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
python_doc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
- run: python -m venv python/venv
|
|
|
|
- run: source python/venv/bin/activate && pip install --upgrade maturin sphinx
|
|
|
|
- run: source venv/bin/activate && maturin develop
|
|
|
|
working-directory: ./python
|
|
|
|
- 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
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: oxigraph/oxigraph.github.io
|
|
|
|
path: website
|
|
|
|
token: ${{ secrets.FULL_ACCESS_TOKEN }}
|
|
|
|
- run: rm -rf ./website/pyoxigraph/latest && mkdir -p ./website/pyoxigraph/latest && cp -r ./python/docs/build/html/* ./website/pyoxigraph/latest/
|
|
|
|
- run: |
|
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
|
|
|
git add .
|
|
|
|
git diff-index --quiet HEAD || git commit -m "Updates pyoxigraph documentation"
|
|
|
|
git push
|
|
|
|
working-directory: ./website
|
|
|
|
|
|
|
|
binary_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: cargo build --release
|
|
|
|
working-directory: ./server
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: oxigraph_server_x86_64_linux_gnu
|
|
|
|
path: target/release/oxigraph_server
|
|
|
|
|
|
|
|
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@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo build --release
|
|
|
|
working-directory: ./server
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: oxigraph_server_x86_64_apple
|
|
|
|
path: target/release/oxigraph_server
|
|
|
|
|
|
|
|
binary_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 build --release
|
|
|
|
working-directory: ./server
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: oxigraph_server_x86_64_windows_msvc
|
|
|
|
path: target/release/oxigraph_server.exe
|
|
|
|
|
|
|
|
wheel_linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- run: sed 's/%arch%/x86_64/g' .github/workflows/manylinux_build.sh > .github/workflows/manylinux_build_script.sh
|
|
|
|
- run: docker run -v "$(pwd)":/workdir --platform linux/x86_64 quay.io/pypa/manylinux2014_x86_64 /bin/bash /workdir/.github/workflows/manylinux_build_script.sh
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: pyoxigraph_x86_64_linux
|
|
|
|
path: target/wheels/*.whl
|
|
|
|
|
|
|
|
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@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
- run: rustup update && rustup target add aarch64-apple-darwin
|
|
|
|
- run: pip install maturin
|
|
|
|
- run: maturin build --release -m python/Cargo.toml --universal2
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: pyoxigraph_wheel_universal2_mac
|
|
|
|
path: target/wheels/*.whl
|
|
|
|
|
|
|
|
wheel_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
- run: rustup update
|
|
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
|
|
- run: pip install maturin
|
|
|
|
- run: maturin build --release -m python/Cargo.toml
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: pyoxigraph_wheel_x86_64_windows
|
|
|
|
path: target/wheels/*.whl
|
|
|
|
|
|
|
|
npm_tarball:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: rustup update
|
|
|
|
- run: cargo install wasm-pack
|
|
|
|
- run: npm run pack
|
|
|
|
working-directory: ./js
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: oxigraph_wasm_npm
|
|
|
|
path: js/*.tgz
|
|
|
|
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
|
- uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{github.actor}}
|
|
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
- uses: docker/metadata-action@v3
|
|
|
|
id: docker_meta
|
|
|
|
with:
|
|
|
|
images: ghcr.io/${{ github.repository }}
|
|
|
|
tags: nightly
|
|
|
|
- uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: server/Dockerfile
|
|
|
|
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
|