Skip to content

create spl loader

create spl loader #95

Workflow file for this run

name: Build and Release
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
workflow_dispatch:
env:
TAG_NAME: latest
jobs:
buildroot:
name: Build Firmware
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- radxa_zero3
- openipc_bonnet
- runcam_wifilink
- emax_wyvern-link
steps:
- name: Display free disk space
run: df -hT
- name: Checkout source
uses: actions/checkout@v4
- name: Prepare firmware
run: |
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
echo "CACHE_DATE=$(date +%m)" >> $GITHUB_ENV
sudo apt update
sudo apt install -y cpio rsync bc qemu-user-static binfmt-support
sudo mkdir -p /mnt/workspace
sudo chown $USER:$USER /mnt/workspace
rsync -a "$GITHUB_WORKSPACE/" /mnt/workspace/
- name: Setup ccache
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ${{ matrix.platform }}-${{ env.CACHE_DATE }}
- name: Build firmware
working-directory: /mnt/workspace
run: |
export GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
export GIT_BRANCH=${GITHUB_REF_NAME}
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_BRANCH}" >> $GITHUB_ENV
mkdir -p /tmp/ccache
ln -s /tmp/ccache ${HOME}/.ccache
NAME=${{ matrix.platform }}
DEFCONFIG=${NAME}_defconfig bash build.sh
- name: Upload images to workflow artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-images-${{ github.sha }}
path: |
/mnt/workspace/output/${{ matrix.platform }}_defconfig/images/${{ matrix.platform }}_sdcard.img
/mnt/workspace/output/${{ matrix.platform }}_defconfig/images/${{ matrix.platform }}_u-boot.bin
/mnt/workspace/output/${{ matrix.platform }}_defconfig/images/${{ matrix.platform }}_emmc_bootloader.img
/mnt/workspace/output/${{ matrix.platform }}_defconfig/images/${{ matrix.platform }}_rootfs.squashfs
/mnt/workspace/output/${{ matrix.platform }}_defconfig/images/${{ matrix.platform }}.tar.gz
retention-days: 7
release-on-master:
name: Release Latest (on master merge)
runs-on: ubuntu-latest
needs: [buildroot]
# Only run when pushing to master (not on PRs) and not on tags
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Create/Update Latest Release
uses: softprops/action-gh-release@v2
with:
tag_name: buildroot-snapshot
body: |
Snapshot development build from master branch
Commit: ${{ github.sha }}
files: artifacts/**/*
prerelease: true
overwrite: true
release-on-tag:
name: Release Version (on tag)
runs-on: ubuntu-latest
needs: [buildroot]
# Only run when pushing tags
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Create Versioned Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
Stable release ${{ github.ref_name }}
Commit: ${{ github.sha }}
files: artifacts/**/*
draft: false
prerelease: false