Skip to content

Commit

Permalink
CI: fix macOS disaster with Github Actions-based python yet again
Browse files Browse the repository at this point in the history
We need this in the unittests job as well, which manifested the same
issue as the project tests. Something in homebrew depends on python,
which yanks that in, which means we have the same issue we fixed in
commit 0e5d632.

I have not seen the Qt4macos test fail in the same way, and it only uses
pkgconfig, ninja, and gcc. Hopefully this usage of homebrew is light
enough we won't have an issue. This may be foolishly optimistic of me,
but time will tell. I'd rather not spend the extra CI time if it's not
actually required.
  • Loading branch information
eli-schwartz committed Dec 3, 2023
1 parent 9016e69 commit 11a83cc
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: brew update
# github actions overwrites brew's python. Force it to reassert itself, by running in a separate step.
# Any brew package can arbitrarily depend on python, even if we don't explicitly install or test a
# framework or brew-based python package, which means we cannot rely on the broken Actions mess.
- name: unbreak python in github actions
run: |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
sudo rm -rf /Library/Frameworks/Python.framework/
brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3
- run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage
python3 -m pip install --upgrade pip
python3 -m pip install pytest pytest-xdist pytest-subtests jsonschema coverage
- run: brew install pkg-config ninja llvm qt@5
- env:
CPPFLAGS: "-I/usr/local/include"
Expand Down

0 comments on commit 11a83cc

Please sign in to comment.