From 0dbc6c6d96cae0dad7d9059f620dc93f49cba0d6 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Sat, 8 Feb 2025 16:16:42 +0100 Subject: [PATCH] Restructure workflows --- .../workflows/{build-stls.yml => build.yml} | 30 ++++++++++++++-- .github/workflows/compile-sketch.yml | 34 ------------------- .github/workflows/release.yml | 8 ++--- 3 files changed, 31 insertions(+), 41 deletions(-) rename .github/workflows/{build-stls.yml => build.yml} (67%) delete mode 100644 .github/workflows/compile-sketch.yml diff --git a/.github/workflows/build-stls.yml b/.github/workflows/build.yml similarity index 67% rename from .github/workflows/build-stls.yml rename to .github/workflows/build.yml index b7a6ce4..8519f61 100644 --- a/.github/workflows/build-stls.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml deleted file mode 100644 index 3039991..0000000 --- a/.github/workflows/compile-sketch.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f1e224..e157011 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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