Full distro test builds #207
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
name: "Full distro test builds" | |
on: | |
schedule: | |
- cron: '00 5 * * *' | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Framework build branch' | |
default: 'main' | |
type: string | |
jobs: | |
prepare: | |
name: "JSON" | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{steps.json.outputs.JSON_CONTENT}} | |
steps: | |
- name: "Checkout Armbian build Framework" | |
uses: actions/checkout@v4 | |
with: | |
repository: armbian/build | |
ref: ${{ inputs.ref || inputs.branch || 'main' }} | |
clean: false | |
fetch-depth: 1 | |
path: build | |
- name: "Install SSH key" | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.KEY_UPLOAD }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS_ARMBIAN_UPLOAD }} | |
if_key_exists: replace | |
- name: "Cleanup upload folder" | |
run: | | |
ssh upload@netcup.armbian.com "rm -rf /var/www/netcup.armbian.com/html/qemutestbuilds/*" | |
- name: "Make JSON" | |
id: json | |
run: | | |
echo 'JSON_CONTENT<<EOF' >> $GITHUB_OUTPUT | |
releases=($(grep "supported\|csc" build/config/distributions/*/support | cut -d"/" -f4)) | |
for i in ${releases[@]}; do | |
desktops=($(grep "supported\|csc" build/config/desktop/${i}/environments/*/support | cut -d"/" -f6)) | |
desktops+=(cli minimal) | |
for j in ${desktops[@]}; do | |
echo "{\"release\":\"${i}\",\"desktop\":\"$j\"}" | |
done | |
done | jq -s >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
gradle: | |
needs: prepare | |
strategy: | |
fail-fast: false | |
max-parallel: 64 | |
matrix: | |
include: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
name: "Build Qemu" | |
timeout-minutes: 60 | |
runs-on: [ images, X64 ] | |
steps: | |
# Cleaning self hosted runners | |
- name: Runner clean | |
uses: armbian/actions/runner-clean@main | |
# Login to ghcr.io, for later uploading rootfs to ghcr.io | |
- name: Docker Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: "${{ github.repository_owner }}" # GitHub username or org | |
password: "${{ secrets.GITHUB_TOKEN }}" # GitHub actions builtin token. repo has to have pkg access. | |
- name: "Install SSH key" | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.KEY_UPLOAD }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS_ARMBIAN_UPLOAD }} | |
if_key_exists: replace | |
#- name: Free Github Runner | |
# uses: descriptinc/free-disk-space@main | |
# with: | |
# android: true | |
# dotnet: true | |
# haskell: true | |
# large-packages: true | |
# docker-images: true | |
# swap-storage: true | |
# clone the build system repo (`armbian/build`) | |
- name: Checkout build repo | |
uses: actions/checkout@v4 | |
with: | |
repository: armbian/build | |
ref: ${{ inputs.ref || inputs.branch || 'main' }} | |
fetch-depth: 0 | |
clean: false | |
path: build | |
# clone the userpatches repo (`armbian/os`) | |
- name: "Checkout userpatches repo" | |
uses: actions/checkout@v4 | |
with: | |
repository: armbian/os | |
fetch-depth: 0 | |
clean: false | |
path: userpatches | |
- name: "Put userpatches in place, and remove userpatches repo" | |
run: | | |
mkdir -pv build/userpatches | |
rsync -av userpatches/userpatches/. build/userpatches/ | |
- name: "Release => ${{ matrix.release }} Desktop => ${{ matrix.desktop}})" | |
run: | | |
cd build | |
BUILD_DESKTOP=yes | |
BUILD_MINIMAL=no | |
DESKTOP_ENVIRONMENT=${{ matrix.desktop }} | |
[[ "${{ matrix.desktop }}" == minimal ]] && BUILD_MINIMAL=yes && BUILD_DESKTOP=no && unset DESKTOP_ENVIRONMENT | |
[[ "${{ matrix.desktop }}" == cli ]] && BUILD_MINIMAL=no && BUILD_DESKTOP=no && unset DESKTOP_ENVIRONMENT | |
bash ./compile.sh armbian-images \ | |
IMAGE_XZ_COMPRESSION_RATIO=1 \ | |
BOARD=uefi-x86 \ | |
BRANCH=current \ | |
BUILD_DESKTOP="${BUILD_DESKTOP}" \ | |
BUILD_MINIMAL="${BUILD_MINIMAL}" \ | |
DESKTOP_APPGROUPS_SELECTED= \ | |
DESKTOP_ENVIRONMENT="${DESKTOP_ENVIRONMENT}" \ | |
DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base \ | |
ENABLE_EXTENSIONS=image-output-qcow2,v4l2loopback-dkms \ | |
EXPERT=yes \ | |
KERNEL_CONFIGURE=no \ | |
RELEASE=${{ matrix.release }} \ | |
SHARE_LOG=yes \ | |
SHOW_DEBUB=yes \ | |
UPLOAD_TO_OCI_ONLY=yes | |
# To do: | |
# - test deploy images and take screenshots | |
# - upload to server for executing run test | |
#rsync -arvc --rsync-path="mkdir -p /var/www/netcup.armbian.com/html/qemutestbuilds/ && rsync" output/images/ ${{ secrets.HOST_UPLOAD_USER }}@${{ secrets.HOST_UPLOAD }}:"/var/www/netcup.armbian.com/html/qemutestbuilds/" |