Skip to content

Commit ecbd2cd

Browse files
authored
Port ARM Linux Cirrus fixes to updated-latest-electron (#1323)
* CI: Compile and install newer Python for ARM Linux Cirrus Need this for compatibility with recent gyp-next, from the node-gyp bump in the latest ppm bump for Pulsar core. That dependency bump improved our out-of-the-box support for Python 3.12+, relevant when building packages with native C/C++ addon modules while installing said packages with ppm, or the GUI package management interface in Pulsar settings (which also uses ppm under the hood anyway). We will cache the compiled Python in Cirrus's cache storage system, much like we cache compiled Python in GitHub Actions caches. Want to save time and datacenter power use/emissions and such. Known SHA256 hash of the Python source tarball is hardcoded and checked for safety/reliability. We can update that hash if we need to build a different Python version in the future. (cherry picked from commit b5da98a) * CI: Install Python setuptools on ARM Linux Cirrus We are using old Node in CI, which comes with old npm, which comes with old node-gyp. Yarn uses npm's (in this case, old) copy of node-gyp by default, so we still need to have Python setuptools installed for compatibility with old node-gyp x new Python (3.12+) in CI. Could do 'yarn global add node-gyp@10.2.0' instead, but this also works. (cherry picked from commit a32576c)
1 parent 1c5b6ca commit ecbd2cd

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.cirrus.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,35 @@ arm_linux_task:
8989
libnss3
9090
wget
9191
xvfb
92+
libncursesw5-dev
93+
libssl-dev
94+
libsqlite3-dev
95+
tk-dev
96+
libgdbm-dev
97+
libc6-dev
98+
libbz2-dev
99+
libffi-dev
100+
zlib1g-dev
92101
- gem install dotenv -v '~> 2.8'
93102
- gem install fpm
94103
- git submodule init
95104
- git submodule update
96105
- sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`-next/g" package.json
106+
python_fetch_and_build_cache:
107+
fingerprint_script: echo "${CIRRUS_OS}-$(uname -prsv)-Python-${PYTHON_VERSION}.9"
108+
folder: Python-${PYTHON_VERSION}.9
109+
populate_script:
110+
- wget "https://www.python.org/ftp/python/${PYTHON_VERSION}.9/Python-${PYTHON_VERSION}.9.tgz"
111+
- echo "45313e4c5f0e8acdec9580161d565cf5fea578e3eabf25df7cc6355bf4afa1ee Python-${PYTHON_VERSION}.9.tgz" | sha256sum --check
112+
- tar xzf "Python-${PYTHON_VERSION}.9.tgz"
113+
- cd "Python-${PYTHON_VERSION}.9"
114+
- ./configure --enable-optimizations
115+
- make
116+
upload_caches:
117+
- python_fetch_and_build
118+
install_python_script:
119+
- cd "Python-${PYTHON_VERSION}.9" && make install
120+
- python3 -m pip install setuptools
97121
install_script:
98122
- yarn install --ignore-engines || yarn install --ignore-engines
99123
build_script:

0 commit comments

Comments
 (0)