|
| 1 | +name: powerpc/kernel+qemu |
| 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 | + matrix: |
| 28 | + defconfig: [ppc64_defconfig, ppc40x_defconfig, mpc885_ads_defconfig] |
| 29 | + image: [fedora-34, korg-5.5.0] |
| 30 | + include: |
| 31 | + # ppc64le |
| 32 | + - defconfig: ppc64le_defconfig |
| 33 | + image: korg-5.5.0 |
| 34 | + subarch: ppc64le |
| 35 | + - defconfig: ppc64le_defconfig |
| 36 | + image: fedora-34 |
| 37 | + subarch: ppc64le |
| 38 | + |
| 39 | + # ppc64le_guest_defconfig |
| 40 | + - subarch: ppc64le |
| 41 | + defconfig: ppc64le_guest_defconfig |
| 42 | + image: fedora-34 |
| 43 | + - subarch: ppc64le |
| 44 | + defconfig: ppc64le_guest_defconfig |
| 45 | + image: korg-5.5.0 |
| 46 | + |
| 47 | + # ppc44x |
| 48 | + - defconfig: ppc44x_defconfig |
| 49 | + merge_config: /linux/arch/powerpc/configs/ppc44x-qemu.config |
| 50 | + image: fedora-34 |
| 51 | + - defconfig: ppc44x_defconfig |
| 52 | + merge_config: /linux/arch/powerpc/configs/ppc44x-qemu.config |
| 53 | + image: korg-5.5.0 |
| 54 | + |
| 55 | + # corenet64_smp |
| 56 | + - defconfig: corenet64_smp_defconfig |
| 57 | + merge_config: /linux/arch/powerpc/configs/ppc64e-qemu.config |
| 58 | + image: fedora-34 |
| 59 | + - defconfig: corenet64_smp_defconfig |
| 60 | + merge_config: /linux/arch/powerpc/configs/ppc64e-qemu.config |
| 61 | + image: korg-5.5.0 |
| 62 | + |
| 63 | + # g5 |
| 64 | + - defconfig: g5_defconfig |
| 65 | + merge_config: /linux/arch/powerpc/configs/g5-qemu.config |
| 66 | + image: fedora-34 |
| 67 | + - defconfig: g5_defconfig |
| 68 | + merge_config: /linux/arch/powerpc/configs/g5-qemu.config |
| 69 | + image: korg-5.5.0 |
| 70 | + |
| 71 | + # pmac32 |
| 72 | + - defconfig: pmac32_defconfig |
| 73 | + merge_config: /linux/arch/powerpc/configs/pmac32-qemu.config |
| 74 | + image: fedora-34 |
| 75 | + - defconfig: pmac32_defconfig |
| 76 | + merge_config: /linux/arch/powerpc/configs/pmac32-qemu.config |
| 77 | + image: korg-5.5.0 |
| 78 | + |
| 79 | + - defconfig: corenet32_smp_defconfig |
| 80 | + image: fedora-34 |
| 81 | + |
| 82 | + env: |
| 83 | + ARCH: powerpc |
| 84 | + TARGET: kernel |
| 85 | + SUBARCH: ${{ matrix.subarch }} |
| 86 | + IMAGE: ${{ matrix.image }} |
| 87 | + DEFCONFIG: ${{ matrix.defconfig }} |
| 88 | + MERGE_CONFIG: ${{ matrix.merge_config }} |
| 89 | + |
| 90 | + steps: |
| 91 | + - uses: actions/checkout@v2 |
| 92 | + |
| 93 | + - name: Register problem matchers |
| 94 | + run: | |
| 95 | + echo "::add-matcher::.github/problem-matchers/compiler-source.json" |
| 96 | + echo "::add-matcher::.github/problem-matchers/compiler-non-source.json" |
| 97 | +
|
| 98 | + - name: build |
| 99 | + run: ./arch/powerpc/tools/ci-build.sh |
| 100 | + |
| 101 | + - name: Archive artifacts |
| 102 | + uses: actions/upload-artifact@v2 |
| 103 | + with: |
| 104 | + name: ${{ matrix.defconfig }}-${{ matrix.image }} |
| 105 | + path: | |
| 106 | + ~/output/vmlinux |
| 107 | + ~/output/.config |
| 108 | + ~/output/System.map |
| 109 | + ~/output/modules.tar.bz2 |
| 110 | + ~/output/arch/powerpc/boot/zImage |
| 111 | + ~/output/arch/powerpc/boot/uImage |
| 112 | + ~/output/include/config/kernel.release |
| 113 | +
|
| 114 | + boot: |
| 115 | + runs-on: ubuntu-latest |
| 116 | + needs: kernel |
| 117 | + |
| 118 | + strategy: |
| 119 | + matrix: |
| 120 | + include: |
| 121 | + - defconfig: ppc64le_guest_defconfig |
| 122 | + machine: pseries+p8+tcg |
| 123 | + machine_2: pseries+p9+tcg |
| 124 | + packages: qemu-system-ppc64 |
| 125 | + rootfs: ppc64le-rootfs.cpio.gz |
| 126 | + old-image: korg-5.5.0 |
| 127 | + new-image: fedora-34 |
| 128 | + |
| 129 | + - defconfig: ppc44x_defconfig |
| 130 | + machine: 44x |
| 131 | + packages: qemu-system-ppc |
| 132 | + rootfs: ppc-rootfs.cpio.gz |
| 133 | + old-image: korg-5.5.0 |
| 134 | + new-image: fedora-34 |
| 135 | + |
| 136 | + - defconfig: corenet64_smp_defconfig |
| 137 | + machine: ppc64e |
| 138 | + machine_2: ppc64e+compat |
| 139 | + packages: qemu-system-ppc64 |
| 140 | + rootfs: ppc64-novsx-rootfs.cpio.gz ppc-rootfs.cpio.gz |
| 141 | + old-image: korg-5.5.0 |
| 142 | + new-image: fedora-34 |
| 143 | + |
| 144 | + - defconfig: g5_defconfig |
| 145 | + machine: g5 |
| 146 | + packages: qemu-system-ppc64 openbios-ppc |
| 147 | + rootfs: ppc64-rootfs.cpio.gz |
| 148 | + old-image: korg-5.5.0 |
| 149 | + new-image: fedora-34 |
| 150 | + |
| 151 | + - defconfig: pmac32_defconfig |
| 152 | + machine: mac99 |
| 153 | + packages: qemu-system-ppc openbios-ppc |
| 154 | + rootfs: ppc-rootfs.cpio.gz |
| 155 | + old-image: korg-5.5.0 |
| 156 | + new-image: fedora-34 |
| 157 | + |
| 158 | + steps: |
| 159 | + - uses: actions/checkout@v2 |
| 160 | + with: |
| 161 | + repository: linuxppc/ci-scripts |
| 162 | + |
| 163 | + - name: Download root disk |
| 164 | + run: make -C root-disks ${{ matrix.rootfs }} |
| 165 | + |
| 166 | + - name: Set root disk path |
| 167 | + run: echo "ROOT_DISK_PATH=$PWD/root-disks" >> $GITHUB_ENV |
| 168 | + |
| 169 | + - name: APT update |
| 170 | + run: sudo apt update |
| 171 | + |
| 172 | + - name: Install dependencies |
| 173 | + run: sudo apt install -y ${{ matrix.packages }} python3-pexpect python3-termcolor python3-yaml |
| 174 | + |
| 175 | + - uses: actions/download-artifact@v2 |
| 176 | + with: |
| 177 | + name: ${{ matrix.defconfig }}-${{ matrix.new-image }} |
| 178 | + |
| 179 | + - name: Run qemu-${{ matrix.machine }} with ${{ matrix.new-image }} build kernel |
| 180 | + run: ./scripts/boot/qemu-${{ matrix.machine }} |
| 181 | + |
| 182 | + - name: Run qemu-${{ matrix.machine_2 }} with ${{ matrix.new-image }} build kernel |
| 183 | + run: ./scripts/boot/qemu-${{ matrix.machine_2 }} |
| 184 | + if: matrix.machine_2 != '' |
| 185 | + |
| 186 | + - uses: actions/download-artifact@v2 |
| 187 | + with: |
| 188 | + name: ${{ matrix.defconfig }}-${{ matrix.old-image }} |
| 189 | + |
| 190 | + - name: Run qemu-${{ matrix.machine }} with ${{ matrix.old-image }} build kernel |
| 191 | + run: ./scripts/boot/qemu-${{ matrix.machine }} |
| 192 | + |
| 193 | + - name: Run qemu-${{ matrix.machine_2 }} with ${{ matrix.old-image }} build kernel |
| 194 | + run: ./scripts/boot/qemu-${{ matrix.machine_2 }} |
| 195 | + if: matrix.machine_2 != '' |
0 commit comments