v6.0.4 #152
Workflow file for this run
This file contains 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: release | |
on: | |
release: | |
types: [created] | |
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.133.1" | |
- 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: 1.5.1 | |
- 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 core_macos_amd64 | |
run: | | |
make core_macos_amd64 | |
cp core_macos_amd64 core_macos_amd64_${{ github.event.release.name }} | |
- name: Build ectocore_macos_aarch64 | |
run: | | |
make ectocore_macos_aarch64 | |
cp ectocore_macos_aarch64 ectocore_macos_aarch64_${{ github.event.release.name }} | |
- name: Build core_macos_aarch64 | |
run: | | |
make core_macos_aarch64 | |
cp core_macos_aarch64 core_macos_aarch64_${{ github.event.release.name }} | |
- name: Build ectocore_macos_aarch64 | |
run: | | |
make ectocore_macos_amd64 | |
cp ectocore_macos_amd64 ectocore_macos_amd64_${{ github.event.release.name }} | |
- name: Build zeptocore.uf2 | |
run: | | |
make zeptocore | |
cp zeptocore.uf2 zeptocore_${{ github.event.release.name }}.uf2 | |
- name: Build ectocore.uf2 | |
run: | | |
make ectocore | |
cp ectocore.uf2 ectocore_${{ github.event.release.name }}.uf2 | |
- name: Build ectocore_v3.uf2 | |
run: | | |
make ectocore_v3 | |
cp ectocore.uf2 ectocore_v0.3_${{ github.event.release.name }}.uf2 | |
- name: Build zeptoboard.uf2 | |
run: | | |
make zeptoboard | |
cp zeptoboard.uf2 zeptoboard_${{ github.event.release.name }}.uf2 | |
- name: Build core_windows.exe | |
run: | | |
make core_windows.exe | |
cp core_windows.exe core_windows_${{ github.event.release.name }}.exe | |
- name: Build core_linux_amd64 | |
run: | | |
make core_linux_amd64 | |
cp core_linux_amd64 core_linux_amd64_${{ github.event.release.name }} | |
- name: Build ectocore_windows.exe | |
run: | | |
make ectocore_windows.exe | |
cp ectocore_windows.exe ectocore_windows_${{ github.event.release.name }}.exe | |
- name: Build ectocore_linux_amd64 | |
run: | | |
make ectocore_linux_amd64 | |
cp ectocore_linux_amd64 ectocore_linux_amd64_${{ github.event.release.name }} | |
- name: Prepare source tarball | |
run: | | |
git clone -b ${{ github.event.release.name }} --depth 1 https://github.com/schollz/_core _core-${{ github.event.release.name }} | |
cd _core-${{ github.event.release.name }}/core && go mod tidy && go mod vendor | |
cd ../.. && tar -czvf _core_${{ github.event.release.name }}_src.tar.gz _core-${{ github.event.release.name }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
_core_${{ github.event.release.name }}_src.tar.gz | |
zeptocore_${{ github.event.release.name }}.uf2 | |
ectocore_${{ github.event.release.name }}.uf2 | |
ectocore_v0.3_${{ github.event.release.name }}.uf2 | |
zeptoboard_${{ github.event.release.name }}.uf2 | |
core_windows_${{ github.event.release.name }}.exe | |
core_linux_amd64_${{ github.event.release.name }} | |
core_macos_aarch64_${{ github.event.release.name }} | |
core_macos_amd64_${{ github.event.release.name }} | |
ectocore_windows_${{ github.event.release.name }}.exe | |
ectocore_linux_amd64_${{ github.event.release.name }} | |
ectocore_macos_aarch64_${{ github.event.release.name }} | |
ectocore_macos_amd64_${{ github.event.release.name }} |