rebase linux patches on top of 6.8.12 #342
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: CI | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'info' | |
type: choice | |
options: | |
- off | |
- error | |
- warn | |
- info | |
- debug | |
- trace | |
bmcd_version: | |
description: 'BMC daemon version' | |
required: false | |
type: string | |
pull_request: | |
branches: ["master"] | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: ${{ inputs.logLevel }} | |
steps: | |
- name: Maximize build space | |
uses: AdityaGarg8/remove-unwanted-software@v1 | |
with: | |
remove-android: 'true' | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: get version | |
run: echo "BUILD_VERSION=`git describe --tags`" >> $GITHUB_ENV | |
- name: conditional bmcd version injection | |
if: inputs.bmcd_version != '' | |
run: | | |
sed -ir 's#^BMCD_VERSION.*#BMCD_VERSION=${{ inputs.bmcd_version }}#g' ${{ github.workspace }}/tp2bmc/package/bmcd/bmcd.mk | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
tags: buildroot_local:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false | |
- name: build firmware | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: buildroot_local:latest | |
options: -v ${{ github.workspace }}:/work | |
run: | | |
/work/setup_build.sh | |
cd /work/buildroot | |
make BR2_EXTERNAL=../tp2bmc tp2bmc_defconfig | |
FORCE_UNSAFE_CONFIGURE=1 make | |
- name: stamp images | |
run: | | |
mkdir artifacts | |
sudo mv buildroot/output/images/tp2-bmc-firmware-sdcard.img artifacts/tp2-firmware-sdcard-${{ env.BUILD_VERSION }}.img | |
sudo mv buildroot/output/images/rootfs.erofs artifacts/tp2-ota-${{ env.BUILD_VERSION }}.tpu | |
- name: archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: tp2-${{ env.BUILD_VERSION }} | |
path: artifacts/* | |