WIP: Releases musllinux wheels

pull/380/head
Thomas 2 years ago committed by Thomas Tanon
parent 8684b82893
commit 339a619f28
  1. 15
      .github/workflows/artifacts.yml
  2. 19
      .github/workflows/musllinux_build.sh
  3. 25
      .github/workflows/release.yml

@ -67,7 +67,6 @@ jobs:
with:
submodules: true
- run: rustup update
- uses: Swatinem/rust-cache@v2
- 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
@ -75,6 +74,20 @@ jobs:
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:

@ -0,0 +1,19 @@
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

@ -97,6 +97,31 @@ jobs:
with:
files: target/wheels/*.whl
publish_pypi_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: matrix.architecture != 'x86_64'
- run: sed 's/%arch%/${{ matrix.architecture }}/g' .github/workflows/musllinux_build.sh | sed 's/%for_each_version%/true/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
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: target/wheels
- uses: softprops/action-gh-release@v1
with:
files: target/wheels/*.whl
publish_pypi_mac:
runs-on: macos-latest
env:

Loading…
Cancel
Save