-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ee887c
commit 09ae83a
Showing
1 changed file
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
# Workflow to build | ||
name: Test Wheels | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- "**" | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheel for ${{ matrix.platform }}${{ matrix.pythonVersion }}-${{ matrix.platformID }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
# Ensure that a wheel builder finishes even if another fails | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Window 64 bit | ||
- os: windows-latest | ||
pythonVersion: 312 | ||
bitness: 64 | ||
platformID: win_amd64 | ||
pythonType: "cp" | ||
platform: "windows" | ||
|
||
- os: windows-latest | ||
pythonVersion: 310 | ||
bitness: 64 | ||
platformID: win_amd64 | ||
pythonType: "pp" | ||
platform: "windows" | ||
|
||
# Linux 64 bit manylinux2014 | ||
- os: ubuntu-latest | ||
pythonVersion: 312 | ||
bitness: 64 | ||
platformID: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
pythonType: "cp" | ||
platform: "linux" | ||
|
||
# Linux PyPy 64 bit manylinux2014 | ||
- os: ubuntu-latest | ||
pythonVersion: 312 | ||
bitness: 64 | ||
platformID: manylinux_x86_64 | ||
manylinux_image: manylinux2014 | ||
pythonType: "pp" | ||
platform: "linux" | ||
|
||
# MacOS x86_64 | ||
- os: macos-latest | ||
pythonVersion: 312 | ||
bitness: 64 | ||
platformID: macosx_x86_64 | ||
pythonType: "cp" | ||
platform: "macos" | ||
|
||
# Apple-Silicon MacOS | ||
- os: macos-latest | ||
pythonVersion: 310 | ||
bitness: 64 | ||
platformID: macosx_arm64 | ||
pythonType: "cp" | ||
platform: "macos" | ||
|
||
steps: | ||
- name: Workflow Telemetry | ||
uses: runforesight/workflow-telemetry-action@v1.8.7 | ||
with: | ||
theme: "dark" | ||
|
||
- name: Checkout LibRapid | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install Requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Install XCode | ||
if: runner.os == 'macOS' | ||
uses: maxim-lobanov/setup-xcode@v1.5.1 | ||
with: | ||
xcode-version: latest | ||
|
||
- name: Install Clang | ||
if: runner.os == 'macOS' | ||
run: | | ||
rm -f '/usr/local/bin/2to3*' | ||
brew install llvm libomp | ||
- name: Install Clang | ||
if: runner.os == 'Windows' | ||
uses: KyleMayes/install-llvm-action@v1 | ||
with: | ||
version: '16.0' | ||
directory: ${RUNNER_TOOL_CACHE} | ||
env: on | ||
|
||
- name: Build Wheels | ||
run: | | ||
python -m pip install cibuildwheel | ||
python -m cibuildwheel --output-dir wheelhouse --platform ${{ matrix.platform }} --arch ${{ matrix.bitness }} | ||
env: | ||
CIBW_BUILD: ${{ matrix.pythonType }}${{ matrix.pythonVersion }}-${{ matrix.platformID }} | ||
CIBW_ARCHS: all | ||
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_MANYLINUX_PYPY_I686_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_BUILD_VERBOSITY: 1 | ||
MACOSX_DEPLOYMENT_TARGET: 10.15 | ||
CMAKE_BUILD_PARALLEL_LEVEL: 1 | ||
GITHUB_ACTIONS: ON | ||
LIBRAPID_GET_BLAS: OFF | ||
LIBRAPID_GET_FFTW: OFF | ||
|
||
- name: Store Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
# Build the source distribution under Linux | ||
build_sdist: | ||
name: Source Distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout LibRapid | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' # update once build dependencies are available | ||
|
||
- name: Install Requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Build Source Distribution | ||
run: | | ||
python -m build --sdist --outdir dist | ||
twine check dist/*.tar.gz | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz |