pp_rk: bump to latest fixes, extend osd.json (#103) #184
This file contains hidden or 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: 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@v6 | |
| - 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: Cache ccache | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/ccache | |
| key: ${{ matrix.platform }}-ccache-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ matrix.platform }}-ccache- | |
| - 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 | |
| export BR2_CCACHE_DIR=/tmp/ccache | |
| NAME=${{ matrix.platform }} | |
| DEFCONFIG=${NAME}_defconfig bash build.sh | |
| - name: Upload images to workflow artifacts | |
| uses: actions/upload-artifact@v6 | |
| 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 }}_boot.scr | |
| /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@v6 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v8 | |
| 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@v6 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v8 | |
| 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 |