BitBake Build #28
This file contains 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
# /******************************************************************************** | |
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | |
# * | |
# * See the NOTICE file(s) distributed with this work for additional | |
# * information regarding copyright ownership. | |
# * | |
# * This program and the accompanying materials are made available under the | |
# * terms of the Apache License 2.0 which is available at | |
# * https://www.apache.org/licenses/LICENSE-2.0 | |
# * | |
# * SPDX-License-Identifier: Apache-2.0 | |
# ********************************************************************************/ | |
# | |
# To run on Eclipse managed GitHub Runner, set to run on self-hosted and add a container name to the job: | |
# runs-on: self-hosted | |
# container: debian:bullseye | |
# | |
name: BitBake Build | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
leda-qemux86_64: | |
name: "qemux86_64" | |
# Eclipse Foundation: Label for large GitHub Build runners (paid) | |
# See Eclipse HelpDesk #1915 | |
runs-on: "LargeRunner_16cores_64GB_600GB" | |
# runs-on: ubuntu-22.04 | |
# runs-on: self-hosted | |
# container: debian:bullseye | |
continue-on-error: true | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
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 | |
- name: Install kas | |
run: sudo pip3 install kas | |
- name: Cache SState | |
id: cache-sstate | |
uses: pat-s/[email protected] | |
with: | |
path: build/sstate-cache | |
key: bb-sstate-cache-qemux86-64 | |
- name: Build sdv-image-all | |
env: | |
KAS_MACHINE: qemux86-64 | |
run: | | |
(r=3;while ! kas build kas/leda-qemux86-64.yaml:kas/mirrors.yaml:kas/oss-compliance/spdx.yaml ; do ((--r))||exit;sleep 60;done) | |
- name: Generate CHANGELOG.md | |
run: | | |
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 }} | |
- name: Package all files | |
run: | | |
export ARC=eclipse-leda-qemu-x86_64.tar | |
rm -f ${ARC}.xz | |
time tar --create --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . | |
time tar --create --verbose --file ${ARC} -C ./resources/runners/qemux86_64/ \ | |
run-leda.sh \ | |
run-leda.cmd \ | |
readme.txt | |
time tar --append --verbose --file ${ARC} -C scripts/ \ | |
provision-device.sh | |
time tar --append --verbose --file ${ARC} -C ./ \ | |
LICENSE \ | |
NOTICE.md \ | |
CHANGELOG.md \ | |
README.md \ | |
3rdparty-licenses.tar.gz \ | |
examples | |
time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/qemux86-64/ \ | |
bzImage-qemux86-64.bin \ | |
sdv-image-all-qemux86-64.wic.qcow2 \ | |
sdv-rauc-bundle-full-qemux86-64.raucb \ | |
sdv-rauc-bundle-minimal-qemux86-64.raucb \ | |
sdv-rauc-bundle-rescue-qemux86-64.raucb \ | |
ovmf.qcow2 | |
time xz -v -8 -T0 ${ARC} | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-qemu-x86_64.tar.xz | |
if-no-files-found: error | |
path: eclipse-leda-qemu-x86_64.tar.xz | |
- name: Package SPDX files | |
run: | | |
tar --create --gzip --file eclipse-leda-sbom-qemux86_64.tar.gz -C ./build/tmp/deploy/spdx/qemux86-64/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sbom-qemux86_64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sbom-qemux86_64.tar.gz | |
- name: Package Patched Sources | |
run: | | |
tar --create --gzip --file eclipse-leda-sources-qemux86_64.tar.gz -C ./build/tmp/deploy/sources/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sources-qemux86_64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sources-qemux86_64.tar.gz | |
- uses: bacongobbler/[email protected] | |
if: github.repository_owner == 'SoftwareDefinedVehicle' | |
with: | |
source_dir: 'build/sstate-cache/' | |
extra_args: '--destination-path sstate-cache/' | |
container_name: 'yocto-sstate-cache' | |
overwrite: 'true' | |
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | |
leda-qemuarm64: | |
name: "qemuarm64" | |
needs: leda-qemux86_64 | |
runs-on: ubuntu-22.04 | |
# runs-on: self-hosted | |
# container: debian:bullseye | |
continue-on-error: true | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
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 | |
- name: Install kas | |
run: sudo pip3 install kas | |
- name: Cache SState | |
id: cache-sstate | |
uses: pat-s/[email protected] | |
with: | |
path: build/sstate-cache | |
key: bb-sstate-cache-qemuarm64 | |
- name: Build sdv-image-all | |
env: | |
KAS_MACHINE: qemuarm64 | |
run: | | |
(r=3;while ! kas build kas/leda-qemuarm64.yaml:kas/mirrors.yaml:kas/oss-compliance/spdx.yaml -- --setscene-only; do ((--r))||exit;sleep 60;done) | |
(r=3;while ! kas build kas/leda-qemuarm64.yaml:kas/mirrors.yaml:kas/oss-compliance/spdx.yaml ; do ((--r))||exit;sleep 60;done) | |
- name: Generate CHANGELOG.md | |
run: | | |
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 }} | |
- name: Package all files | |
run: | | |
export ARC=eclipse-leda-qemu-arm64.tar | |
rm -f ${ARC}.xz | |
time tar --create --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . | |
time tar --create --verbose --file ${ARC} -C ./resources/runners/qemuarm64/ \ | |
run-leda.sh \ | |
run-leda.cmd \ | |
readme.txt | |
time tar --append --verbose --file ${ARC} -C scripts/ \ | |
provision-device.sh | |
time tar --append --verbose --file ${ARC} -C ./ \ | |
LICENSE \ | |
NOTICE.md \ | |
CHANGELOG.md \ | |
README.md \ | |
3rdparty-licenses.tar.gz \ | |
examples | |
time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/qemuarm64/ \ | |
Image-qemuarm64.bin \ | |
sdv-image-all-qemuarm64.wic.qcow2 \ | |
sdv-rauc-bundle-full-qemuarm64.raucb \ | |
sdv-rauc-bundle-minimal-qemuarm64.raucb \ | |
sdv-rauc-bundle-rescue-qemuarm64.raucb \ | |
u-boot.bin | |
time xz -v -8 -T0 ${ARC} | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-qemu-arm64.tar.xz | |
if-no-files-found: error | |
path: eclipse-leda-qemu-arm64.tar.xz | |
- name: Package SPDX files | |
run: | | |
tar --create --gzip --file eclipse-leda-sbom-qemuarm64.tar.gz -C ./build/tmp/deploy/spdx/qemuarm64/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sbom-qemuarm64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sbom-qemuarm64.tar.gz | |
- name: Package Patched Sources | |
run: | | |
tar --create --gzip --file eclipse-leda-sources-qemuarm64.tar.gz -C ./build/tmp/deploy/sources/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sources-qemuarm64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sources-qemuarm64.tar.gz | |
- uses: bacongobbler/[email protected] | |
if: github.repository_owner == 'SoftwareDefinedVehicle' | |
with: | |
source_dir: 'build/sstate-cache/' | |
extra_args: '--destination-path sstate-cache/' | |
container_name: 'yocto-sstate-cache' | |
overwrite: 'true' | |
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | |
leda-raspberrypi4-64: | |
name: "raspberrypi4-64" | |
runs-on: ubuntu-22.04 | |
needs: leda-qemuarm64 | |
# runs-on: self-hosted | |
# container: debian:bullseye | |
continue-on-error: true | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
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 | |
- name: Install kas | |
run: sudo pip3 install kas | |
- name: Cache SState | |
id: cache-sstate | |
uses: pat-s/[email protected] | |
with: | |
path: build/sstate-cache | |
key: bb-sstate-cache-raspberrypi4-64 | |
- name: Build sdv-image-all | |
env: | |
KAS_MACHINE: raspberrypi4-64 | |
run: | | |
(r=3;while ! kas build kas/leda-raspberrypi4-64.yaml:kas/mirrors.yaml:kas/oss-compliance/spdx.yaml ; do ((--r))||exit;sleep 60;done) | |
- name: Generate CHANGELOG.md | |
run: | | |
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 }} | |
- name: Package all files | |
run: | | |
export ARC=eclipse-leda-raspberrypi.tar | |
rm -f ${ARC}.xz | |
time tar --create --verbose --gzip --file 3rdparty-licenses.tar.gz -C ./build/tmp/deploy/licenses/ . | |
time tar --create --verbose --file ${ARC} -C resources/runners/raspberrypi4/ \ | |
readme.txt | |
time tar --append --verbose --file ${ARC} -C ./ \ | |
LICENSE \ | |
NOTICE.md \ | |
CHANGELOG.md \ | |
README.md \ | |
3rdparty-licenses.tar.gz \ | |
examples | |
time tar --append --verbose --dereference --file ${ARC} -C ./build/tmp/deploy/images/raspberrypi4-64/ \ | |
Image-raspberrypi4-64.bin \ | |
sdv-image-all-raspberrypi4-64.wic.bz2 \ | |
sdv-image-all-raspberrypi4-64.wic.bmap \ | |
sdv-rauc-bundle-full-raspberrypi4-64.raucb \ | |
sdv-rauc-bundle-minimal-raspberrypi4-64.raucb \ | |
sdv-rauc-bundle-rescue-raspberrypi4-64.raucb | |
time xz -v -1 -T0 ${ARC} | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-raspberrypi.tar.xz | |
if-no-files-found: error | |
path: eclipse-leda-raspberrypi.tar.xz | |
- name: Package SPDX files | |
run: | | |
tar --create --gzip --file eclipse-leda-sbom-raspberrypi4-64.tar.gz -C ./build/tmp/deploy/spdx/raspberrypi4-64/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sbom-raspberrypi4-64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sbom-raspberrypi4-64.tar.gz | |
- name: Package Patched Sources | |
run: | | |
tar --create --gzip --file eclipse-leda-sources-raspberrypi4-64.tar.gz -C ./build/tmp/deploy/sources/ . | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eclipse-leda-sources-raspberrypi4-64.tar.gz | |
if-no-files-found: error | |
path: eclipse-leda-sources-raspberrypi4-64.tar.gz | |
- uses: bacongobbler/[email protected] | |
if: github.repository_owner == 'SoftwareDefinedVehicle' | |
with: | |
source_dir: 'build/sstate-cache/' | |
extra_args: '--destination-path sstate-cache/' | |
container_name: 'yocto-sstate-cache' | |
overwrite: 'true' | |
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} |