Skip to content

Hard code

Hard code #4

Workflow file for this run

name: build-all
on: push
# on:
# workflow_dispatch:
# inputs:
# git-address:
# description: 'git-address'
# required: true
# default: 'https://github.com/buildroot/buildroot.git'
# branches-tags:
# description: 'branches-tags'
# required: true
# # default: '2018.08.2'
# default: '2023.05.x'
# board:
# description: 'board'
# required: true
# default: 'raspberrypi4'
# custom-config:
# description: 'custom-config'
# required: false
# default: 'raspberrypi4_defconfig'
# build-with:
# description: 'build-with'
# required: false
# default: ''
env:
# BUILDROOT_GIT_REPO: ${{ github.event.inputs.git-address }}
BUILDROOT_GIT_REPO: 'https://github.com/buildroot/buildroot.git'
BUILDROOT_TAG: '2023.05.x'
# BUILDROOT_TAG: ${{ github.event.inputs.branches-tags }}
BUILDROOT_BOARD: 'raspberrypi4'
BUILDROOT_DEFCONFIG: 'raspberrypi4_defconfig'
jobs:
build:
# runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Dump event
run: cat "$GITHUB_EVENT_PATH"
- name: Debug apt sources
run: |
ls -l /etc/apt
ls -l /etc/apt/sources.list.d
- name: Cancel previous runs in progress
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Check out source
uses: actions/checkout@v3
- name: Retrieve cached buildroot
uses: actions/cache@v3
with:
path: |
/opt/buildroot
key: buildroot-${{ env.BUILDROOT_TAG }}
restore-keys: |
buildroot-${{ env.BUILDROOT_TAG }}
- name: Get buildroot source
run: |
git clone $BUILDROOT_GIT_REPO /opt/buildroot
cd /opt/buildroot
- name: Install packages
run: |
sudo apt-get update
sudo apt-get upgrade
# sudo apt-get install -y make gcc g++ unzip git bc python2 device-tree-compiler mtd-utils
sudo apt-get install -y sed make binutils gcc g++ bash patch gzip bzip2 perl tar cpio python2 unzip rsync wget libncurses-dev libelf-dev
sudo apt-get install -y build-essential ncurses-base ncurses-bin libncurses5-dev dialog
ls -l /etc/apt
ls -l /etc/apt/sources.list.d
# sudo apt-get build-dep erlang
- name: Bulid
run: |
mkdir /opt/firmware
cd /opt/buildroot
git checkout $BUILDROOT_TAG
git pull origin $BUILDROOT_TAG
# if [ "x$BUILDROOT_CUSTOM_CONFIG" == 'x' ]; then cp -f /home/runner/work/buildroot-actions/buildroot-actions/configs/${{env.BUILDROOT_CUSTOM_CONFIG}} configs/; fi
echo '---start make---'
make $BUILDROOT_DEFCONFIG
make
cp -r /opt/buildroot/output/images /opt/firmware
- name : Upload buildroot-${{env.BUILDROOT_TAG}}-${{env.BUILDROOT_BOARD}}
uses: actions/upload-artifact@master
with:
name: buildroot-${{env.BUILDROOT_TAG}}-${{env.BUILDROOT_BOARD}}
path: /opt/firmware