Skip to content

Commit

Permalink
More cross-platform wheel build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
movermeyer committed Oct 6, 2023
1 parent 10a10a1 commit f4ca7a5
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -114,8 +114,40 @@ jobs:
name: release_values

- name: Load normalized release values
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
cat release_values.txt | xargs -l -I{} bash -c 'echo {} >> $GITHUB_ENV'
cat release_values.txt | xargs -I{} bash -c 'echo {} >> $GITHUB_ENV'
- name: Replace version in pyproject.toml (developmental releases)
run: sed -i -e 's/^version = ".*\?"$/version = "${{ env.version_to_use }}"/g' pyproject.toml

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "pp*-macosx* *-win32 *-manylinux_i686"
CIBW_ARCHS_MACOS: x86_64 arm64 universal2

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_wheels_windows:
name: Build wheel on windows-latest
needs: [pre_build_sanity_check]
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
# with: # TODO: Releases aren't necessarily on the default branch
# ref: ${{ env.release_tag }}

- uses: actions/download-artifact@v3
with:
name: release_values

- name: Load normalized release values
run: |
for /F "tokens=*" %%A in (release_values.txt) do echo %%A >> $env:GITHUB_ENV
- name: Replace version in pyproject.toml (developmental releases)
run: sed -i -e 's/^version = ".*\?"$/version = "${{ env.version_to_use }}"/g' pyproject.toml
Expand Down Expand Up @@ -166,7 +198,7 @@ jobs:
path: dist/*.tar.gz

# publish_to_test_pypi:
# needs: [pre_build_sanity_check, build_wheels, build_sdist]
# needs: [pre_build_sanity_check, build_wheels, build_wheels_windows, build_sdist]
# runs-on: ubuntu-latest

# steps:
Expand Down Expand Up @@ -238,7 +270,7 @@ jobs:
# publish:
# needs: [pre_build_sanity_check, build_wheels, build_sdist, publish_to_test_pypi, pre_publish_sanity_check]
# needs: [pre_build_sanity_check, build_wheels, build_wheels_windows, build_sdist, publish_to_test_pypi, pre_publish_sanity_check]
# runs-on: ubuntu-latest

# steps:
Expand Down

0 comments on commit f4ca7a5

Please sign in to comment.