Skip to content

Commit 7c5a6f6

Browse files
Enable native AArch64 Ubuntu CI jobs (#127584)
Co-authored-by: Brandt Bucher <[email protected]>
1 parent e51da64 commit 7c5a6f6

File tree

4 files changed

+24
-117
lines changed

4 files changed

+24
-117
lines changed

.github/workflows/build.yml

+9
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,19 @@ jobs:
235235
free-threading:
236236
- false
237237
- true
238+
os:
239+
- ubuntu-24.04
240+
- ubuntu-24.04-aarch64
241+
is-fork: # only used for the exclusion trick
242+
- ${{ github.repository_owner != 'python' }}
243+
exclude:
244+
- os: ubuntu-24.04-aarch64
245+
is-fork: true
238246
uses: ./.github/workflows/reusable-ubuntu.yml
239247
with:
240248
config_hash: ${{ needs.check_source.outputs.config_hash }}
241249
free-threading: ${{ matrix.free-threading }}
250+
os: ${{ matrix.os }}
242251

243252
build_ubuntu_ssltests:
244253
name: 'Ubuntu SSL tests with OpenSSL'

.github/workflows/jit.yml

+7-24
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
@@ -78,10 +78,11 @@ jobs:
7878
runner: macos-14
7979
- target: x86_64-unknown-linux-gnu/gcc
8080
architecture: x86_64
81-
runner: ubuntu-22.04
81+
runner: ubuntu-24.04
8282
- target: aarch64-unknown-linux-gnu/gcc
8383
architecture: aarch64
84-
runner: ubuntu-22.04
84+
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
85+
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
8586
steps:
8687
- uses: actions/checkout@v4
8788
- uses: actions/setup-python@v5
@@ -118,37 +119,19 @@ jobs:
118119
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
119120
120121
- name: Native Linux
121-
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
122+
# Forks don't have access to our paid AArch64 runners. Skip those:
123+
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
122124
run: |
123125
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
124126
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
125127
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
126128
make all --jobs 4
127129
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128130
129-
- name: Emulated Linux
130-
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
131-
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
132-
run: |
133-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
134-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
135-
./configure --prefix="$(pwd)/../build"
136-
make install --jobs 4
137-
make clean --jobs 4
138-
export HOST=${{ matrix.architecture }}-linux-gnu
139-
sudo apt install --yes "gcc-$HOST" qemu-user
140-
export QEMU_LD_PREFIX="/usr/$HOST"
141-
CC="$HOST-gcc" \
142-
CPP="$HOST-gcc --preprocess" \
143-
HOSTRUNNER=qemu-${{ matrix.architecture }} \
144-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
145-
make all --jobs 4
146-
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
147-
148131
jit-with-disabled-gil:
149132
name: Free-Threaded (Debug)
150133
needs: interpreter
151-
runs-on: ubuntu-22.04
134+
runs-on: ubuntu-24.04
152135
strategy:
153136
matrix:
154137
llvm:

.github/workflows/reusable-ubuntu.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ on:
1111
required: false
1212
type: boolean
1313
default: false
14+
os:
15+
description: OS to run the job
16+
required: true
17+
type: string
1418

1519
jobs:
1620
build_ubuntu_reusable:
17-
name: 'build and test'
21+
name: build and test (${{ inputs.os }})
1822
timeout-minutes: 60
19-
runs-on: ${{ matrix.os }}
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
os: [ubuntu-24.04, ubuntu-24.04-aarch64]
23+
runs-on: ${{ inputs.os }}
2424
env:
2525
FORCE_COLOR: 1
2626
OPENSSL_VER: 3.0.15
@@ -42,7 +42,7 @@ jobs:
4242
uses: actions/cache@v4
4343
with:
4444
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
45-
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
45+
key: ${{ inputs.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
4646
- name: Install OpenSSL
4747
if: steps.cache-openssl.outputs.cache-hit != 'true'
4848
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
@@ -84,7 +84,7 @@ jobs:
8484
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8585
run: make -j
8686
- name: Build CPython out-of-tree (for compiler warning check)
87-
if: ${{ !inputs.free-threading}}
87+
if: ${{ !inputs.free-threading }}
8888
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8989
run: set -o pipefail; make -j --output-sync 2>&1 | tee compiler_output_ubuntu.txt
9090
- name: Display build info

Tools/jit/ignore-tests-emulated-linux.txt

-85
This file was deleted.

0 commit comments

Comments
 (0)