Skip to content

CI

CI #26

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
workflow_dispatch:
inputs:
build_repo_branch:
description: "Source branch. main/master/23.02.0-trunk.0256/..."
required: true
default: "main"
jobs:
generate_release_info:
# runs-on: self-hosted
runs-on: ubuntu-22.04
outputs:
release_name: ${{ steps.generate_release_name.outputs.release_name }}
steps:
- id: generate_release_name
run: |
echo "release_name=${{ github.event.inputs.build_repo_branch }}-$(date -u -I)" >> "$GITHUB_OUTPUT"
build:
# runs-on: self-hosted
runs-on: ubuntu-22.04
needs: generate_release_info
strategy:
matrix:
include:
- boardfamily: bcm2711
branch: current
representative: rpi4b
- boardfamily: bcm2711
branch: edge
representative: rpi4b
- boardfamily: d1
branch: edge
representative: mangopi-mq
- boardfamily: imx6
branch: current
representative: cubox-i
- boardfamily: imx6
branch: edge
representative: cubox-i
- boardfamily: imx7d
branch: current
representative: imx7sabre
- boardfamily: imx7d
branch: legacy
representative: imx7sabre
- boardfamily: jetson-nano
branch: legacy
representative: jetson-nano
- boardfamily: media
branch: current
representative: jetson-nano
- boardfamily: media
branch: edge
representative: jetson-nano
- boardfamily: media
branch: legacy
representative: khadas-edge2
- boardfamily: meson64
branch: current
representative: odroidc4
- boardfamily: meson64
branch: edge
representative: odroidc4
- boardfamily: meson
branch: current
representative: onecloud
- boardfamily: meson
branch: edge
representative: onecloud
- boardfamily: mt7623
branch: legacy
representative: bananapir2
- boardfamily: mvebu64
branch: current
representative: macchiatobin-doubleshot
- boardfamily: mvebu64
branch: edge
representative: macchiatobin-doubleshot
- boardfamily: mvebu
branch: current
representative: clearfogpro
- boardfamily: mvebu
branch: edge
representative: clearfogpro
- boardfamily: odroidxu4
branch: current
representative: odroidxu4
- boardfamily: odroidxu4
branch: edge
representative: odroidxu4
- boardfamily: rk322x
branch: current
representative: rk322x-box
- boardfamily: rk322x
branch: edge
representative: rk322x-box
- boardfamily: rk322x
branch: legacy
representative: rk322x-box
- boardfamily: rk3399
branch: legacy
representative: helios64
- boardfamily: rk3568-odroid
branch: edge
representative: odroidm1
- boardfamily: rk35xx
branch: legacy
representative: radxa-e25
- boardfamily: rockchip64
branch: current
representative: rockpro64
- boardfamily: rockchip64
branch: edge
representative: rockpro64
- boardfamily: rockchip64
branch: legacy
representative: rockpro64
- boardfamily: rockchip
branch: current
representative: tinkerboard
- boardfamily: rockchip
branch: edge
representative: tinkerboard
- boardfamily: rockchip
branch: legacy
representative: tinkerboard
- boardfamily: rockchip-rk3588
branch: edge
representative: rock-5b
- boardfamily: rockchip-rk3588
branch: legacy
representative: rock-5b
- boardfamily: rockpis
branch: legacy
representative: rockpi-s
- boardfamily: s5p6818
branch: legacy
representative: nanopifire3
- boardfamily: starfive2
branch: edge
representative: visionfive2
- boardfamily: starfive
branch: edge
representative: unleashed
- boardfamily: station-p2
branch: legacy
representative: station-p2
- boardfamily: sun50iw9
branch: legacy
representative: orangepizero2
- boardfamily: sunxi64
branch: current
representative: lime-a64
- boardfamily: sunxi64
branch: edge
representative: lime-a64
- boardfamily: sunxi64
branch: legacy
representative: lime-a64
- boardfamily: sunxi
branch: current
representative: bananapim2plus
- boardfamily: sunxi
branch: edge
representative: bananapim2plus
- boardfamily: sunxi
branch: legacy
representative: bananapim2plus
- boardfamily: uefi-arm64
branch: current
representative: uefi-arm64
- boardfamily: uefi-arm64
branch: edge
representative: uefi-arm64
- boardfamily: uefi-riscv64
branch: current
representative: uefi-riscv64
- boardfamily: uefi-riscv64
branch: edge
representative: uefi-riscv64
- boardfamily: uefi-x86
branch: current
representative: uefi-x86
- boardfamily: uefi-x86
branch: edge
representative: uefi-x86
- boardfamily: virtual
branch: current
representative: virtual-qemu
- boardfamily: zynq
branch: legacy
representative: microzed
fail-fast: false
env:
BOARD_FAMILY: ${{ matrix.boardfamily }}
BRANCH: ${{ matrix.branch }}
BOARD_NAME: ${{ matrix.representative }}
steps:
- name: cleanup #https://github.com/actions/checkout/issues/211
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- uses: actions/checkout@v3
with:
repository: armbian/build
path: build
ref: ${{ github.event.inputs.build_repo_branch }}
- uses: actions/checkout@v3
with:
path: utils
- name: Build Kernel
run: |
# Copy helper files.
cp utils/* build/
cd build/
# Remove disabling DEBUG_INFO.
sed -i 's/run_kernel_make olddefconfig/run_kernel_make KCONFIG_ALLCONFIG=.config alldefconfig/g' lib/functions/compilation/kernel-config.sh
sed -i '/kernel_config_set_n DEBUG_INFO/d' lib/functions/compilation/armbian-kernel.sh
# Trip modulues debug info.
sed -i 's/run_kernel_make_long_running/run_kernel_make_long_running INSTALL_MOD_STRIP=1/g' lib/functions/compilation/kernel.sh
# Enable BTF.
sed -i '/CONFIG_DEBUG_INFO/d;/CONFIG_RING_BUFFER/d;/CONFIG_TRACING/d;/CONFIG_STACKTRACE/d;/CONFIG_NOP_TRACER/d;/CONFIG_BINARY_PRINTF/d;/CONFIG_EVENT_TRACING/d;/CONFIG_TRACE_CLOCK/d;/CONFIG_TASKS_RCU/d' config/kernel/linux-"$BOARD_FAMILY"-"$BRANCH".config
echo "CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_DEBUG_INFO_COMPRESSED_ZLIB=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_KPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_RING_BUFFER=y
CONFIG_TRACING=y
CONFIG_STACKTRACE=y
CONFIG_NOP_TRACER=y
CONFIG_BINARY_PRINTF=y
CONFIG_EVENT_TRACING=y
CONFIG_TRACE_CLOCK=y
CONFIG_TASKS_RCU=y" >> config/kernel/linux-"$BOARD_FAMILY"-"$BRANCH".config
# Compile kernel.
./compile.sh RELEASE=jammy JUST_KERNEL=yes BUILD_ONLY=u-boot,kernel,armbian-config,armbian-bsp BOARD="$BOARD_NAME" BRANCH="$BRANCH" KERNEL_CONFIGURE=no BUILD_MINIMAL=yes
- name: Extract Output
id: output
run: |
cd build/output/debs/
fname=$(ls --format single-column kernel-*.tar | head -n 1)
fpath=$(realpath ${fname})
echo "FILE_DISPLAY_NAME=${fname}" >> $GITHUB_OUTPUT
echo "FILEPATH=${fpath}" >> $GITHUB_OUTPUT
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: daeuniverse/armbian-btf-kernel
repo_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
file: ${{ steps.output.outputs.FILEPATH }}
asset_name: ${{ steps.output.outputs.FILE_DISPLAY_NAME }}
tag: ${{ needs.generate_release_info.outputs.release_name }}
overwrite: true