Skip to content

Commit

Permalink
use (newer) setup-python action also on macos-14 images (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo authored Oct 23, 2024
1 parent 1c08c32 commit a0a3bf7
Showing 1 changed file with 8 additions and 44 deletions.
52 changes: 8 additions & 44 deletions .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"
- run: |
Expand All @@ -37,7 +37,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@master
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- name: Generate coverage report
Expand All @@ -60,7 +60,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- name: Install dependencies
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
with:
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.9
- env:
Expand Down Expand Up @@ -121,37 +121,21 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: ["3.9", "3.12", "system"]
python-version: ["3.9", "3.12"]
exclude:
- platform: ubuntu-latest
python-version: system
- platform: macos-12
python-version: system
- platform: windows-latest
python-version: system
- platform: macos-14
python-version: "3.9"
- platform: macos-14
python-version: "3.12"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

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

- if: matrix.platform == 'macos-14'
run: |
sudo ln -s `which python3` /usr/local/bin/python
echo "PIP_INSTALL_ARGS=--break-system-packages" >> $GITHUB_ENV
# Python 3.12 workaround
python -m pip install --break-system-packages setuptools
- run: |
python -m pip install $PIP_INSTALL_ARGS -e . # to check if usable without test/example dependencies
python -We -c "import PyMPDATA"
Expand All @@ -178,17 +162,6 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-12, macos-14, windows-latest]
python-version: ["3.9", "3.12"]
exclude:
- platform: ubuntu-latest
python-version: system
- platform: macos-12
python-version: system
- platform: windows-latest
python-version: system
- platform: macos-14
python-version: "3.9"
- platform: macos-14
python-version: "3.12"
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -197,19 +170,10 @@ jobs:
submodules: recursive
fetch-depth: 0

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

- if: matrix.platform == 'macos-14'
run: |
sudo ln -s `which python3` /usr/local/bin/python
echo "PIP_INSTALL_ARGS=--break-system-packages" >> $GITHUB_ENV
# Python 3.12 workaround
python -m pip install --break-system-packages setuptools
- run: python -m pip install $PIP_INSTALL_ARGS -e .[tests] ./examples
- run: python -m pip install $PIP_INSTALL_ARGS -r tests/devops_tests/requirements.txt
- if: matrix.platform == 'ubuntu-latest'
Expand Down Expand Up @@ -279,7 +243,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"

Expand Down

0 comments on commit a0a3bf7

Please sign in to comment.