Skip to content

Moved new Debian host image project from codelinaro to Cuttlefish github #16

Moved new Debian host image project from codelinaro to Cuttlefish github

Moved new Debian host image project from codelinaro to Cuttlefish github #16

Workflow file for this run

# This file is a template, and might need editing before it works on your project.
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
#
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
name: HostImage
on: [pull_request, push]
jobs:
build-installer-iso-job:
runs-on: ubuntu-latest
container:
image: debian@sha256:c2cedd7f80a4dd0f9f80d3699bd433ccf3de33ab63bfa2d4c4ba870c998222d6 # debian:bookworm-20240311
env:
DEBIAN_ISO_URL: https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/mini.iso
steps:
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Prepare building environment
run: apt-get update && apt-get upgrade -y && apt-get install -y sudo && apt-get install -y wget libarchive-tools && apt-get install -y xorriso && apt-get install -y cpio xz-utils && apt-get install -y fdisk
- name: Inject name and ID into preseed
run: echo "CI_PROJECT_NAME=${{ github.event.repository.name }}" >> cuttlefish-host-image-installer/preseed/after_install_1.sh && echo "CI_PIPELINE_ID=${{ github.repository}}/${{ github.workflow }}" >> cuttlefish-host-image-installer/preseed//after_install_1.sh
- name: Download Debian installer
run: cd cuttlefish-host-image-installer && wget -nv -c ${DEBIAN_ISO_URL} && ./addpreseed.sh && xz -9e preseed-mini.iso
- name: Publish preseed-mini.iso.xz
uses: actions/upload-artifact@v3
with:
name: preseed-mini
path: cuttlefish-host-image-installer/preseed-mini.iso.xz
build-cuttlefish-deb-job:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Prepare building environment
run: sudo apt update && sudo apt-get install -y ubuntu-dev-tools qemu-user-static binfmt-support fakeroot equivs
- name: Pbuilder arm64 create
run: pbuilder-dist stable arm64 create
- name: Pbuilder arm64 update
run: pbuilder-dist stable arm64 update
- name: Building package
run: cd cuttlefish-host-image-installer && ./build_cf_packages.sh
- name: Create artifact
run: cd cuttlefish-host-image-installer && cp -f cuttlefish-common-buildplace/*.deb . && 7z a -mx=9 cuttlefish_packages.7z *.deb
- name: Publish cuttlefish_packages.7z
uses: actions/upload-artifact@v3
with:
name: cuttlefish_packages
path: cuttlefish-host-image-installer/cuttlefish_packages.7z
build-metapackage-deb-job:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Prepare pbuilder environment
run: sudo apt update && sudo apt-get install -y ubuntu-dev-tools qemu-user-static binfmt-support fakeroot equivs
- name: Prepare building environment
run: sudo apt-get update && sudo apt-get upgrade -y && apt-get install -y sudo && apt-get install -y debconf-utils
- name: Prepare tzdata
run: echo "tzdata tzdata/Areas select Etc" | debconf-set-selections -v && echo "tzdata tzdata/Zones/Etc select UTC" | debconf-set-selections -v && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && dpkg-reconfigure --frontend noninteractive tzdata
- name: Prepare pbuilder tool
run: echo "pbuilder pbuilder/mirrorsite string http://deb.debian.org/debian/" | debconf-set-selections -v && DEBIAN_FRONTEND=noninteractive apt-get install -y pbuilder && dpkg-reconfigure --frontend noninteractive pbuilder
- name: Prepare other tools
run: apt-get install -y ubuntu-dev-tools qemu-user-static && apt-get install -y git ca-certificates less && apt-get install -y debhelper devscripts cdbs dpkg-dev equivs fakeroot && apt-get install -y build-essential autoconf automake && apt-get install -y p7zip-full
- name: Building package
run: cd cuttlefish-host-image-installer/metapackage-linaro-gigamp && debuild --no-sign
- name: Create artifact
run: cd cuttlefish-host-image-installer && 7z a -mx=9 meta_gigamp_packages.7z *.deb
- name: Publish meta_gigamp_packages.7z
uses: actions/upload-artifact@v3
with:
name: meta_gigamp_packages
path: cuttlefish-host-image-installer/meta_gigamp_packages.7z
build-uboot-qemu-job:
runs-on: ubuntu-latest
container:
image: debian@sha256:c2cedd7f80a4dd0f9f80d3699bd433ccf3de33ab63bfa2d4c4ba870c998222d6 # debian:bookworm-20240311
env:
UBOOT_GIT_URL: git://git.denx.de/u-boot.git
UBOOT_GIT_BRANCH: v2023.10
steps:
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Prepare building environment
run: apt-get update && apt-get upgrade -y && apt-get install -y sudo && apt-get install -y debconf-utils
- name: Prepare tzdata
run: echo "tzdata tzdata/Areas select Etc" | debconf-set-selections -v && echo "tzdata tzdata/Zones/Etc select UTC" | debconf-set-selections -v && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && dpkg-reconfigure --frontend noninteractive tzdata
- name: Prepare building environment continue
run: apt-get install -y build-essential && apt-get install -y gcc-aarch64-linux-gnu && apt-get install -y git ca-certificates && apt-get install -y bc flex bison && apt-get install -y coccinelle && apt-get install -y device-tree-compiler dfu-util efitools && apt-get install -y gdisk graphviz imagemagick && apt-get install -y liblz4-tool libgnutls28-dev libguestfs-tools && apt-get install -y libncurses-dev && apt-get install -y libpython3-dev libsdl2-dev libssl-dev && apt-get install -y lz4 lzma lzma-alone openssl && apt-get install -y pkg-config && apt-get install -y python3 python3-asteval python3-coverage && apt-get install -y python3-filelock && apt-get install -y python3-pkg-resources python3-pycryptodome && apt-get install -y python3-pyelftools && apt-get install -y python3-pytest python3-pytest-xdist && apt-get install -y python3-sphinxcontrib.apidoc && apt-get install -y python3-sphinx-rtd-theme python3-subunit && apt-get install -y python3-testtools python3-virtualenv && apt-get install -y swig uuid-dev
- name: Downloading
run: cd cuttlefish-host-image-installer && ./uboot/download_uboot.sh
- name: Building
run: cd cuttlefish-host-image-installer/u-boot && ../uboot/build_uboot_qemu_aarch64.sh && cd .. && cp uboot_build_place/u-boot.bin .
- name: Publish u-boot.bin
uses: actions/upload-artifact@v3
with:
name: u-boot
path: cuttlefish-host-image-installer/u-boot.bin