Skip to content

Commit 0df9795

Browse files
authored
fix macos-14 and readme_fortran CI builds (new pip option needed on macOS system Python, brew vs. system Python version mismatch; missing apt-get update) (#352)
1 parent c883b16 commit 0df9795

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/readme_listings.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ jobs:
7575
with:
7676
submodules: recursive
7777

78-
- run: sudo apt-get install libnetcdff-dev
78+
- run: |
79+
sudo apt-get update
80+
sudo apt-get install libnetcdff-dev
7981
- run: |
8082
cd readme_fortran
8183
mkdir build

.github/workflows/tests+pypi.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,14 @@ jobs:
130130
python-version: ${{ matrix.python-version }}
131131

132132
- if: matrix.python-version == 'system'
133-
run: sudo ln -s `which python3` /usr/local/bin/python
133+
run: |
134+
sudo ln -s `which python3` /usr/local/bin/python
135+
echo PIP_INSTALL_OPTS=--break-system-packages >> $GITHUB_ENV
136+
137+
- if: matrix.python-version != 'system'
138+
run: python -m pip install --upgrade pip==22.1.2
134139

135-
- run: python -m pip install --upgrade pip==22.1.2
136-
- run: pip install "build<1.1" wheel
140+
- run: python -m pip install $PIP_INSTALL_OPTS "build<1.1" wheel
137141
- run: cmake --version
138142
- run: |
139143
unset CI
@@ -183,23 +187,23 @@ jobs:
183187
- env:
184188
SYSTEM_VERSION_COMPAT: 0
185189
run: |
186-
pip debug --verbose
187-
for i in dist/*.whl; do pip install $i[tests]; done;
188-
pip show --verbose PyPartMC
190+
python -m pip debug --verbose
191+
for i in dist/*.whl; do python -m pip install $PIP_INSTALL_OPTS $i[tests]; done;
192+
python -m pip show --verbose PyPartMC
189193
190194
### make sure PyPartMC is not picked up from a local folder
191195
- run: |
192196
cd tests
193197
python -c "import PyPartMC"
194-
pytest --durations=10 -v -s -We -p no:unraisableexception .
198+
python -m pytest --durations=10 -v -s -We -p no:unraisableexception .
195199
cd ..
196200
197201
- if: matrix.python-version != '3.7'
198202
run: |
199-
pip install -r gitmodules/devops_tests/requirements.txt
203+
python -m pip install $PIP_INSTALL_OPTS -r gitmodules/devops_tests/requirements.txt
200204
ex -sc 'g/^PyPartMC/d' -cx .binder/requirements.txt
201-
pip install -r .binder/requirements.txt
202-
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pytest --durations=10 -v -s -We -p no:unraisableexception gitmodules/devops_tests
205+
python -m pip install $PIP_INSTALL_OPTS -r .binder/requirements.txt
206+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python -m pytest --durations=10 -v -s -We -p no:unraisableexception gitmodules/devops_tests
203207
204208
### uncomment to gain ssh access in case of failure
205209
# - if: ${{ failure() }}

0 commit comments

Comments
 (0)