mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 15:02:41 +00:00
Some checks are pending
Daily Packaging / docker-multiarch (push) Waiting to run
Daily Packaging / package-ppa (jammy) (push) Waiting to run
Daily Packaging / package-ppa (noble) (push) Waiting to run
Daily Packaging / package-ppa (plucky) (push) Waiting to run
Daily Packaging / package-ppa (questing) (push) Waiting to run
Daily Packaging / package-obs (push) Waiting to run
Daily Packaging / hook-copr (push) Waiting to run
CI / setup (all) (push) Waiting to run
CI / setup (check) (push) Waiting to run
CI / version (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker (alpine, native, linux/amd64) (push) Waiting to run
CI / docker (alpine, native, linux/arm64) (push) Waiting to run
CI / docker (alpine, native-tft, linux/amd64) (push) Waiting to run
CI / docker (debian, native, linux/amd64) (push) Waiting to run
CI / docker (debian, native, linux/arm/v7) (push) Waiting to run
CI / docker (debian, native, linux/arm64) (push) Waiting to run
CI / docker (debian, native-tft, linux/amd64) (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (rp2350) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (rp2350) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
183 lines
5.3 KiB
YAML
183 lines
5.3 KiB
YAML
name: Build One Target
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
# trunk-ignore(checkov/CKV_GHA_7)
|
|
arch:
|
|
type: choice
|
|
options:
|
|
- esp32
|
|
- esp32s3
|
|
- esp32c3
|
|
- esp32c6
|
|
- nrf52840
|
|
- rp2040
|
|
- rp2350
|
|
- stm32
|
|
- native
|
|
target:
|
|
type: string
|
|
required: false
|
|
description: Choose the target board, e.g. nrf52_promicro_diy_tcxo. If blank, will find available targets.
|
|
# find-target:
|
|
# type: boolean
|
|
# default: true
|
|
# description: 'Find the available targets'
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
find-targets:
|
|
if: ${{ inputs.target == '' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch:
|
|
- esp32
|
|
- esp32s3
|
|
- esp32c3
|
|
- esp32c6
|
|
- nrf52840
|
|
- rp2040
|
|
- rp2350
|
|
- stm32
|
|
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.x
|
|
cache: pip
|
|
- run: pip install -U platformio
|
|
- name: Generate matrix
|
|
id: jsonStep
|
|
run: |
|
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level extra)
|
|
echo "Name: $GITHUB_REF_NAME" >> $GITHUB_STEP_SUMMARY
|
|
echo "Base: $GITHUB_BASE_REF" >> $GITHUB_STEP_SUMMARY
|
|
echo "Arch: ${{matrix.arch}}" >> $GITHUB_STEP_SUMMARY
|
|
echo "Ref: $GITHUB_REF" >> $GITHUB_STEP_SUMMARY
|
|
echo "Targets:" >> $GITHUB_STEP_SUMMARY
|
|
echo $TARGETS >> $GITHUB_STEP_SUMMARY
|
|
|
|
version:
|
|
if: ${{ inputs.target != '' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Get release version string
|
|
run: |
|
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
|
id: version
|
|
env:
|
|
BUILD_LOCATION: local
|
|
outputs:
|
|
long: ${{ steps.version.outputs.long }}
|
|
deb: ${{ steps.version.outputs.deb }}
|
|
|
|
build:
|
|
if: ${{ inputs.target != '' && inputs.arch != 'native' }}
|
|
needs: [version]
|
|
uses: ./.github/workflows/build_firmware.yml
|
|
with:
|
|
version: ${{ needs.version.outputs.long }}
|
|
pio_env: ${{ inputs.target }}
|
|
platform: ${{ inputs.arch }}
|
|
|
|
build-debian-src:
|
|
if: ${{ github.repository == 'meshtastic/firmware' && inputs.arch == 'native' }}
|
|
uses: ./.github/workflows/build_debian_src.yml
|
|
with:
|
|
series: UNRELEASED
|
|
build_location: local
|
|
secrets: inherit
|
|
|
|
package-pio-deps-native-tft:
|
|
if: ${{ inputs.arch == 'native' }}
|
|
uses: ./.github/workflows/package_pio_deps.yml
|
|
with:
|
|
pio_env: native-tft
|
|
secrets: inherit
|
|
|
|
test-native:
|
|
if: ${{ !contains(github.ref_name, 'event/') && github.event_name != 'workflow_dispatch' || !contains(github.ref_name, 'event/') && inputs.arch == 'native' && inputs.target != '' }}
|
|
uses: ./.github/workflows/test_native.yml
|
|
|
|
gather-artifacts:
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
runs-on: ubuntu-latest
|
|
needs: [version, build]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{github.event.pull_request.head.ref}}
|
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
path: ./
|
|
pattern: firmware-*-*
|
|
merge-multiple: true
|
|
|
|
- name: Display structure of downloaded files
|
|
run: ls -R
|
|
|
|
- name: Move files up
|
|
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
|
|
|
- name: Repackage in single firmware zip
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: firmware-${{inputs.target}}-${{ needs.version.outputs.long }}
|
|
overwrite: true
|
|
path: |
|
|
./firmware-*.bin
|
|
./firmware-*.uf2
|
|
./firmware-*.hex
|
|
./firmware-*-ota.zip
|
|
./device-*.sh
|
|
./device-*.bat
|
|
./littlefs-*.bin
|
|
./bleota*bin
|
|
./Meshtastic_nRF52_factory_erase*.uf2
|
|
retention-days: 30
|
|
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
pattern: firmware-*-${{ needs.version.outputs.long }}
|
|
merge-multiple: true
|
|
path: ./output
|
|
|
|
# For diagnostics
|
|
- name: Show artifacts
|
|
run: ls -lR
|
|
|
|
- name: Device scripts permissions
|
|
run: |
|
|
chmod +x ./output/device-install.sh
|
|
chmod +x ./output/device-update.sh
|
|
|
|
- name: Zip firmware
|
|
run: zip -j -9 -r ./firmware-${{inputs.target}}-${{ needs.version.outputs.long }}.zip ./output
|
|
|
|
- name: Repackage in single elfs zip
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: debug-elfs-${{inputs.target}}-${{ needs.version.outputs.long }}.zip
|
|
overwrite: true
|
|
path: ./*.elf
|
|
retention-days: 30
|
|
|
|
- uses: scruplelesswizard/comment-artifact@main
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
with:
|
|
name: firmware-${{inputs.target}}-${{ needs.version.outputs.long }}
|
|
description: "Download firmware-${{inputs.target}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|