Skip to content

Commit

Permalink
chore: fixup ci for libssh2 bits on darwin runners, housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmontanari committed Apr 27, 2024
1 parent f0d0812 commit 7785e7d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 32 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 1
matrix:
os: [ubuntu-latest]
version: ["3.11"]
version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.version }}
Expand All @@ -30,7 +30,7 @@ jobs:
max-parallel: 1
matrix:
os: [ubuntu-latest]
version: ["3.11"]
version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.version }}
Expand Down Expand Up @@ -67,11 +67,6 @@ jobs:
# version we are targeting with nox, while still having versions like 3.9.0a4
run: |
echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
- name: ensure openssl installed for macos
# openssl missing/being linked incorrectly causes ssh2-python install failures
if: matrix.os == 'macos-latest'
run: |
brew install openssl libssh2
- name: setup test env
run: |
python -m pip install --upgrade pip
Expand All @@ -80,8 +75,7 @@ jobs:
- name: run nox
# TERM is needed needed to make the terminal a tty (i think? without this system ssh is super broken)
# libssh2/ssh2-python were getting libssh2 linked incorrectly/weirdly and libraries were trying to be loaded
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this even
# if it feels horribly hacky. afaik, this is ignored on linux, so it will only matter on the macos builds
# https://stackoverflow.com/questions/71356491/python3-on-mac-having-trouble-loading-libssh2
run: TERM=xterm DYLD_LIBRARY_PATH=/usr/local/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this -- note
# that if brew macos packages get updated on runners this may break again :)
run: TERM=xterm DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/libssh2/1.11.0_1/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"

14 changes: 4 additions & 10 deletions .github/workflows/pre_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
max-parallel: 2
matrix:
os: [ubuntu-latest, macos-latest]
version: ["3.12-dev"]
version: ["3.13-dev"]
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.version }}
Expand All @@ -26,11 +26,6 @@ jobs:
# version we are targeting with nox, while still having versions like 3.9.0a4
run: |
echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
- name: ensure openssl installed for macos
# openssl missing/being linked incorrectly causes ssh2-python install failures
if: matrix.os == 'macos-latest'
run: |
brew install openssl libssh2
- name: setup test env
run: |
python -m pip install --upgrade pip
Expand All @@ -39,7 +34,6 @@ jobs:
- name: run nox
# TERM is needed needed to make the terminal a tty (i think? without this system ssh is super broken)
# libssh2/ssh2-python were getting libssh2 linked incorrectly/weirdly and libraries were trying to be loaded
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this even
# if it feels horribly hacky. afaik, this is ignored on linux, so it will only matter on the macos builds
# https://stackoverflow.com/questions/71356491/python3-on-mac-having-trouble-loading-libssh2
run: TERM=xterm DYLD_LIBRARY_PATH=/usr/local/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this -- note
# that if brew macos packages get updated on runners this may break again :)
run: TERM=xterm DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/libssh2/1.11.0_1/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
14 changes: 4 additions & 10 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 1
matrix:
os: [ubuntu-latest]
version: ["3.11"]
version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -48,11 +48,6 @@ jobs:
# version we are targeting with nox, while still having versions like 3.9.0a4
run: |
echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
- name: ensure openssl installed for macos
# openssl missing/being linked incorrectly causes ssh2-python install failures
if: matrix.os == 'macos-latest'
run: |
brew install openssl libssh2
- name: setup test env
run: |
python -m pip install --upgrade pip
Expand All @@ -61,7 +56,6 @@ jobs:
- name: run nox
# TERM is needed needed to make the terminal a tty (i think? without this system ssh is super broken)
# libssh2/ssh2-python were getting libssh2 linked incorrectly/weirdly and libraries were trying to be loaded
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this even
# if it feels horribly hacky. afaik, this is ignored on linux, so it will only matter on the macos builds
# https://stackoverflow.com/questions/71356491/python3-on-mac-having-trouble-loading-libssh2
run: TERM=xterm DYLD_LIBRARY_PATH=/usr/local/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
# from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this -- note
# that if brew macos packages get updated on runners this may break again :)
run: TERM=xterm DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/libssh2/1.11.0_1/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ black>=23.3.0,<25.0.0
darglint>=1.8.1,<2.0.0
isort>=5.10.1,<6.0.0
mypy>=1.4.1,<2.0.0
nox==2024.3.2
nox==2024.4.15
pycodestyle>=2.8.0,<3.0.0
pydocstyle>=6.1.1,<7.0.0
pyfakefs>=5.4.1,<6.0.0
Expand Down

0 comments on commit 7785e7d

Please sign in to comment.