-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install gsl into container and reenable mac wheels (#388)
* install gsl into container and reenable mac build * don't build wheels for 3.9 [skip tests] [skip docs] * use a newer manylinux [skip tests] [skip docs] * oops too future manylinux - also wtf why aren't tests skipping [skip tests] * back to 2_28 and testing skip * disable mac wheels again, alas, and still testing [skip tests] * maybe have skip working [skip tests] and new attempt at macos wheels * maybe I need -y? [skip tests] [skip docs] * only build x86 on linux now [skip tests] [skip docs]
- Loading branch information
Showing
4 changed files
with
93 additions
and
68 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 |
---|---|---|
|
@@ -9,10 +9,25 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
check_skip_flags: | ||
name: Check skip flags | ||
runs-on: ubuntu-latest | ||
outputs: | ||
head-commit-message: ${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ env.GITHUB_SHA }} | ||
- name: Get head commit message | ||
id: get_head_commit_message | ||
run: echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT" | ||
|
||
tests: | ||
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy-version }}, no gsl ${{ matrix.gala-nogsl }}, deps ${{ matrix.pip-test-deps }} | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'docs only') && !contains(github.event.head_commit.message, '[skip tests]')}} | ||
needs: check_skip_flags | ||
if: ${{ github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'docs only') && !contains(needs.check_skip_flags.outputs.head-commit-message, '[skip tests]') }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
|
@@ -54,47 +69,50 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
|
||
# For animation tests | ||
- uses: FedericoCarboni/setup-ffmpeg@v3 | ||
if: ${{ !startsWith(matrix.os, 'mac') }} | ||
continue-on-error: true | ||
with: | ||
# Not strictly necessary, but it may prevent rate limit | ||
# errors especially on GitHub-hosted macos machines. | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
ffmpeg-version: "6.1.0" | ||
id: setup-ffmpeg | ||
|
||
# Mac: | ||
- name: Setup Mac - GSL | ||
if: startsWith(matrix.os, 'mac') | ||
run: | | ||
brew install gsl | ||
# Ubuntu: | ||
- name: Setup Linux - GSL | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gsl-bin libgsl0-dev build-essential | ||
sudo apt-get install libhdf5-serial-dev # TODO: remove when h5py has 3.11 wheels | ||
- name: Install package and dependencies | ||
run: python -m pip install -e ".[${{ matrix.pip-test-deps }}]" | ||
env: | ||
GALA_NOGSL: ${{ matrix.gala-nogsl }} | ||
|
||
- name: Update versions if testing min versions | ||
if: matrix.numpy-version != 'latest' | ||
run: | | ||
python -m pip install numpy~=${{ matrix.numpy-version }} | ||
- name: Run tests | ||
run: >- | ||
python -m pytest -ra --cov --cov-report=xml --cov-report=term | ||
--durations=20 . | ||
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: WTF | ||
run: echo ${{ needs.check_skip_flags.outputs.HEAD_COMMIT_MESSAGE }} | ||
|
||
# # For animation tests | ||
# - uses: FedericoCarboni/setup-ffmpeg@v3 | ||
# if: ${{ !startsWith(matrix.os, 'mac') }} | ||
# continue-on-error: true | ||
# with: | ||
# # Not strictly necessary, but it may prevent rate limit | ||
# # errors especially on GitHub-hosted macos machines. | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# ffmpeg-version: "6.1.0" | ||
# id: setup-ffmpeg | ||
|
||
# # Mac: | ||
# - name: Setup Mac - GSL | ||
# if: startsWith(matrix.os, 'mac') | ||
# run: | | ||
# brew install gsl | ||
|
||
# # Ubuntu: | ||
# - name: Setup Linux - GSL | ||
# if: runner.os == 'Linux' | ||
# run: | | ||
# sudo apt-get update | ||
# sudo apt-get install gsl-bin libgsl0-dev build-essential | ||
# sudo apt-get install libhdf5-serial-dev # TODO: remove when h5py has 3.11 wheels | ||
|
||
# - name: Install package and dependencies | ||
# run: python -m pip install -e ".[${{ matrix.pip-test-deps }}]" | ||
# env: | ||
# GALA_NOGSL: ${{ matrix.gala-nogsl }} | ||
|
||
# - name: Update versions if testing min versions | ||
# if: matrix.numpy-version != 'latest' | ||
# run: | | ||
# python -m pip install numpy~=${{ matrix.numpy-version }} | ||
|
||
# - name: Run tests | ||
# run: >- | ||
# python -m pytest -ra --cov --cov-report=xml --cov-report=term | ||
# --durations=20 . | ||
|
||
# - name: Upload coverage report | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} |
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
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 |
---|---|---|
|
@@ -25,43 +25,30 @@ jobs: | |
matrix: | ||
# Building wheels on linux takes too much time: split wheels into multiple runs | ||
python: | ||
- ["1", "cp39-* cp310-*"] | ||
- ["2", "cp311-* cp312-*"] | ||
- ["1", "cp310-*"] | ||
- ["2", "cp311-*"] | ||
- ["3", "cp312-*"] | ||
os: | ||
# - "macos-14" | ||
- "macos-14" | ||
- "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# - name: Set up QEMU # For emulation on Linux | ||
# if: runner.os == 'Linux' | ||
# uses: docker/setup-qemu-action@v3 | ||
# with: | ||
# platforms: all | ||
|
||
# Mac: disable wheels on mac because of GSL issues | ||
# NOTE: need to install pipx explicitly for macos-14 | ||
# - name: Setup Mac | ||
# if: runner.os == 'macOS' | ||
# run: | | ||
# brew install gsl pipx | ||
|
||
# Ubuntu: | ||
- name: Setup Linux | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install gsl-bin libgsl0-dev | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_LINUX: "x86_64" | ||
CIBW_ARCHS_MACOS: "x86_64 arm64" | ||
CIBW_BUILD: ${{ matrix.python[1] }} | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | ||
CIBW_SKIP: "*-win32 *musllinux* pp* *i686" | ||
CIBW_BEFORE_ALL_LINUX: dnf install -y gsl gsl-devel || apt-get install gsl-bin libgsl0-dev | ||
CIBW_BEFORE_ALL_MACOS: brew install gsl pipx | ||
MACOSX_DEPLOYMENT_TARGET: 14.0 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
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