|
| 1 | +name: powerpc/clang |
| 2 | + |
| 3 | +# Controls when the action will run. |
| 4 | +on: |
| 5 | + # This allows the build to be triggered manually via the github UI. |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | + push: |
| 9 | + # This triggers the build on a push to any branch |
| 10 | + branches: |
| 11 | + - '**' |
| 12 | + # As long as one of these paths matches |
| 13 | + paths: |
| 14 | + - '!tools/**' # ignore tools |
| 15 | + - '!samples/**' # ignore samples |
| 16 | + - '!Documentation/**' # ignore Documentation |
| 17 | + - '!arch/**' # ignore arch changes |
| 18 | + - 'arch/powerpc/**' # but not arch/powerpc |
| 19 | + - 'arch/Kconfig' # or common bits in arch |
| 20 | + - '**' # anything else triggers a build |
| 21 | + |
| 22 | +jobs: |
| 23 | + kernel: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + |
| 26 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + matrix: |
| 29 | + defconfig: [ppc64, corenet64_smp, pmac32, ppc40x, ppc44x, mpc885_ads] |
| 30 | + image: [fedora-40] |
| 31 | + subarch: [ppc64] |
| 32 | + include: |
| 33 | + - subarch: ppc64le |
| 34 | + defconfig: ppc64le |
| 35 | + image: fedora-40 |
| 36 | + |
| 37 | + env: |
| 38 | + CLANG: 1 |
| 39 | + LLVM_IAS: 0 |
| 40 | + ARCH: powerpc |
| 41 | + TARGET: kernel |
| 42 | + CCACHE: 1 |
| 43 | + SUBARCH: ${{ matrix.subarch }} |
| 44 | + IMAGE: ${{ matrix.image }} |
| 45 | + DEFCONFIG: ${{ matrix.defconfig }} |
| 46 | + MERGE_CONFIG: /linux/arch/powerpc/configs/disable-werror.config |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + |
| 51 | + - name: Register problem matchers |
| 52 | + run: | |
| 53 | + echo "::add-matcher::.github/problem-matchers/compiler-source.json" |
| 54 | + echo "::add-matcher::.github/problem-matchers/compiler-non-source.json" |
| 55 | +
|
| 56 | + - name: Load ccache |
| 57 | + uses: actions/cache@v4 |
| 58 | + with: |
| 59 | + path: ~/.ccache |
| 60 | + key: ${{ matrix.image }}-${{ matrix.subarch }}-${{ matrix.defconfig }} |
| 61 | + |
| 62 | + - name: Login to GitHub Container Registry |
| 63 | + uses: docker/login-action@v3 |
| 64 | + with: |
| 65 | + registry: ghcr.io |
| 66 | + username: ${{ github.actor }} |
| 67 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 68 | + |
| 69 | + - name: Build |
| 70 | + run: | |
| 71 | + mkdir -p ~/.ccache |
| 72 | + ./arch/powerpc/tools/ci-build.sh |
| 73 | +
|
| 74 | + - name: Archive artifacts |
| 75 | + uses: actions/upload-artifact@v4 |
| 76 | + with: |
| 77 | + name: ${{ matrix.defconfig }}-${{ matrix.image }} |
| 78 | + path: | |
| 79 | + ~/output/vmlinux |
| 80 | + ~/output/.config |
| 81 | + ~/output/System.map |
| 82 | + ~/output/modules.tar.bz2 |
| 83 | + ~/output/arch/powerpc/boot/zImage |
| 84 | + ~/output/arch/powerpc/boot/uImage |
0 commit comments