Repository navigation
numba_linux-aarch64_wheel_builder #386
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: numba_linux-aarch64_wheel_builder | |
| on: | |
| schedule: | |
| - cron: '20 7 * * 6' # Saturday 7:20 AM UTC - linux-aarch64 wheel | |
| pull_request: | |
| paths: | |
| - .github/workflows/numba_linux-aarch64_wheel_builder.yml | |
| - buildscripts/github/evaluate.py | |
| - buildscripts/github/build_wheel_linux.sh | |
| - buildscripts/github/repair_wheel_linux.sh | |
| - buildscripts/github/test_wheel_contents.py | |
| - setup.py | |
| workflow_dispatch: | |
| inputs: | |
| llvmlite_wheel_runid: | |
| description: 'llvmlite wheel workflow run ID (optional)' | |
| required: false | |
| type: string | |
| # Add concurrency control | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| ARTIFACT_RETENTION_DAYS: 7 | |
| WHEELS_INDEX_URL: https://pypi.anaconda.org/numba/label/dev/simple | |
| CONDA_CHANNEL_NUMBA: numba/label/dev | |
| MANYLINUX_IMAGE: "manylinux_2_28_aarch64:2026.08.08-1" | |
| # dump Python tracebacks of all threads on fatal signals (segfaults) | |
| PYTHONFAULTHANDLER: "1" | |
| jobs: | |
| load-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| build-matrix-json: ${{ steps.load_matrix_json.outputs.build-matrix-json }} | |
| test-matrix-json: ${{ steps.load_matrix_json.outputs.test-matrix-json }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| - id: load_matrix_json | |
| name: Load Workflow Matrix JSON | |
| env: | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }} | |
| GITHUB_PLATFORM: linux-aarch64 | |
| GITHUB_PKG_TYPE: wheel | |
| run: | | |
| python buildscripts/github/evaluate.py | |
| linux-aarch64-build: | |
| name: linux-aarch64-build-wheel (py ${{ matrix.python_version_full }}, np ${{ matrix.numpy_build }}) | |
| needs: load-matrix | |
| runs-on: ubuntu-26.04-arm | |
| defaults: | |
| run: | |
| shell: bash -elx {0} | |
| strategy: | |
| matrix: | |
| include: ${{ fromJson(needs.load-matrix.outputs.build-matrix-json) }} | |
| fail-fast: false | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download llvmlite wheel | |
| if: inputs.llvmlite_wheel_runid != '' | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: llvmlite-linux-aarch64-py${{ matrix.python_major_minor }} | |
| path: llvmlite_wheels | |
| run-id: ${{ inputs.llvmlite_wheel_runid }} | |
| repository: numba/llvmlite | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build wheel in manylinux docker container | |
| run: | | |
| # Construct the expected Python executable path inside the container | |
| # For free-threaded builds (e.g. cp314t), the manylinux path is cp314-cp314t | |
| TAG="${{ matrix.python_tag }}" | |
| VER_TAG="${TAG%t}" | |
| PYTHON_EXECUTABLE="/opt/python/${VER_TAG}-${TAG}/bin/python" | |
| echo "Using Python executable: $PYTHON_EXECUTABLE" | |
| # Prepare build environment | |
| mkdir -p dist wheelhouse | |
| # Run the build script inside Docker container | |
| docker run --rm \ | |
| -v ${{ github.workspace }}:/io \ | |
| quay.io/pypa/${{ env.MANYLINUX_IMAGE }} \ | |
| bash /io/buildscripts/github/build_wheel_linux.sh \ | |
| "${PYTHON_EXECUTABLE}" \ | |
| "false" \ | |
| "${{ matrix.numpy_build }}" \ | |
| "/io/llvmlite_wheels" \ | |
| "${WHEELS_INDEX_URL}" | |
| # List built wheels | |
| ls -la wheelhouse/ | |
| - name: Repair and patch wheel in manylinux docker container | |
| run: | | |
| # Construct the expected Python executable path inside the container | |
| # For free-threaded builds (e.g. cp314t), the manylinux path is cp314-cp314t | |
| TAG="${{ matrix.python_tag }}" | |
| VER_TAG="${TAG%t}" | |
| PYTHON_EXECUTABLE="/opt/python/${VER_TAG}-${TAG}/bin/python" | |
| echo "Using Python executable: $PYTHON_EXECUTABLE" | |
| # Run the repair script in Docker | |
| docker run --rm \ | |
| -v ${{ github.workspace }}:/io \ | |
| quay.io/pypa/${{ env.MANYLINUX_IMAGE }} \ | |
| bash /io/buildscripts/github/repair_wheel_linux.sh \ | |
| "${PYTHON_EXECUTABLE}" \ | |
| "false" \ | |
| "/io/wheelhouse" | |
| # List repaired wheels | |
| ls -la wheelhouse/ | |
| - name: Upload numba wheel | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: numba_linux-aarch64_wheel_py${{ matrix.python_major_minor }} | |
| path: wheelhouse/*.whl | |
| compression-level: 0 | |
| retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }} | |
| if-no-files-found: error | |
| linux-aarch64-test: | |
| name: linux-aarch64-test (py ${{ matrix.python_version_full }}, np ${{ matrix.numpy_test }}) | |
| needs: [load-matrix, linux-aarch64-build] | |
| runs-on: ubuntu-26.04-arm | |
| defaults: | |
| run: | |
| shell: bash -elx {0} | |
| strategy: | |
| matrix: | |
| include: ${{ fromJson(needs.load-matrix.outputs.test-matrix-json) }} | |
| fail-fast: false | |
| steps: | |
| - name: Setup Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.python_version_full }} | |
| allow-prereleases: true | |
| - name: Download Numba wheel artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: numba_linux-aarch64_wheel_py${{ matrix.python_major_minor }} | |
| path: dist | |
| - name: Download llvmlite wheel | |
| if: inputs.llvmlite_wheel_runid != '' | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: llvmlite-linux-aarch64-py${{ matrix.python_major_minor }} | |
| path: llvmlite_wheels | |
| run-id: ${{ inputs.llvmlite_wheel_runid }} | |
| repository: numba/llvmlite | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install catchsegv | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y glibc-tools | |
| # verify catchsegv is installed | |
| catchsegv --version | |
| - name: Validate and test wheel | |
| run: | | |
| # Pin to the setup-python interpreter: a login shell (bash -el) can | |
| # re-source profiles and reorder PATH, so bare `python` is unreliable. | |
| PYTHON_PATH=$(which python${{ matrix.python_major_minor }}) | |
| $PYTHON_PATH -m pip install --upgrade pip twine | |
| ls -l dist | |
| if [ "${{ inputs.llvmlite_wheel_runid }}" != "" ]; then | |
| $PYTHON_PATH -m pip install --no-cache-dir llvmlite_wheels/*.whl | |
| else | |
| $PYTHON_PATH -m pip install --no-cache-dir --pre -i $WHEELS_INDEX_URL llvmlite | |
| fi | |
| $PYTHON_PATH -m twine check dist/*.whl | |
| $PYTHON_PATH -m pip install dist/numba*.whl numpy==${{ matrix.numpy_test }} "setuptools>=69.0.0" | |
| # print Numba system information | |
| $PYTHON_PATH -m numba -s | |
| # run tests under catchsegv to obtain native backtraces on segfault | |
| catchsegv $PYTHON_PATH -m numba.runtests -m 4 -v |