Skip to content

1.3.3

1.3.3 #60

Workflow file for this run

name: Build
on:
push:
branches: [ main, xiaozhi2 ]
tags:
- 'v*'
pull_request:
branches: [ main, xiaozhi2 ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- sf32lb52-lchspi-ulp
- sf32lb52-lcd_n16r8
- sf32lb52-nano_52j
- sf32lb52-xty-ai
- sf32lb52-xty-ai-tht
fail-fast: false
name: Build ${{ matrix.target }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup build environment
run: |
cd sdk
./install.sh
- name: Build ${{ matrix.target }}
run: |
cd sdk
. ./export.sh
cd -
cd app/project
scons --board=${{ matrix.target }} -j$(nproc)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.target }}
path: |
app/project/build_*
retention-days: 7
- name: Prepare release files
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p release/${{ matrix.target }}
cp app/project/build_${{ matrix.target }}_hcpu/bootloader/bootloader.bin release/${{ matrix.target }}/
cp app/project/build_${{ matrix.target }}_hcpu/ftab/ftab.bin release/${{ matrix.target }}/
cp app/project/build_${{ matrix.target }}_hcpu/main.bin/ER_IROM1.bin release/${{ matrix.target }}/
cp app/project/build_${{ matrix.target }}_hcpu/main.bin/ER_IROM2.bin release/${{ matrix.target }}/
cp app/project/build_${{ matrix.target }}_hcpu/main.bin/ER_IROM3.bin release/${{ matrix.target }}/
# cp sftool_param.json release/${{ matrix.target }}/
# Create a zip archive for this target
cd release
zip -r ${{ matrix.target }}.zip ${{ matrix.target }}/
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "release/${{ matrix.target }}.zip"
generateReleaseNotes: true
allowUpdates: true
artifactErrorsFailBuild: true
name: "Release ${{ github.ref_name }}"
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}