From 18be09f1d70f85008684a259a2b9e1ea1bcf6d61 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 3 Nov 2022 14:40:14 +0000 Subject: [PATCH] CI: Pin Python to 3.10 Python 3.11 removes support for opening files in 'universal newline' mode (e.g. 'rU'), however older versions of node-gyp such as v6 still use it. --- .github/workflows/ci-darwin-arm64v8.yml | 6 +++++- .github/workflows/ci.yml | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-darwin-arm64v8.yml b/.github/workflows/ci-darwin-arm64v8.yml index 3b0ba56c4..357a4c3bc 100644 --- a/.github/workflows/ci-darwin-arm64v8.yml +++ b/.github/workflows/ci-darwin-arm64v8.yml @@ -22,7 +22,11 @@ jobs: run: shell: /usr/bin/arch -arch arm64e /bin/bash -l {0} steps: - - name: Dependencies + - name: Dependencies (Python 3.10) + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Dependencies (Node.js) uses: actions/setup-node@v3 with: node-version: ${{ matrix.nodejs_version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index beb1fbcaa..a946a4490 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,22 +62,26 @@ jobs: nodejs_version: 18 nodejs_arch: x64 steps: + - name: Dependencies (Python 3.10) + uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Dependencies (Linux glibc) if: contains(matrix.container, 'centos') run: | curl -sL https://rpm.nodesource.com/setup_${{ matrix.nodejs_version }}.x | bash - yum install -y centos-release-scl - yum install -y devtoolset-11-gcc-c++ make git python3 nodejs fontconfig google-noto-sans-fonts + yum install -y devtoolset-11-gcc-c++ make git nodejs fontconfig google-noto-sans-fonts echo "/opt/rh/devtoolset-11/root/usr/bin" >> $GITHUB_PATH - name: Dependencies (Rocky Linux glibc) if: contains(matrix.container, 'rockylinux') run: | curl -sL https://rpm.nodesource.com/setup_${{ matrix.nodejs_version }}.x | bash - - dnf install -y gcc-toolset-11-gcc-c++ make git python3 nodejs fontconfig google-noto-sans-fonts + dnf install -y gcc-toolset-11-gcc-c++ make git nodejs fontconfig google-noto-sans-fonts echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH - name: Dependencies (Linux musl) if: contains(matrix.container, 'alpine') - run: apk add build-base git python3 font-noto --update-cache + run: apk add build-base git font-noto --update-cache - name: Dependencies (macOS, Windows) if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') uses: actions/setup-node@v3