|
| 1 | +# /******************************************************************************** |
| 2 | +# * Copyright (c) 2023 Contributors to the Eclipse Foundation |
| 3 | +# * |
| 4 | +# * See the NOTICE file(s) distributed with this work for additional |
| 5 | +# * information regarding copyright ownership. |
| 6 | +# * |
| 7 | +# * This program and the accompanying materials are made available under the |
| 8 | +# * terms of the Apache License 2.0 which is available at |
| 9 | +# * https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# * |
| 11 | +# * SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ********************************************************************************/ |
| 13 | +# |
| 14 | +# To run on Eclipse managed GitHub Runner, set to run on self-hosted and add a container name to the job: |
| 15 | +# runs-on: self-hosted |
| 16 | +# container: debian:bullseye |
| 17 | +# |
| 18 | +name: BitBake Build (Self-Hosted) |
| 19 | +on: |
| 20 | + workflow_dispatch: |
| 21 | + workflow_call: |
| 22 | + |
| 23 | +jobs: |
| 24 | + |
| 25 | + leda-qemux86_64: |
| 26 | + name: "qemux86_64" |
| 27 | + runs-on: self-hosted |
| 28 | + continue-on-error: true |
| 29 | + steps: |
| 30 | + - name: Checkout |
| 31 | + uses: actions/checkout@v3 |
| 32 | + - name: Install tools |
| 33 | + run: | |
| 34 | + sudo apt-get update |
| 35 | + sudo apt-get install -y --no-install-recommends socat file gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool tmux mc skopeo fdisk ruby-full jq libvirt-clients libvirt-daemon-system qemu-system-x86 qemu-system-arm qemu-kvm squashfs-tools rauc python3-newt ca-certificates curl gnupg lsb-release |
| 36 | + - name: Install kas |
| 37 | + run: sudo pip3 install kas |
| 38 | + - name: Cache SState |
| 39 | + id: cache-sstate |
| 40 | + |
| 41 | + with: |
| 42 | + path: build/sstate-cache |
| 43 | + key: bb-sstate-cache-qemux86-64 |
| 44 | + - name: Build sdv-image-all |
| 45 | + env: |
| 46 | + KAS_MACHINE: qemux86-64 |
| 47 | + run: | |
| 48 | + (r=3;while ! kas build kas/leda-qemux86-64.yaml:kas/mirrors.yaml ; do ((--r))||exit;sleep 60;done) |
| 49 | + - name: Generate CHANGELOG.md |
| 50 | + run: | |
| 51 | + docker run --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator github_changelog_generator -u eclipse-leda -p leda-distro --no-author -t ${{ secrets.GITHUB_TOKEN }} |
| 52 | + - name: Package all files |
| 53 | + run: | |
| 54 | + export ARC=eclipse-leda-qemu-x86_64.tar |
| 55 | + rm -f ${ARC}.xz |
| 56 | + time tar --create --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . |
| 57 | + time tar --create --verbose --file ${ARC} -C ./resources/runners/qemux86_64/ \ |
| 58 | + run-leda.sh \ |
| 59 | + run-leda.cmd \ |
| 60 | + readme.txt |
| 61 | + time tar --append --verbose --file ${ARC} -C scripts/ \ |
| 62 | + provision-device.sh |
| 63 | + time tar --append --verbose --file ${ARC} -C ./ \ |
| 64 | + LICENSE \ |
| 65 | + NOTICE.md \ |
| 66 | + CHANGELOG.md \ |
| 67 | + README.md \ |
| 68 | + 3rdparty-licenses.tar.gz \ |
| 69 | + examples |
| 70 | + time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/qemux86-64/ \ |
| 71 | + bzImage-qemux86-64.bin \ |
| 72 | + sdv-image-all-qemux86-64.wic.qcow2 \ |
| 73 | + sdv-rauc-bundle-qemux86-64.raucb \ |
| 74 | + ovmf.qcow2 |
| 75 | + time xz -v -8 -T0 ${ARC} |
| 76 | + - name: Upload files |
| 77 | + uses: actions/upload-artifact@v3 |
| 78 | + with: |
| 79 | + name: eclipse-leda-qemu-x86_64.tar.xz |
| 80 | + if-no-files-found: error |
| 81 | + path: eclipse-leda-qemu-x86_64.tar.xz |
| 82 | + - name: Package SPDX files |
| 83 | + run: | |
| 84 | + tar --create --gzip --file eclipse-leda-sbom-qemux86_64.tar.gz -C ./build/tmp/deploy/spdx/qemux86-64/ . |
| 85 | + - name: Upload files |
| 86 | + uses: actions/upload-artifact@v3 |
| 87 | + with: |
| 88 | + name: eclipse-leda-sbom-qemux86_64.tar.gz |
| 89 | + if-no-files-found: error |
| 90 | + path: eclipse-leda-sbom-qemux86_64.tar.gz |
| 91 | + - uses: bacongobbler/[email protected] |
| 92 | + if: github.repository_owner == 'SoftwareDefinedVehicle' |
| 93 | + with: |
| 94 | + source_dir: 'build/sstate-cache/' |
| 95 | + extra_args: '--destination-path sstate-cache/' |
| 96 | + container_name: 'yocto-sstate-cache' |
| 97 | + overwrite: 'true' |
| 98 | + connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} |
| 99 | + |
| 100 | + leda-qemuarm64: |
| 101 | + name: "qemuarm64" |
| 102 | + runs-on: self-hosted |
| 103 | + continue-on-error: true |
| 104 | + steps: |
| 105 | + - name: Checkout |
| 106 | + uses: actions/checkout@v3 |
| 107 | + - name: Install tools |
| 108 | + run: | |
| 109 | + sudo apt-get update |
| 110 | + sudo apt-get install -y --no-install-recommends socat file gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool tmux mc skopeo fdisk ruby-full jq libvirt-clients libvirt-daemon-system qemu-system-x86 qemu-system-arm qemu-kvm squashfs-tools rauc python3-newt ca-certificates curl gnupg lsb-release |
| 111 | + - name: Install kas |
| 112 | + run: sudo pip3 install kas |
| 113 | + - name: Cache SState |
| 114 | + id: cache-sstate |
| 115 | + |
| 116 | + with: |
| 117 | + path: build/sstate-cache |
| 118 | + key: bb-sstate-cache-qemuarm64 |
| 119 | + - name: Build sdv-image-all |
| 120 | + env: |
| 121 | + KAS_MACHINE: qemuarm64 |
| 122 | + run: | |
| 123 | + (r=3;while ! kas build kas/leda-qemuarm64.yaml:kas/mirrors.yaml ; do ((--r))||exit;sleep 60;done) |
| 124 | + - name: Generate CHANGELOG.md |
| 125 | + run: | |
| 126 | + docker run --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator github_changelog_generator -u eclipse-leda -p leda-distro --no-author -t ${{ secrets.GITHUB_TOKEN }} |
| 127 | + - name: Package all files |
| 128 | + run: | |
| 129 | + export ARC=eclipse-leda-qemu-arm64.tar |
| 130 | + rm -f ${ARC}.xz |
| 131 | + time tar --create --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . |
| 132 | + time tar --create --verbose --file ${ARC} -C ./resources/runners/qemuarm64/ \ |
| 133 | + run-leda.sh \ |
| 134 | + run-leda.cmd \ |
| 135 | + readme.txt |
| 136 | + time tar --append --verbose --file ${ARC} -C scripts/ \ |
| 137 | + provision-device.sh |
| 138 | + time tar --append --verbose --file ${ARC} -C ./ \ |
| 139 | + LICENSE \ |
| 140 | + NOTICE.md \ |
| 141 | + CHANGELOG.md \ |
| 142 | + README.md \ |
| 143 | + 3rdparty-licenses.tar.gz \ |
| 144 | + examples |
| 145 | + time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/qemuarm64/ \ |
| 146 | + Image-qemuarm64.bin \ |
| 147 | + sdv-image-all-qemuarm64.wic.qcow2 \ |
| 148 | + sdv-rauc-bundle-qemuarm64.raucb \ |
| 149 | + u-boot.bin |
| 150 | + time xz -v -8 -T0 ${ARC} |
| 151 | + - name: Upload files |
| 152 | + uses: actions/upload-artifact@v3 |
| 153 | + with: |
| 154 | + name: eclipse-leda-qemu-arm64.tar.xz |
| 155 | + if-no-files-found: error |
| 156 | + path: eclipse-leda-qemu-arm64.tar.xz |
| 157 | + - name: Package SPDX files |
| 158 | + run: | |
| 159 | + tar --create --gzip --file eclipse-leda-sbom-qemuarm64.tar.gz -C ./build/tmp/deploy/spdx/qemuarm64/ . |
| 160 | + - name: Upload files |
| 161 | + uses: actions/upload-artifact@v3 |
| 162 | + with: |
| 163 | + name: eclipse-leda-sbom-qemuarm64.tar.gz |
| 164 | + if-no-files-found: error |
| 165 | + path: eclipse-leda-sbom-qemuarm64.tar.gz |
| 166 | + - uses: bacongobbler/[email protected] |
| 167 | + if: github.repository_owner == 'SoftwareDefinedVehicle' |
| 168 | + with: |
| 169 | + source_dir: 'build/sstate-cache/' |
| 170 | + extra_args: '--destination-path sstate-cache/' |
| 171 | + container_name: 'yocto-sstate-cache' |
| 172 | + overwrite: 'true' |
| 173 | + connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} |
| 174 | + |
| 175 | + leda-raspberrypi4-64: |
| 176 | + name: "raspberrypi4-64" |
| 177 | + runs-on: self-hosted |
| 178 | + needs: leda-qemuarm64 |
| 179 | + continue-on-error: true |
| 180 | + steps: |
| 181 | + - name: Checkout |
| 182 | + uses: actions/checkout@v3 |
| 183 | + - name: Install tools |
| 184 | + run: sudo apt-get install -y --no-install-recommends socat file gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool tmux mc skopeo fdisk ruby-full jq libvirt-clients libvirt-daemon-system qemu-system-x86 qemu-system-arm qemu-kvm squashfs-tools rauc python3-newt ca-certificates curl gnupg lsb-release |
| 185 | + - name: Install kas |
| 186 | + run: sudo pip3 install kas |
| 187 | + - name: Cache SState |
| 188 | + id: cache-sstate |
| 189 | + |
| 190 | + with: |
| 191 | + path: build/sstate-cache |
| 192 | + key: bb-sstate-cache-raspberrypi4-64 |
| 193 | + - name: Build sdv-image-all |
| 194 | + env: |
| 195 | + KAS_MACHINE: raspberrypi4-64 |
| 196 | + run: | |
| 197 | + (r=3;while ! kas build kas/leda-raspberrypi4-64.yaml:kas/mirrors.yaml ; do ((--r))||exit;sleep 60;done) |
| 198 | + - name: Generate CHANGELOG.md |
| 199 | + run: | |
| 200 | + docker run --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator github_changelog_generator -u eclipse-leda -p leda-distro --no-author -t ${{ secrets.GITHUB_TOKEN }} |
| 201 | + - name: Package all files |
| 202 | + run: | |
| 203 | + export ARC=eclipse-leda-raspberrypi.tar |
| 204 | + rm -f ${ARC}.xz |
| 205 | + time tar --create --verbose --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . |
| 206 | + time tar --create --verbose --file ${ARC} -C resources/runners/raspberrypi4/ \ |
| 207 | + readme.txt |
| 208 | + time tar --append --verbose --file ${ARC} -C ./ \ |
| 209 | + LICENSE \ |
| 210 | + NOTICE.md \ |
| 211 | + CHANGELOG.md \ |
| 212 | + README.md \ |
| 213 | + 3rdparty-licenses.tar.gz \ |
| 214 | + examples |
| 215 | + time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/raspberrypi4-64/ \ |
| 216 | + Image-raspberrypi4-64.bin \ |
| 217 | + sdv-image-all-raspberrypi4-64.wic.bz2 \ |
| 218 | + sdv-image-all-raspberrypi4-64.wic.bmap \ |
| 219 | + sdv-rauc-bundle-raspberrypi4-64.raucb |
| 220 | + time xz -v -1 -T0 ${ARC} |
| 221 | + - name: Upload files |
| 222 | + uses: actions/upload-artifact@v3 |
| 223 | + with: |
| 224 | + name: eclipse-leda-raspberrypi.tar.xz |
| 225 | + if-no-files-found: error |
| 226 | + path: eclipse-leda-raspberrypi.tar.xz |
| 227 | + - name: Package SPDX files |
| 228 | + run: | |
| 229 | + tar --create --gzip --file eclipse-leda-sbom-raspberrypi4-64.tar.gz -C ./build/tmp/deploy/spdx/raspberrypi4-64/ . |
| 230 | + - name: Upload files |
| 231 | + uses: actions/upload-artifact@v3 |
| 232 | + with: |
| 233 | + name: eclipse-leda-sbom-raspberrypi4-64.tar.gz |
| 234 | + if-no-files-found: error |
| 235 | + path: eclipse-leda-sbom-raspberrypi4-64.tar.gz |
| 236 | + - uses: bacongobbler/[email protected] |
| 237 | + if: github.repository_owner == 'SoftwareDefinedVehicle' |
| 238 | + with: |
| 239 | + source_dir: 'build/sstate-cache/' |
| 240 | + extra_args: '--destination-path sstate-cache/' |
| 241 | + container_name: 'yocto-sstate-cache' |
| 242 | + overwrite: 'true' |
| 243 | + connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} |
0 commit comments