diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abba407fcb2413b13c53b861a8b631d84f73257b..a2f34910e8eb3baa3888d6aee17545417f5e13aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,33 @@ build-zynthbox-image-armhf: - ./build/*.img.xz expire_in: 1 day script: - - echo "" + - image_name="zynthbox_rpi4_buster_$(date "+%F_%H%M").img" + - log_file_name="$image_name.build.log" + + # Update and install dependencies + - apt-get update + - apt-get install -y coreutils p7zip-full qemu-user-static sudo git wget python3 lsof + + # Clone repositories required to generate image + - git clone https://github.com/zynthbox/CustomPiOS.git + - git clone https://github.com/zynthbox/ZynthianOS.git + + # Setup Zynthbox Repo sourceline + - echo 'ZYNTHIANOS_ZYNTHBOX_REPO_KEY_URL=\'http://repo.zynthbox.io/testing/repo_key.pub\'' >> ZynthianOS/src/modules/zynthianos/config + - echo 'ZYNTHIANOS_ZYNTHBOX_REPO_SOURCELINE=\'deb http://repo.zynthbox.io/testing zynthbox main\'' >> ZynthianOS/src/modules/zynthianos/config + + # Download prebuilt realtime kernel + - wget "http://unofficialpi.org/Distros/RealtimePi/2021-06-15_2021-05-07-realtimepi-buster-armhf-lite-0.5.0.zip" -P ./ZynthianOS/src/image + + # Build image + - cd ./ZynthianOS/src + - ../../CustomPiOS/src/update-custompios-paths + - bash -x ./build_dist + - mv build/ZynthianOS/src/workspace/*.img build/$image_name + - echo "Image Size -> $(du -h build/$image_name)" + + # Compress image + - xz -zv --threads=$(nproc) build/$image_name publish-zynthbox-image-armhf: image: ubuntu:focal @@ -21,4 +47,4 @@ publish-zynthbox-image-armhf: needs: ["build-zynthbox-image-armhf"] dependencies: ["build-zynthbox-image-armhf"] script: - - echo "" + - echo "Compressed Image Size -> $(du -h build/$image_name.xz)"