Skip to content

Commit 9e22e43

Browse files
authored
[3.7] Workarounds to allow GitHub Actions macOS CI tests to run for 3.7. (GH-104998)
Note that this is intended solely for the current GitHub Actions CI macOS environment, in particular, macOS 12 on Intel-64 only. Out of the box, 3.7.x does not fully support macOS 11 and later systems and does not fully support building or running on Apple Silicon Macs (which were first supported in macOS 11), all of which were released after 3.7 had reached the security-fix-only phase of its life cycle.
1 parent 7522ff7 commit 9e22e43

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/build.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,31 @@ jobs:
125125
runs-on: macos-latest
126126
needs: check_source
127127
if: needs.check_source.outputs.run_tests == 'true'
128+
env:
129+
HOMEBREW_NO_ANALYTICS: 1
130+
HOMEBREW_NO_AUTO_UPDATE: 1
131+
HOMEBREW_NO_INSTALL_CLEANUP: 1
128132
steps:
129133
- uses: actions/checkout@v2
130134
- name: Configure CPython
131-
run: SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev
135+
run: |
136+
brew install pkg-config [email protected] xz gdbm tcl-tk
137+
brew install zlib bzip2 ncurses readline sqlite
138+
SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk \
139+
CC=clang \
140+
CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include \
141+
-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include \
142+
-I$(brew --prefix ncurses)/include -I$(brew --prefix readline)/include \
143+
-I$(brew --prefix sqlite)/include" \
144+
LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib \
145+
-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib \
146+
-L$(brew --prefix ncurses)/lib -L$(brew --prefix readline)/lib \
147+
-L$(brew --prefix sqlite)/lib" \
148+
./configure --prefix=/opt/python-dev \
149+
--with-pydebug \
150+
--with-openssl="$(brew --prefix [email protected])" \
151+
--with-tcltk-libs="$(pkg-config --libs tk)" \
152+
--with-tcltk-includes="$(pkg-config --cflags tk)"
132153
- name: Build CPython
133154
run: make -j4
134155
- name: Display build info

0 commit comments

Comments
 (0)