Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vidplace7 committed Sep 19, 2024
1 parent f9b417b commit c6cdaf8
Show file tree
Hide file tree
Showing 7 changed files with 635 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
50 changes: 50 additions & 0 deletions .github/workflows/actions/setup-base/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Setup Build Base Composite Action"
description: "Base build actions for Meshtastic Platform IO steps"

runs:
using: "composite"
steps:
- name: Checkout meshtastic firmware
uses: actions/checkout@v4
with:
repository: meshtastic/firmware
ref: master
submodules: recursive
- name: Checkout this repo to .custom
uses: actions/checkout@v4
with:
path: .custom
- name: Move contents of .custom to root
run: rsync .custom/* . && rm -rf .custom

- name: Install dependencies
shell: bash
run: |
sudo apt-get -y update --fix-missing
sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

# - name: Cache python libs
# uses: actions/cache@v4
# id: cache-pip # needed in if test
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip

- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
pip install -U --no-build-isolation --no-cache-dir "setuptools<72"
pip install -U platformio adafruit-nrfutil --no-build-isolation
pip install -U poetry --no-build-isolation
pip install -U meshtastic --pre --no-build-isolation
- name: Upgrade platformio
shell: bash
run: |
pio upgrade
73 changes: 73 additions & 0 deletions .github/workflows/build_esp32_s3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build ESP32-S3

on:
workflow_call:
inputs:
board:
required: true
type: string

jobs:
build-esp32-s3:
runs-on: ubuntu-latest
steps:
- name: Checkout meshtastic firmware
uses: actions/checkout@v4
with:
repository: meshtastic/firmware
ref: master
submodules: recursive
- name: Checkout this repo to .custom
uses: actions/checkout@v4
with:
path: .custom
- name: Move contents of .custom to root
run: rsync .custom/* . && rm -rf .custom

- name: Build base
id: base
uses: ./.github/actions/setup-base

- name: Pull web ui
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: meshtastic/web
file: build.tar
target: build.tar
token: ${{ secrets.GITHUB_TOKEN }}

- name: Unpack web ui
run: |
tar -xf build.tar -C data/static
rm build.tar
- name: Remove debug flags for release
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32c3.ini
- name: Build ESP32
run: bin/build-esp32.sh ${{ inputs.board }}

- name: Pull OTA Firmware
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: meshtastic/firmware-ota
file: firmware-s3.bin
target: release/bleota-s3.bin
token: ${{ secrets.GITHUB_TOKEN }}

- name: Get release version string
shell: bash
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version

- name: Store binaries as an artifact
uses: actions/upload-artifact@v4
with:
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
overwrite: true
path: |
release/*.bin
release/*.elf
Loading

0 comments on commit c6cdaf8

Please sign in to comment.