Skip to content

Commit

Permalink
separate the builds for windows and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dwr-psandhu committed Dec 20, 2024
1 parent c92bd0b commit 3c39611
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,63 @@

on:
push:
tags:
- '*'

jobs:
build-wheel:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12"]
python-version: ["3.11"]

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for versioneer
fetch-tags: true # Required for versioneer
fetch-depth: 0
fetch-tags: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install ifort dependencies (Windows)
- name: Install ifort (Windows)
if: matrix.os == 'windows-latest'
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
compiler: intel
version: "2024.0"

- name: Install cibuildwheel
- name: Install build dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel
- name: Build wheel with cibuildwheel
- name: Install build dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip wheel build
python -m pip install -r requirements-build.txt
- name: Build wheel (Linux)
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BUILD: "cp{311,312}-manylinux_x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_BUILD: "pip install -r requirements-build.txt" # if you have build dependencies
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*" # skip 32-bit and musl builds
CIBW_BEFORE_BUILD: "pip install -r requirements-build.txt"
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*"
run: |
cibuildwheel --output-dir dist
- name: Build wheel (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m build --wheel --outdir dist/
- name: Upload Python Package to PyPI
env:
TWINE_USERNAME: __token__
Expand Down

0 comments on commit 3c39611

Please sign in to comment.