Builds wheels on more architectures

pull/175/head
Tpt 3 years ago
parent 04827a71f8
commit dec66cc684
  1. 21
      .github/workflows/build.yml
  2. 30
      .github/workflows/release.yml

@ -46,7 +46,6 @@ jobs:
submodules: true submodules: true
- run: rustup update - run: rustup update
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- run: choco install llvm -y
- run: cargo test --all-features - run: cargo test --all-features
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
@ -71,7 +70,7 @@ jobs:
- run: rustup update - run: rustup update
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: "3.10"
- run: python -m venv python/venv - run: python -m venv python/venv
- run: source python/venv/bin/activate && pip install --upgrade 'maturin~=0.12' sphinx - run: source python/venv/bin/activate && pip install --upgrade 'maturin~=0.12' sphinx
- run: source venv/bin/activate && maturin develop - run: source venv/bin/activate && maturin develop
@ -85,7 +84,6 @@ jobs:
python_wheel_linux: python_wheel_linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: python
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
@ -96,10 +94,11 @@ jobs:
container: messense/manylinux2014-cross:x86_64 container: messense/manylinux2014-cross:x86_64
command: build command: build
args: -m python/Cargo.toml --cargo-extra-args="--no-default-features --features vendored" args: -m python/Cargo.toml --cargo-extra-args="--no-default-features --features vendored"
- run: pip install pyoxigraph --no-index --find-links ../../target/wheels && python -m unittest
working-directory: ./python/tests
python_wheel_mac: python_wheel_mac:
runs-on: macos-latest runs-on: macos-latest
needs: python
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
@ -108,17 +107,27 @@ jobs:
with: with:
command: build command: build
args: -m python/Cargo.toml --universal2 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: python_wheel_windows:
runs-on: windows-latest runs-on: windows-latest
needs: python strategy:
matrix:
architecture: ["x86", "x64"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: ${{ matrix.architecture }}
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- run: choco install llvm -y
- uses: messense/maturin-action@v1 - uses: messense/maturin-action@v1
with: with:
command: build command: build
target: ${{ matrix.architecture }}
args: -m python/Cargo.toml args: -m python/Cargo.toml
- run: pip install pyoxigraph --no-index --find-links ../../target/wheels && python -m unittest
working-directory: ./python/tests

@ -28,6 +28,7 @@ jobs:
push: true push: true
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
publish_rocksdb_crate: publish_rocksdb_crate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -40,6 +41,7 @@ jobs:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish - run: cargo publish
working-directory: ./rocksdb-sys working-directory: ./rocksdb-sys
publish_lib_crate: publish_lib_crate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: publish_rocksdb_crate needs: publish_rocksdb_crate
@ -53,6 +55,7 @@ jobs:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish - run: cargo publish
working-directory: ./lib working-directory: ./lib
publish_server_crate: publish_server_crate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: publish_lib_crate needs: publish_lib_crate
@ -66,7 +69,8 @@ jobs:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish - run: cargo publish
working-directory: ./server working-directory: ./server
publish_pypi_linux:
python_wheel_linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: publish_lib_crate needs: publish_lib_crate
steps: steps:
@ -79,7 +83,8 @@ jobs:
manylinux: 2014 manylinux: 2014
container: messense/manylinux2014-cross:x86_64 container: messense/manylinux2014-cross:x86_64
command: publish command: publish
args: -m python/Cargo.toml --cargo-extra-args="--no-default-features --features vendored" -u __token__ -p ${{ secrets.PYPI_PASSWORD }} args: -m python/Cargo.toml --cargo-extra-args="--no-default-features --features vendored" --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
publish_pypi_mac: publish_pypi_mac:
runs-on: macos-latest runs-on: macos-latest
needs: publish_lib_crate needs: publish_lib_crate
@ -90,20 +95,33 @@ jobs:
- uses: messense/maturin-action@v1 - uses: messense/maturin-action@v1
with: with:
command: publish command: publish
args: -m python/Cargo.toml --universal2 --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }} args: -m python/Cargo.toml --universal2 -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
publish_pypi_windows: - uses: messense/maturin-action@v1
with:
command: publish
args: -m python/Cargo.toml --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
python_wheel_windows:
runs-on: windows-latest runs-on: windows-latest
needs: publish_lib_crate needs: publish_lib_crate
strategy:
matrix:
architecture: ["x86", "x64"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: ${{ matrix.architecture }}
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- run: choco install llvm -y
- uses: messense/maturin-action@v1 - uses: messense/maturin-action@v1
with: with:
command: publish command: publish
target: ${{ matrix.architecture }}
args: -m python/Cargo.toml --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }} args: -m python/Cargo.toml --no-sdist -u __token__ -p ${{ secrets.PYPI_PASSWORD }}
publish_npm: publish_npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -124,6 +142,7 @@ jobs:
working-directory: ./js working-directory: ./js
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish_python_doc: publish_python_doc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -158,6 +177,7 @@ jobs:
git diff-index --quiet HEAD || git commit -m "Updates pyoxigraph documentation" git diff-index --quiet HEAD || git commit -m "Updates pyoxigraph documentation"
git push git push
working-directory: ./website working-directory: ./website
publish_homebrew: publish_homebrew:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

Loading…
Cancel
Save