6.4.6 #1505
Workflow file for this run
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 Firmware | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| tags: | |
| - "v*" | |
| - "*.*.*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout project | |
| uses: actions/[email protected] | |
| - name: Install sox | |
| run: | | |
| sudo apt update | |
| sudo apt install sox libsox-fmt-mp3 | |
| - name: Setup Hugo | |
| uses: peaceiris/[email protected] | |
| with: | |
| hugo-version: "0.135.0" | |
| - name: Set up Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: "3.11" | |
| - name: Set up Zig | |
| uses: goto-bus-stop/[email protected] | |
| with: | |
| version: "0.11.0" | |
| - name: Setup Go | |
| uses: actions/[email protected] | |
| - name: Install Pico SDK dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential gcc wget tar | |
| - name: Create and activate a Python virtual environment | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| uv venv .venv | |
| echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV | |
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| - name: Install Python dependencies | |
| run: uv pip install -r requirements.txt | |
| - run: uv pip freeze | |
| - name: Checkout pico-sdk | |
| uses: actions/[email protected] | |
| with: | |
| repository: raspberrypi/pico-sdk | |
| path: pico-sdk | |
| submodules: true | |
| ref: 2.2.0 | |
| - name: Checkout pico-extras | |
| uses: actions/[email protected] | |
| with: | |
| repository: raspberrypi/pico-extras | |
| path: pico-extras | |
| submodules: true | |
| ref: sdk-2.2.0 | |
| - name: Patch tinyusb | |
| run: | | |
| sed -i 's/OSAL_TIMEOUT_WAIT_FOREVER/OSAL_TIMEOUT_NORMAL/g' $GITHUB_WORKSPACE/pico-sdk/lib/tinyusb/src/tusb.c | |
| cat $GITHUB_WORKSPACE/pico-sdk/lib/tinyusb/src/tusb.c | grep osal_mutex | |
| - name: Set PICO_SDK_PATH | |
| run: echo "PICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk" >> $GITHUB_ENV | |
| - name: Build zeptocore.uf2 | |
| run: | | |
| make zeptocore | |
| cp zeptocore.uf2 zeptocore_${{ github.ref_name }}.uf2 | |
| - name: Build zeptocore_128.uf2 | |
| run: | | |
| make zeptocore_128 | |
| cp zeptocore.uf2 zeptocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| - name: Build zeptocore_256.uf2 | |
| run: | | |
| make zeptocore_256 | |
| cp zeptocore.uf2 zeptocore_${{ github.ref_name }}_low_latency.uf2 | |
| - name: Build ectocore.uf2 | |
| run: | | |
| make ectocore | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}.uf2 | |
| - name: Build ectocore_128.uf2 | |
| run: | | |
| make ectocore_128 | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| - name: Build ectocore_256.uf2 | |
| run: | | |
| make ectocore_256 | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}_low_latency.uf2 | |
| - name: Build ectocore no overclock | |
| run: | | |
| make ectocore_noclock | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}_no_overclocking.uf2 | |
| - name: Build ectocore no overclock 128 | |
| run: | | |
| make ectocore_noclock_128 | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}_no_overclocking_ultralow_latency.uf2 | |
| - name: Build ectocore no overclock 256 | |
| run: | | |
| make ectocore_noclock_256 | |
| cp ectocore.uf2 ectocore_${{ github.ref_name }}_no_overclocking_low_latency.uf2 | |
| - name: Build ectocore_beta_hardware.uf2 | |
| run: | | |
| make ectocore_beta_hardware | |
| cp ectocore_beta_hardware.uf2 ectocore_beta_hardware_${{ github.ref_name }}.uf2 | |
| - name: Build zeptoboard.uf2 | |
| run: | | |
| make zeptoboard | |
| cp zeptoboard.uf2 zeptoboard_${{ github.ref_name }}.uf2 | |
| - name: Prepare source tarball (on tags only) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| git clone -b ${{ github.ref_name }} --depth 1 https://github.com/schollz/_core _core-${{ github.ref_name }} | |
| cd _core-${{ github.ref_name }}/core && go mod tidy && go mod vendor | |
| cd ../.. && tar -czvf _core_${{ github.ref_name }}_src.tar.gz _core-${{ github.ref_name }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware-builds | |
| path: | | |
| zeptocore_${{ github.ref_name }}.uf2 | |
| zeptocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| zeptocore_${{ github.ref_name }}_low_latency.uf2 | |
| zeptoboard_${{ github.ref_name }}.uf2 | |
| ectocore_${{ github.ref_name }}.uf2 | |
| ectocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| ectocore_${{ github.ref_name }}_low_latency.uf2 | |
| ectocore_${{ github.ref_name }}_no_overclocking.uf2 | |
| ectocore_${{ github.ref_name }}_no_overclocking_ultralow_latency.uf2 | |
| ectocore_${{ github.ref_name }}_no_overclocking_low_latency.uf2 | |
| ectocore_beta_hardware_${{ github.ref_name }}.uf2 | |
| _core_${{ github.ref_name }}_src.tar.gz | |
| if-no-files-found: ignore | |
| release: | |
| name: Create GitHub Release (on tags) | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: firmware-builds | |
| path: ./dist | |
| - name: List artifacts | |
| run: ls -l ./dist | |
| - name: Create Release and upload assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/_core_${{ github.ref_name }}_src.tar.gz | |
| dist/zeptocore_${{ github.ref_name }}.uf2 | |
| dist/zeptocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| dist/zeptocore_${{ github.ref_name }}_low_latency.uf2 | |
| dist/zeptoboard_${{ github.ref_name }}.uf2 | |
| dist/ectocore_${{ github.ref_name }}.uf2 | |
| dist/ectocore_${{ github.ref_name }}_ultralow_latency.uf2 | |
| dist/ectocore_${{ github.ref_name }}_low_latency.uf2 | |
| dist/ectocore_${{ github.ref_name }}_no_overclocking.uf2 | |
| dist/ectocore_${{ github.ref_name }}_no_overclocking_ultralow_latency.uf2 | |
| dist/ectocore_${{ github.ref_name }}_no_overclocking_low_latency.uf2 | |
| dist/ectocore_beta_hardware_${{ github.ref_name }}.uf2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |