GitHub Actions faster!! (#7268)

Use new meshtastic/gh-action-firmware Action

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Austin 2025-07-08 16:14:05 -04:00 committed by GitHub
parent 354f149338
commit 00495140bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 135 additions and 88 deletions

View File

@ -11,27 +11,30 @@ permissions: read-all
jobs:
build-esp32:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build ESP32
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
remove-debug-flags: >-
./arch/esp32/esp32.ini
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware.bin
ota-firmware-target: release/bleota.bin
artifact-paths: |
pio_platform: esp32
pio_env: ${{ inputs.board }}
pio_target: build
ota_firmware_source: firmware.bin
ota_firmware_target: release/bleota.bin
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-esp32-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.bin
release/*.elf
#include-web-ui: true
arch: esp32

View File

@ -11,27 +11,30 @@ permissions: read-all
jobs:
build-esp32-c3:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build ESP32-C3
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
remove-debug-flags: >-
./arch/esp32/esp32.ini
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware-c3.bin
ota-firmware-target: release/bleota-c3.bin
artifact-paths: |
pio_platform: esp32
pio_env: ${{ inputs.board }}
pio_target: build
ota_firmware_source: firmware-c3.bin
ota_firmware_target: release/bleota-c3.bin
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-esp32c3-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.bin
release/*.elf
#include-web-ui: true
arch: esp32c3

View File

@ -11,27 +11,30 @@ permissions: read-all
jobs:
build-esp32-c6:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build ESP32-C6
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
remove-debug-flags: >-
./arch/esp32/esp32.ini
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware-c3.bin
ota-firmware-target: release/bleota-c3.bin
artifact-paths: |
pio_platform: esp32
pio_env: ${{ inputs.board }}
pio_target: build
ota_firmware_source: firmware-c3.bin
ota_firmware_target: release/bleota-c3.bin
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-esp32c6-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.bin
release/*.elf
#include-web-ui: true
arch: esp32c6

View File

@ -11,27 +11,30 @@ permissions: read-all
jobs:
build-esp32-s3:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build ESP32-S3
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
remove-debug-flags: >-
./arch/esp32/esp32.ini
./arch/esp32/esp32s2.ini
./arch/esp32/esp32s3.ini
./arch/esp32/esp32c3.ini
./arch/esp32/esp32c6.ini
build-script-path: bin/build-esp32.sh
ota-firmware-source: firmware-s3.bin
ota-firmware-target: release/bleota-s3.bin
artifact-paths: |
pio_platform: esp32
pio_env: ${{ inputs.board }}
pio_target: build
ota_firmware_source: firmware-s3.bin
ota_firmware_target: release/bleota-s3.bin
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-esp32s3-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.bin
release/*.elf
#include-web-ui: true
arch: esp32s3

View File

@ -11,20 +11,28 @@ permissions: read-all
jobs:
build-nrf52:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build NRF52
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
build-script-path: bin/build-nrf52.sh
artifact-paths: |
release/*.hex
pio_platform: nrf52
pio_env: ${{ inputs.board }}
pio_target: build
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-nrf52840-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.uf2
release/*.elf
release/*.zip
arch: nrf52840

View File

@ -11,18 +11,28 @@ permissions: read-all
jobs:
build-rpi2040:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build Raspberry Pi 2040
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
build-script-path: bin/build-rpi2040.sh
artifact-paths: |
pio_platform: rp2xx0
pio_env: ${{ inputs.board }}
pio_target: build
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-rp2040-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.uf2
release/*.elf
arch: rp2040

View File

@ -11,19 +11,29 @@ permissions: read-all
jobs:
build-stm32:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get release version string
shell: bash
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Build STM32WL
id: build
uses: ./.github/actions/build-variant
uses: meshtastic/gh-action-firmware@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
board: ${{ inputs.board }}
build-script-path: bin/build-stm32.sh
artifact-paths: |
pio_platform: stm32wl
pio_env: ${{ inputs.board }}
pio_target: build
- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-stm32-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
overwrite: true
path: |
release/*.hex
release/*.bin
release/*.elf
arch: stm32

View File

@ -135,6 +135,7 @@ jobs:
board: ${{ matrix.board }}
build-debian-src:
if: github.repository == 'meshtastic/firmware'
uses: ./.github/workflows/build_debian_src.yml
with:
series: UNRELEASED
@ -425,7 +426,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-firmware:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [release-firmware]
env:

View File

@ -8,6 +8,7 @@ permissions: read-all
jobs:
trunk_check:
if: github.repository == 'meshtastic/firmware'
name: Trunk Check and Upload
runs-on: ubuntu-24.04
@ -21,6 +22,7 @@ jobs:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
trunk_upgrade:
if: github.repository == 'meshtastic/firmware'
# See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#automatic-upgrades
name: Trunk Upgrade (PR)
runs-on: ubuntu-24.04

View File

@ -13,6 +13,7 @@ permissions:
jobs:
semgrep-full:
if: github.repository == 'meshtastic/firmware'
runs-on: ubuntu-24.04
container:
image: semgrep/semgrep

View File

@ -11,6 +11,7 @@ permissions:
jobs:
stale_issues:
if: github.repository == 'meshtastic/firmware'
name: Close Stale Issues
runs-on: ubuntu-latest

View File

@ -12,9 +12,11 @@ permissions:
jobs:
native-tests:
if: github.repository == 'meshtastic/firmware'
uses: ./.github/workflows/test_native.yml
hardware-tests:
if: github.repository == 'meshtastic/firmware'
runs-on: test-runner
steps:
- name: Checkout code