Skip to content

.github/workflows/buildroot-external-st.yml #80

.github/workflows/buildroot-external-st.yml

.github/workflows/buildroot-external-st.yml #80

on: workflow_dispatch
jobs:
build-all:
runs-on: ubuntu-24.04
env:
repo_version: st/2024.02.3
strategy:
matrix:
config: [ st_stm32mp157d_dk1, st_stm32mp157d_dk1_demo, st_stm32mp157f_dk2, st_stm32mp157f_dk2_demo, st_stm32mp135f_dk, st_stm32mp135f_dk_demo, st_stm32mp257f_ev1, st_stm32mp257f_ev1_demo ]
steps:
- uses: actions/checkout@v4
with:
path: buildroot-external-st
- uses: actions/checkout@v4
with:
repository: bootlin/buildroot
ref: ${{ env.repo_version }}
path: buildroot
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install b2
run: pip install b2
- name: Register to b2
run: b2 authorize_account ${{ secrets.B2_KEY_ID }} ${{ secrets.B2_APPLICATION_KEY }}
- name: Configure Buildroot
run: make -C buildroot BR2_EXTERNAL=../buildroot-external-st O=../output ${{ matrix.config }}_defconfig
- name: Build Buildroot
run: make -C buildroot O=../output
- name: Store image
run: |
b2 file upload bootlin-buildroot-st output/images/sdcard.img.gz ${{ github.ref_name }}/sdcard-${{ matrix.config }}.img.gz
b2 file upload bootlin-buildroot-st output/images/sdcard.img.bmap ${{ github.ref_name }}/sdcard-${{ matrix.config }}.img.bmap
- name: Build SDK
run: make -C buildroot O=../output sdk
- name: Store SDK
run: b2 file upload bootlin-buildroot-st output/images/*_sdk-buildroot.tar.gz ${{ github.ref_name }}/arm-buildroot-linux-gnueabihf_sdk-${{ matrix.config }}.tar.gz
- name: Clean images
run: rm -rf output/images
- name: Generate legal-info
run: make -C buildroot O=../output legal-info
- name: Archive and compress sources
run: tar -cf - -C output/legal-info sources | gzip -9 - > sources-${{ matrix.config }}.tar.gz
- name: Archive and compress licenses
run: tar -cf - -C output/legal-info licenses | gzip -9 - > licenses-${{ matrix.config }}.tar.gz
- name: Store sources
run: b2 file upload bootlin-buildroot-st sources-${{ matrix.config }}.tar.gz ${{ github.ref_name }}/sources-${{ matrix.config }}.tar.gz
- name: Store licenses
run: b2 file upload bootlin-buildroot-st licenses-${{ matrix.config }}.tar.gz ${{ github.ref_name }}/licenses-${{ matrix.config }}.tar.gz
- name: Clean legal-info
run: rm -rf output/legal-info sources-${{ matrix.config }}.tar.gz licenses-${{ matrix.config }}.tar.gz
- name: Update the README
run: |
cp buildroot-external-st/.github/workflows/README README
sed -ie "s|#CONFIG#|${{ matrix.config }}|" README
sed -ie "s|#BR_REV#|${{ env.repo_version }}|" README
sed -ie "s|#BR_EXT_REV#|${{ github.ref_name }}|" README
- name: Store the README
run: b2 file upload bootlin-buildroot-st README ${{ github.ref_name }}/README-${{ matrix.config }}
- name: Full build cleanup
run: rm -rf output