Skip to content

Commit

Permalink
Publish aarch64 musl with trusted publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Oct 17, 2023
1 parent 7f88f93 commit f5be273
Showing 1 changed file with 98 additions and 61 deletions.
159 changes: 98 additions & 61 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@
name: Wheel Builds
on:
push:
branches: [ 'musl-aarch64' ]
branches:
- musl-aarch64
jobs:
build_wheels37:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -30,35 +34,41 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-* cp38-* cp310-* cp311-* cp39-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-*
cp38-* cp310-* cp311-* cp39-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels38:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -72,35 +82,41 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-* cp37-* cp310-* cp311-* cp39-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-*
cp37-* cp310-* cp311-* cp39-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels39:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -114,35 +130,41 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-* cp37-* cp38-* cp310-* cp311-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-*
cp37-* cp38-* cp310-* cp311-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels310:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -156,35 +178,41 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-* cp37-* cp38-* cp311-* cp39-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-*
cp37-* cp38-* cp311-* cp39-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels311:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -198,35 +226,41 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-* cp37-* cp38-* cp310-* cp39-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp312-*
cp37-* cp38-* cp310-* cp39-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels312:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -240,19 +274,22 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BEFORE_ALL_LINUX: "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-* cp38-* cp310-* cp311-* cp39-*
CIBW_BEFORE_ALL_LINUX: apk add --no-cache curl gcc && curl https://sh.rustup.rs
-sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install
stable && rustup default stable
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env"
CARGO_NET_GIT_FETCH_WITH_CLI="true"
CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-*
cp38-* cp310-* cp311-* cp39-*
CIBW_BEFORE_BUILD: pip install -U setuptools-rust
CIBW_TEST_REQUIRES: networkx testtools fixtures
CIBW_BUILD_FRONTEND: "pip"
CIBW_BUILD_FRONTEND: pip
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests
CIBW_TEST_SKIP: cp312-* cp37-* cp38-* cp310-* cp311-* cp39-*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: retworkx-ci
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/

0 comments on commit f5be273

Please sign in to comment.