Skip to content

Commit

Permalink
add Apple Silicon builds to CI (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo committed Apr 12, 2024
1 parent f0cd393 commit ca4f36b
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pip install pytest-cov
pytest --durations=10 -We tests/unit_tests --cov-report=xml --cov=PyMPDATA
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
needs: [nojit_and_codecov, pylint, pdoc, precommit, zenodo_json]
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: ["3.8", "3.11"]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -128,36 +128,40 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-python@v1
- if: matrix.platform != 'macos-14'
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- if: matrix.platform == 'macos-14'
run: sudo ln -s `which python3` /usr/local/bin/python

- run: |
pip install -e .
python -m pip install -e .
- run: |
python -We -c "import PyMPDATA"
- run: |
pip install -e .[tests] ./examples
python -m pip install -e .[tests] ./examples
# https://github.com/numba/numba/issues/6350#issuecomment-728174860
- if: startsWith(matrix.platform, 'ubuntu-')
run: echo NUMBA_THREADING_LAYER=omp >> $GITHUB_ENV

- env:
NUMBA_OPT: 1
run: |
pytest --durations=10 -p no:unraisableexception -We tests/unit_tests
pytest --durations=10 -p no:unraisableexception -We -k "not test_timing_3d" tests/smoke_tests
python -m pytest --durations=10 -p no:unraisableexception -We tests/unit_tests
python -m pytest --durations=10 -p no:unraisableexception -We -k "not test_timing_3d" tests/smoke_tests
- env:
NUMBA_OPT: 3
run: |
pytest --durations=10 -p no:unraisableexception -We -k "test_timing_3d" tests/smoke_tests
python -m pytest --durations=10 -p no:unraisableexception -We -k "test_timing_3d" tests/smoke_tests
examples:
needs: [pylint, precommit]
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: ["3.8", "3.11"]
fail-fast: false
runs-on: ${{ matrix.platform }}
Expand All @@ -166,11 +170,17 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v1

- if: matrix.platform != 'macos-14'
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e .[tests] ./examples
- run: pip install -r tests/devops_tests/requirements.txt

- if: matrix.platform == 'macos-14'
run: sudo ln -s `which python3` /usr/local/bin/python

- run: python -m pip install -e .[tests] ./examples
- run: python -m pip install -r tests/devops_tests/requirements.txt
- if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get install libblitz0-dev libboost-thread-dev libboost-date-time-dev libboost-system-dev libboost-iostreams-dev libboost-timer-dev libboost-filesystem-dev
Expand All @@ -189,7 +199,7 @@ jobs:

- env:
NUMBA_OPT: 1
run: pytest --durations=10 -p no:unraisableexception -We tests/devops_tests/test_notebooks.py
run: python -m pytest --durations=10 -p no:unraisableexception -We tests/devops_tests/test_notebooks.py

devops:
runs-on: ubuntu-latest
Expand Down

0 comments on commit ca4f36b

Please sign in to comment.