Skip to content

Commit

Permalink
Merge pull request #389 from paugier/update-ci-release
Browse files Browse the repository at this point in the history
Update CI release
  • Loading branch information
hgomersall authored Jul 9, 2024
2 parents b87ba8f + 2677ecd commit 92879c3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
sudo apt-get update
sudo apt install -y libfftw3-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
53 changes: 28 additions & 25 deletions .github/workflows/wheel_tests_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
cibw_arch: "aarch64"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'

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

Expand All @@ -55,13 +55,14 @@ jobs:
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
name: wheels-${{ matrix.cibw_python }}-${{ matrix.cibw_libc }}_${{ matrix.cibw_arch }}
path: ./dist/*.whl


build_macos_wheels:
name: Build ${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -82,15 +83,15 @@ jobs:
env:
MACOSX_DEPLOYMENT_TARGET: "12.0"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install FFTW3 libraries
run: |
brew install fftw
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'
Expand All @@ -105,11 +106,11 @@ jobs:
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
name: wheels-${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }}
path: ./dist/*.whl


Expand All @@ -126,15 +127,15 @@ jobs:
env:
MACOSX_DEPLOYMENT_TARGET: "14.0"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install FFTW3 libraries
run: |
brew install fftw
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'
Expand All @@ -149,13 +150,14 @@ jobs:
env:
CIBW_BUILD: ${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }}

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
name: wheels-${{ matrix.cibw_python }}-macosx_${{ matrix.cibw_arch }}
path: ./dist/*.whl


build_windows_wheels:
name: Build ${{ matrix.cibw_python }}-win${{ matrix.cibw_arch }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -174,11 +176,11 @@ jobs:
cibw_arch: "32"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'
Expand Down Expand Up @@ -237,47 +239,48 @@ jobs:
run: |
python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload wheels as artifacts
if: ${{ github.event_name != 'pull_request' }}
with:
name: wheels
name: wheels-${{ matrix.cibw_python }}-win${{ matrix.cibw_arch }}
path: ./dist/*.whl


deploy:
name: Release
needs: [build_linux_wheels, build_macos_wheels, build_windows_wheels]
if: github.repository_owner == 'pyFFTW' && startsWith(github.ref, 'refs/tags/v') && always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'

- name: Install Twine
- name: Install Twine and Build
run: |
python -m pip install --upgrade pip
pip install twine
pip install twine build
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
id: download
with:
name: wheels
path: ./dist
merge-multiple: true

- name: Publish the source distribution on PyPI
run: |
PYFFTW_VERSION=$(git describe --tags)
python setup.py sdist
python -m build --sdist
ls -la ${{ github.workspace }}/dist
# We prefer to release wheels before source because otherwise there is a
# small window during which users who pip install pyfftw will require compilation.
twine upload ${{ github.workspace }}/dist/*.whl
twine upload ${{ github.workspace }}/dist/pyFFTW-${PYFFTW_VERSION:1}.tar.gz
twine upload ${{ github.workspace }}/dist/pyfftw-${PYFFTW_VERSION:1}.tar.gz
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand Down

0 comments on commit 92879c3

Please sign in to comment.