mirror of
https://github.com/armbian/scripts.git
synced 2026-01-06 10:32:48 -08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
179 lines
5.7 KiB
YAML
179 lines
5.7 KiB
YAML
name: Build test images with Docker
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
inputs:
|
|
reference:
|
|
required: true
|
|
type: string
|
|
runner:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
|
|
gradle:
|
|
if: ${{ github.repository_owner }}
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 8
|
|
matrix:
|
|
#board: [uefi-x86,uefi-arm64]
|
|
board: [uefi-x86]
|
|
target: ["debian:bullseye:10","debian:sid:12","ubuntu:focal:8","ubuntu:jammy:12"]
|
|
#target: ["debian:bullseye:10","ubuntu:jammy:12"]
|
|
#desktop: [xfce,gnome,mate,cinnamon,budgie,kde-plasma]
|
|
desktop: [xfce,gnome,cinnamon]
|
|
|
|
name: Make
|
|
runs-on: ${{ inputs.runner }}
|
|
#runs-on: big
|
|
steps:
|
|
|
|
- name: Runner prepare
|
|
uses: armbian/actions/runner-prepare@main
|
|
|
|
- name: Read values
|
|
run: |
|
|
|
|
DISTRO=$(echo ${{ matrix.target }} | cut -d":" -f1)
|
|
RELEASE=$(echo ${{ matrix.target }} | cut -d":" -f2)
|
|
COMPILER=$(echo ${{ matrix.target }} | cut -d":" -f3)
|
|
|
|
DOCKER_DISTRO=$DISTRO
|
|
DOCKER_RELEASE=$RELEASE
|
|
DOCKER_COMPILER=$COMPILER
|
|
|
|
BOARD=${{ matrix.board }}
|
|
|
|
# Bullseye can't build even itself
|
|
if [[ "$RELEASE" == "bullseye" ]]; then
|
|
DOCKER_DISTRO="ubuntu"
|
|
DOCKER_RELEASE="jammy"
|
|
DOCKER_COMPILER="12"
|
|
fi
|
|
|
|
if [[ "$DISTRO" == "debian" ]] && [[ "$BOARD" == "rpi4b" ]]; then
|
|
echo "SKIP=yes" >> $GITHUB_ENV
|
|
fi
|
|
|
|
# export to environment
|
|
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
|
|
echo "BOARD=$BOARD" >> $GITHUB_ENV
|
|
echo "COMPILER=$COMPILER" >> $GITHUB_ENV
|
|
|
|
echo "DOCKER_DISTRO=$DOCKER_DISTRO" >> $GITHUB_ENV
|
|
echo "DOCKER_RELEASE=$DOCKER_RELEASE" >> $GITHUB_ENV
|
|
echo "DOCKER_COMPILER=$DOCKER_COMPILER" >> $GITHUB_ENV
|
|
|
|
# - name: Handle exceptions
|
|
# run: |
|
|
#
|
|
# if [[ "${{ env.DISTRO }}" == "debian" && "${{ env.BOARD }}" == "rpi4b" ]]; then
|
|
# echo "SKIP=yes" >> $GITHUB_ENV
|
|
# fi
|
|
|
|
- run: |
|
|
|
|
REFERENCE=${{ inputs.reference }}
|
|
echo "REFERENCE=${REFERENCE:-"nightly"}" >> $GITHUB_ENV
|
|
|
|
- name: Checkout repository
|
|
if: ${{ env.SKIP != 'yes' }}
|
|
uses: actions/checkout@v3.3.0
|
|
with:
|
|
fetch-depth: 1
|
|
repository: armbian/build
|
|
path: build
|
|
ref: ${{ env.REFERENCE }}
|
|
clean: true
|
|
|
|
- name: Checkout support scripts
|
|
if: ${{ env.SKIP != 'yes' }}
|
|
uses: actions/checkout@v3.3.0
|
|
with:
|
|
fetch-depth: 1
|
|
repository: armbian/scripts
|
|
path: scripts
|
|
clean: true
|
|
|
|
- name: Sync
|
|
if: ${{ env.SKIP != 'yes' }}
|
|
run: |
|
|
|
|
mkdir -p build/userpatches
|
|
sudo cp scripts/configs/lib.config build/userpatches/
|
|
sudo cp scripts/configs/config-default.conf build/userpatches/
|
|
|
|
- name: Pull Docker image
|
|
if: ${{ env.SKIP != 'yes' }}
|
|
run: |
|
|
|
|
sudo docker pull ghcr.io/armbian/build:latest"-${{ env.DOCKER_RELEASE }}-$(dpkg --print-architecture)"
|
|
|
|
- name: Build test image
|
|
if: ${{ env.SKIP != 'yes' }}
|
|
run: |
|
|
|
|
cd build
|
|
|
|
# framework init
|
|
./compile.sh \
|
|
JUST_INIT="yes" \
|
|
OFFLINE_WORK="yes" \
|
|
BRANCH=current \
|
|
RELEASE=focal \
|
|
BUILD_MINIMAL=yes \
|
|
BUILD_DESKTOP=no \
|
|
KERNEL_ONLY=no \
|
|
KERNEL_CONFIGURE=no \
|
|
BOARD="zeropi" \
|
|
NO_HOST_RELEASE_CHECK="yes"
|
|
|
|
# change template
|
|
sudo sed -i "s/^#DOCKER_FLAGS+=(--privileged)/DOCKER_FLAGS+=(--privileged)/" userpatches/config-docker.conf
|
|
sudo sed -i "s/^ARM_GCC_COMPILER=.*/ARM_GCC_COMPILER=g++-${{ env.DOCKER_COMPILER }}-arm-linux-gnueabihf/" userpatches/config-docker.conf
|
|
sudo sed -i "s/^BASE_IMAGE=.*/BASE_IMAGE=${{ env.DOCKER_DISTRO }}:${{ env.DOCKER_RELEASE }}/" userpatches/config-docker.conf
|
|
sudo sed -i "s/^VERSION=.*/VERSION=latest\"-\$(echo \${BASE_IMAGE} \| cut -d\":\" -f2)-\$(dpkg --print-architecture)\"/" userpatches/config-docker.conf
|
|
sudo sed -i 's/armbian:/ghcr.io\/armbian\/build:/g' userpatches/config-docker.conf
|
|
sudo sed -i "s/ -it/ -i/" userpatches/config-docker.conf
|
|
sed -i "s/COMPRESS_OUTPUTIMAGE=.*/COMPRESS_OUTPUTIMAGE=\"no\"/" userpatches/lib.config
|
|
|
|
export TERM=dumb
|
|
touch .ignore_changes
|
|
./compile.sh docker \
|
|
JUST_INIT="no" \
|
|
OFFLINE_WORK="no" \
|
|
BETA=yes \
|
|
EXPERT=yes \
|
|
BOARD=${{ matrix.board }} \
|
|
BRANCH=current \
|
|
RELEASE=${{ env.RELEASE }} \
|
|
BUILD_MINIMAL=no \
|
|
BUILD_DESKTOP=yes \
|
|
KERNEL_ONLY=no \
|
|
KERNEL_CONFIGURE=prebuilt \
|
|
COMPRESS_OUTPUTIMAGE=no \
|
|
IGNORE_UPDATES=yes \
|
|
REPOSITORY_INSTALL="u-boot,kernel" \
|
|
DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base" \
|
|
DESKTOP_ENVIRONMENT=${{ matrix.desktop }} \
|
|
SKIP_EXTERNAL_TOOLCHAINS=yes \
|
|
FORCED_MONTH_OFFSET=12 \
|
|
DESKTOP_APPGROUPS_SELECTED="3dsupport browsers" \
|
|
ROOTFSCACHE_VERSION="$(shuf -i 1-100000 -n 1)"
|
|
|
|
# - name: Upload artefacts
|
|
# if: ${{ env.SKIP != 'yes' }}
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: "${{ matrix.board }}-${{ env.RELEASE }}-${{ matrix.desktop }}"
|
|
# path: build/output/images/*
|
|
# if-no-files-found: error
|
|
# retention-days: 7
|
|
|
|
- name: Runner prepare
|
|
uses: armbian/actions/runner-prepare@main
|