|
| 1 | +# Copyright (c) 2025, Arm Limited and affiliates. |
| 2 | +# Part of the Arm Toolchain project, under the Apache License v2.0 with LLVM Exceptions. |
| 3 | +# See https://llvm.org/LICENSE.txt for license information. |
| 4 | +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 5 | + |
| 6 | +# This workflow runs all build scripts in parallel on Linux. |
| 7 | +# It is intended to be triggered as part of a **nightly build** to |
| 8 | +# validate all build configurations and test them automatically. |
| 9 | +# |
| 10 | +# Each build script is paired with a corresponding test script using |
| 11 | +# a matrix strategy. Each build+test pair runs as a separate job, |
| 12 | +# allowing for concurrency and clear traceability of failures. |
| 13 | + |
| 14 | +name: ATfE Nightly Build and Test |
| 15 | + |
| 16 | +on: |
| 17 | + workflow_dispatch: |
| 18 | + schedule: |
| 19 | + - cron: '0 2 * * *' # Every day at 02:00 UTC |
| 20 | + |
| 21 | +jobs: |
| 22 | + build-and-test-toolchain: |
| 23 | + name: Build ${{ matrix.build_script }} + Test ${{ matrix.test_script }} on ${{ matrix.runner }} |
| 24 | + runs-on: ${{ matrix.runner }} |
| 25 | + # Ensure the workflow only runs on the arm-toolchain repository and not on forks |
| 26 | + if: github.repository == 'arm/arm-toolchain' |
| 27 | + |
| 28 | + strategy: |
| 29 | + fail-fast: false # Prevents one job failure from cancelling all |
| 30 | + matrix: |
| 31 | + include: |
| 32 | + - build_script: build.sh |
| 33 | + test_script: test.sh |
| 34 | + runner: ah-ubuntu_22_04-c7g_8x-100 |
| 35 | + - build_script: build_llvmlibc_overlay.sh |
| 36 | + test_script: '' |
| 37 | + runner: ah-ubuntu_22_04-c7g_8x-100 |
| 38 | + - build_script: build_newlib_nano_overlay.sh |
| 39 | + test_script: '' |
| 40 | + runner: ah-ubuntu_22_04-c7g_8x-100 |
| 41 | + - build_script: build_newlib_overlay.sh |
| 42 | + test_script: '' |
| 43 | + runner: ah-ubuntu_22_04-c7g_8x-100 |
| 44 | + |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@v4 |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + run: bash ./arm-software/embedded/scripts/install_dependencies.sh |
| 51 | + |
| 52 | + - name: Add ~/.local/bin to PATH |
| 53 | + run: echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 54 | + |
| 55 | + - name: Apply llvm-project patches |
| 56 | + run: | |
| 57 | + python3 arm-software/embedded/cmake/patch_repo.py \ |
| 58 | + --method apply \ |
| 59 | + arm-software/embedded/patches/llvm-project |
| 60 | +
|
| 61 | + - name: Apply llvm-project-perf patches |
| 62 | + run: | |
| 63 | + python3 arm-software/embedded/cmake/patch_repo.py \ |
| 64 | + --method apply \ |
| 65 | + arm-software/embedded/patches/llvm-project-perf |
| 66 | +
|
| 67 | + - name: Build ${{ matrix.build_script }} |
| 68 | + run: bash ./arm-software/embedded/scripts/${{ matrix.build_script }} |
| 69 | + |
| 70 | + - name: Test ${{ matrix.test_script }} |
| 71 | + if: matrix.test_script != '' |
| 72 | + run: bash ./arm-software/embedded/scripts/${{ matrix.test_script }} |
| 73 | + |
| 74 | + - name: Upload test results |
| 75 | + uses: actions/upload-artifact@v4 |
| 76 | + if: always() |
| 77 | + with: |
| 78 | + name: test-results-${{ matrix.build_script }} |
| 79 | + path: build/**/*.junit.xml |
| 80 | + |
| 81 | + - name: Upload built packages |
| 82 | + uses: actions/upload-artifact@v4 |
| 83 | + if: success() |
| 84 | + with: |
| 85 | + name: ATfE-packages-${{ matrix.build_script }} |
| 86 | + path: build*/ATfE-*.tar.xz |
0 commit comments