name: Nightly artifacts on: push: branches: - main 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 install -y g++-aarch64-linux-gnu mkdir .cargo echo -e "[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 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 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 wheel_linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: true - run: rustup update - run: sed 's/%arch%/x86_64/g' .github/workflows/manylinux_build.sh | sed 's/%for_each_version%//g' > .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@v3 with: name: pyoxigraph_wheel_x86_64_linux path: target/wheels/*.whl wheel_linux_musl: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: true - run: rustup update - run: sed 's/%arch%/x86_64/g' .github/workflows/musllinux_build.sh | sed 's/%for_each_version%//g' > .github/workflows/musllinux_build_script.sh - run: docker run -v "$(pwd)":/workdir --platform linux/x86_64 quay.io/pypa/musllinux_1_1_x86_64 /bin/sh /workdir/.github/workflows/musllinux_build_script.sh - uses: actions/upload-artifact@v3 with: name: pyoxigraph_wheel_x86_64_linux_musl 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@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 - 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 --universal2 --features abi3 - uses: actions/upload-artifact@v3 with: name: pyoxigraph_wheel_universal2_mac path: target/wheels/*.whl 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 - 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 - uses: actions/upload-artifact@v3 with: name: pyoxigraph_wheel_x86_64_windows path: target/wheels/*.whl 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" - run: npm run pack working-directory: ./js - uses: actions/upload-artifact@v3 with: name: oxigraph_wasm_npm path: js/*.tgz docker: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: 'recursive' - uses: docker/setup-buildx-action@v2 - uses: docker/login-action@v2 with: registry: ghcr.io username: ${{github.actor}} password: ${{secrets.GITHUB_TOKEN}} - uses: docker/metadata-action@v4 id: docker_meta with: images: ghcr.io/${{ github.repository }} tags: nightly - uses: docker/build-push-action@v4 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