Skip to content

Commit

Permalink
Build in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Oct 8, 2024
1 parent e464488 commit 647c457
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/build_linux_v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build Wheels (Linux v3)

on:
workflow_dispatch:
inputs: {}

jobs:
define-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -U 'cibuildwheel==2.*'

- run: |
ONLY='only=["'$(echo $(python -m cibuildwheel --archs "x86_64 i686 aarch64 ppc64le armv7l" --print-build-identifiers) | sed -e 's/ /","/g')'"]'
echo "ONLY: $ONLY"
echo "$ONLY" >> "$GITHUB_OUTPUT"
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: linux
linux:
runs-on: ubuntu-latest

needs: define-matrix
strategy:
matrix:
only: ${{ fromJSON(needs.define-matrix.outputs.only) }}

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Cache pip
uses: actions/cache@v4
with:
key: cache--${{ hashFiles('./requirements-dev.txt') }}
path: ~/.cache/pip

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: python -m pip install -U pip wheel setuptools
- run: python -m pip install -Ur requirements-dev.txt
- run: python -m pip install -U 'cibuildwheel==2.*'

- run: make prepare

- run: python -m cibuildwheel --output-dir wheelhouse --only ${{ matrix.only }}
env:
CIBW_BUILD_FRONTEND: build
CIBW_SKIP: 'cp27-* pp*'
CIBW_DEPENDENCY_VERSIONS: pinned
CIBW_PLATFORM: linux
CIBW_TEST_COMMAND: python {project}/scripts/run-tests.py

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.only }}
path: ./wheelhouse

0 comments on commit 647c457

Please sign in to comment.