Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use (newer) setup-python action also on macos-14 images #466

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading