Restructure workflows

This commit is contained in:
Jan-Henrik 2025-02-08 16:16:42 +01:00
parent 1dc3eed254
commit 0dbc6c6d96
3 changed files with 31 additions and 41 deletions

View file

@ -1,4 +1,4 @@
name: Build Case STLs
name: Build 3D Models and Firmware
on:
push:
@ -52,4 +52,30 @@ jobs:
path: |
buttons.stl
buttons-tpu-inlay.stl
buttons-black-blockers.stl
buttons-black-blockers.stl
compile-firmware:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: cd firmware && pio run
- name: Archive
uses: actions/upload-artifact@v4
with:
name: firmware
path: firmware/.pio/build/pico/firmware.uf2

View file

@ -1,34 +0,0 @@
name: Compile Firmware
on:
push:
pull_request:
workflow_call:
jobs:
compile-firmware:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: cd firmware && pio run
- name: Archive
uses: actions/upload-artifact@v4
with:
name: firmware
path: firmware/.pio/build/pico/firmware.uf2

View file

@ -6,14 +6,12 @@ on:
- '*'
jobs:
build-stls:
uses: ./.github/workflows/build-stls.yml
compile-sketch:
uses: ./.github/workflows/compile-sketch.yml
build:
uses: ./.github/workflows/build.yml
publish:
name: Publish binaries
runs-on: ubuntu-latest
needs: [build-stls, compile-sketch]
needs: [build]
steps:
- name: Download firmware artifact
uses: actions/download-artifact@v4