Skip to content

Commit

Permalink
Fixed Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Laky-64 committed Feb 29, 2024
1 parent 9dc9b08 commit d651973
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 7 deletions.
34 changes: 34 additions & 0 deletions .github/cibuildwheel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: cibuildwheel
description: 'Installs and runs cibuildwheel on the current runner'
inputs:
python-path:
description: 'Path to the Python interpreter to use'
required: false
default: ''

branding:
icon: package
color: yellow

runs:
using: composite
steps:
- run: >
"${{ inputs.python-path }}" -m pipx run
--spec '${{ github.action_path }}'
cibuildwheel .
--output-dir "wheelhouse"
2>&1
shell: bash
if: runner.os != 'Windows'
- run: >
if ($PSNativeCommandArgumentPassing) {
$PSNativeCommandArgumentPassing = 'Legacy'
};
& "${{ inputs.python-path }}" -m pipx run
--spec "${{ github.action_path }}"
cibuildwheel .
--output-dir '"wheelhouse"'
shell: pwsh
if: runner.os == 'Windows'
28 changes: 21 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,36 @@ jobs:
cibw_archs: "arm64"
cibw_os_build: "macosx_arm64"
shared_name: "macos-arm64"
fail-fast: false

steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
if: matrix.cibw_archs != 'aarch64'
id: python
with:
python-version: "3.8 - 3.12"
update-environment: false

- name: Set up Python (ARM64)
if: matrix.cibw_archs == 'aarch64'
run: echo "::set-output name=python-path::python3.12"

- name: Install Python Requirements
run: |
"${{ steps.python.outputs.python-path }}" -m pip install setuptools
"${{ steps.python.outputs.python-path }}" -m pip install pipx
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Install SetupTools
if: matrix.cibw_os_build == 'macosx_arm64'
run: |
pip install setuptools
- name: Build Debug Shared lib
if: matrix.cibw_archs != 'aarch64'
run: python3 setup.py build_shared --no-preserve-cache --debug
Expand Down Expand Up @@ -83,7 +94,10 @@ jobs:
if-no-files-found: error

- name: Build wheels
uses: pypa/[email protected]
uses: ./.github/cibuildwheel
with:
python-path: ${{ steps.python.outputs.python-path }}

env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
Expand Down

0 comments on commit d651973

Please sign in to comment.