-
-
Notifications
You must be signed in to change notification settings - Fork 7
93 lines (75 loc) · 2.88 KB
/
buildroot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Buildroot Arc
on:
workflow_dispatch:
inputs:
version:
description: "version"
default: "2023.08.x"
type: string
jobs:
buildroot:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
lfs: 'true'
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
swap-storage: false
- name: Install Dependencies
run: |
git config --global user.email "info@auxxxilium.tech"
git config --global user.name "AuxXxilium"
sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update
sudo apt install -y jq gawk cpio gettext libelf-dev qemu-utils busybox dialog curl sed
sudo snap install yq
df -h
- name: Build Buildroot
run: |
git clone https://oauth2:${{ secrets.ACTION }}@github.com/AuxXxilium/arc-build.git
BR_VERSION="${{ inputs.version }}"
git clone --single-branch -b ${BR_VERSION} https://github.com/buildroot/buildroot.git .buildroot
cp -Ru arc-build/arc/* .buildroot/
cd .buildroot/
echo "Generating default Config"
make BR2_EXTERNAL=./external -j$(nproc) arc_defconfig
echo "Download Sources if not cached"
make BR2_EXTERNAL=./external -j$(nproc) source
echo "Prepare Buildroot for first Make"
make BR2_EXTERNAL=./external -j$(nproc)
[ ! -f "output/images/bzImage" ] && exit 1
[ ! -f "output/images/rootfs.cpio.xz" ] && exit 1
BUILDROOT_VERSION="$(grep ' BR2_VERSION :=' Makefile | cut -d '=' -f2 | tr -d ' ')"
KERNEL_VERSION="$(grep BR2_LINUX_KERNEL_VERSION .config | cut -d'=' -f2 | tr -d '"')"
echo "BUILDROOT_VERSION=${BUILDROOT_VERSION}" >> $GITHUB_ENV
echo "KERNEL_VERSION=${KERNEL_VERSION}" >> $GITHUB_ENV
- name: Upload Artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: grub
path: |
.buildroot/output/images/bzImage
.buildroot/output/images/rootfs.cpio.xz
# Publish a release if is a tag
- name: Release
if: success() && ${{ inputs.version }} != ''
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.version }}
allowUpdates: true
artifacts: |
.buildroot/output/images/bzImage
.buildroot/output/images/rootfs.cpio.xz
body: |
Buildroot Version: ${{ env.BUILDROOT_VERSION }}
Kernel Version: ${{ env.KERNEL_VERSION }}