Skip to content

Commit

Permalink
Update CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisstaite committed Jan 1, 2025
1 parent 46c8a9a commit aa2abf8
Showing 1 changed file with 36 additions and 28 deletions.
64 changes: 36 additions & 28 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Execute the build
uses: docker://quay.io/pypa/manylinux_2_24_x86_64
with:
entrypoint: bash
args: /github/workspace/.github/workflows/build.sh
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: manylinux2_24_64
path: build/*.whl
Expand All @@ -33,7 +33,7 @@ jobs:
needs: [ build_linux2_24_64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: manylinux2_24_64
Expand All @@ -49,14 +49,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Execute the build
uses: docker://quay.io/pypa/manylinux_2_24_i686
with:
entrypoint: linux32
args: bash /github/workspace/.github/workflows/build.sh
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: manylinux2_24_32
path: build/*.whl
Expand All @@ -67,7 +67,7 @@ jobs:
needs: [ build_linux2_24_32 ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: manylinux2_24_32
Expand All @@ -83,7 +83,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up emulation
uses: docker/setup-qemu-action@v2
Expand All @@ -96,7 +96,7 @@ jobs:
entrypoint: bash
args: /github/workspace/.github/workflows/build.sh
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: manylinux2_24_aarch64
path: build/*.whl
Expand All @@ -107,7 +107,7 @@ jobs:
needs: [ build_linux2_24_aarch64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: manylinux2_24_aarch64
Expand All @@ -123,14 +123,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Execute the build
uses: docker://quay.io/pypa/manylinux_2_28_x86_64
with:
entrypoint: bash
args: /github/workspace/.github/workflows/build.sh
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: manylinux2_28_64
path: build/*.whl
Expand All @@ -141,7 +141,7 @@ jobs:
needs: [ build_linux2_28_64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: manylinux2_28_64
Expand All @@ -157,10 +157,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up emulation
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: aarch64

Expand All @@ -170,7 +170,7 @@ jobs:
entrypoint: bash
args: /github/workspace/.github/workflows/build.sh
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: manylinux2_28_aarch64
path: build/*.whl
Expand All @@ -181,7 +181,7 @@ jobs:
needs: [ build_linux2_28_aarch64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: manylinux2_28_aarch64
Expand All @@ -203,34 +203,38 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --user setuptools wheel
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build the wheel
run: |
mkdir build
cd build
cmake -DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}" -DPYTHON_VERSIONS=${{ matrix.python-version }} ..
make
- name: Archive built wheel
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: mac
name: mac_${{ matrix.arch }}_${{ matrix.python-version }}
path: build/*.whl
if-no-files-found: error

publish_mac:
if: github.event_name == 'release' && github.event.action == 'created'
needs: [ build_mac ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
arch: ['arm64', 'x86_64']
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: mac
name: mac_${{ matrix.arch }}_${{ matrix.python-version }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -255,11 +259,11 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-arch }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: python -m pip install --upgrade setuptools wheel
- name: Build the wheel
Expand All @@ -269,21 +273,25 @@ jobs:
cmake -DPYTHON_VERSIONS=${{ matrix.python-version }} .. -G "Visual Studio 16 2019" ${{ matrix.arch }}
cmake --build . --config Release
- name: Archive built wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: windows
name: windows_${{ matrix.python-arch }}_${{ matrix.python-version }}
path: build/*.whl
if-no-files-found: error

publish_windows:
if: github.event_name == 'release' && github.event.action == 'created'
needs: [ build_windows ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-arch: ['x86', 'x64']
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: windows
name: windows_${{ matrix.python-arch }}_${{ matrix.python-version }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit aa2abf8

Please sign in to comment.