]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Enable aarch64 Ubuntu CI jobs (#125786)
authorŁukasz Langa <lukasz@langa.pl>
Fri, 22 Nov 2024 17:29:18 +0000 (18:29 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 17:29:18 +0000 (18:29 +0100)
This change enables custom GHA runners for Ubuntu-24.04 that run on Arm hardware. It also prepares for Windows runners on Arm hardware, but doesn't enable that just yet, because the Arm GHA runner images for Windows need to be updated.

.github/actionlint.yaml [new file with mode: 0644]
.github/workflows/build.yml
.github/workflows/reusable-ubuntu.yml
.github/workflows/reusable-windows.yml
.pre-commit-config.yaml

diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
new file mode 100644 (file)
index 0000000..3701f72
--- /dev/null
@@ -0,0 +1,10 @@
+self-hosted-runner:
+  labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
+
+config-variables: null
+
+paths:
+  .github/workflows/**/*.yml:
+     ignore:
+     - 1st argument of function call is not assignable
+     - SC2(015|038|086|091|097|098|129|155)
\ No newline at end of file
index 1f2204d3f2c6febf8e697b72617179fd3eb5dd45..b3c4f179b513a4e4cebe825bae21c364e02cb33f 100644 (file)
@@ -150,16 +150,28 @@ jobs:
     needs: check_source
     if: fromJSON(needs.check_source.outputs.run_tests)
     strategy:
+      fail-fast: false
       matrix:
+        os:
+          - windows-latest
         arch:
-        - Win32
-        - x64
-        - arm64
+          - x64
         free-threading:
-        - false
-        - true
+          - false
+          - true
+        include:
+          - os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
+            arch: arm64
+            free-threading: false
+          - os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
+            arch: arm64
+            free-threading: true
+          - os: windows-latest
+            arch: Win32
+            free-threading: false
     uses: ./.github/workflows/reusable-windows.yml
     with:
+      os: ${{ matrix.os }}
       arch: ${{ matrix.arch }}
       free-threading: ${{ matrix.free-threading }}
 
index ec39025504efd128e5a05bd7ef35612451862e94..642354f8b4f61b89a33071187c698ed0983325d5 100644 (file)
@@ -20,7 +20,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-24.04]
+        os: [ubuntu-24.04, ubuntu-24.04-aarch64]
     env:
       FORCE_COLOR: 1
       OPENSSL_VER: 3.0.15
@@ -82,11 +82,11 @@ jobs:
     - name: Build CPython out-of-tree
       if: ${{ inputs.free-threading }}
       working-directory: ${{ env.CPYTHON_BUILDDIR }}
-      run: make -j4
+      run: make -j
     - name: Build CPython out-of-tree (for compiler warning check)
       if: ${{ !inputs.free-threading}}
       working-directory: ${{ env.CPYTHON_BUILDDIR }}
-      run: set -o pipefail; make -j4 --output-sync 2>&1 | tee compiler_output_ubuntu.txt
+      run: set -o pipefail; make -j --output-sync 2>&1 | tee compiler_output_ubuntu.txt
     - name: Display build info
       working-directory: ${{ env.CPYTHON_BUILDDIR }}
       run: make pythoninfo
index dcfc62d7f5d1456d3289b92f4291cd5e9860714e..12b68d68466d62e7fb970ff312ab14ab84b065e6 100644 (file)
@@ -3,6 +3,10 @@ name: Reusable Windows
 on:
   workflow_call:
     inputs:
+      os:
+        description: OS to run on
+        required: true
+        type: string
       arch:
         description: CPU architecture
         required: true
@@ -19,10 +23,8 @@ env:
 
 jobs:
   build:
-    name: >-
-      build${{ inputs.arch != 'arm64' && ' and test' || '' }}
-      (${{ inputs.arch }})
-    runs-on: windows-latest
+    name: 'build and test (${{ inputs.arch }})'
+    runs-on: ${{ inputs.os }}
     timeout-minutes: 60
     steps:
     - uses: actions/checkout@v4
@@ -31,17 +33,17 @@ jobs:
       run: echo "::add-matcher::.github/problem-matchers/msvc.json"
     - name: Build CPython
       run: >-
-        .\PCbuild\build.bat
+        .\\PCbuild\\build.bat
         -e -d -v
         -p ${{ inputs.arch }}
         ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
-    - name: Display build info
+    - name: Display build info  # FIXME(diegorusso): remove the `if`
       if: inputs.arch != 'arm64'
-      run: .\python.bat -m test.pythoninfo
-    - name: Tests
+      run: .\\python.bat -m test.pythoninfo
+    - name: Tests  # FIXME(diegorusso): remove the `if`
       if: inputs.arch != 'arm64'
       run: >-
-        .\PCbuild\rt.bat
+        .\\PCbuild\\rt.bat
         -p ${{ inputs.arch }}
         -d -q --fast-ci
         ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
index ec769d7ff70314c7a97a72d0f6c50fa7b93e7fea..ccaf2390d99fae45d344cedeea0c5efe6d0780e7 100644 (file)
@@ -57,13 +57,9 @@ repos:
       - id: check-github-workflows
 
   - repo: https://github.com/rhysd/actionlint
-    rev: v1.7.3
+    rev: v1.7.4
     hooks:
       - id: actionlint
-        args: [
-          -ignore=1st argument of function call is not assignable,
-          -ignore=SC2(015|038|086|091|097|098|129|155),
-        ]
 
   - repo: https://github.com/sphinx-contrib/sphinx-lint
     rev: v1.0.0