Skip to content

Commit

Permalink
Merge branch 'master' into mymesh-682133501ab9b979906e603f3d9df60a331…
Browse files Browse the repository at this point in the history
…f4df5
  • Loading branch information
panaceya authored Sep 24, 2024
2 parents 6821335 + 5dcb8df commit 2cef47b
Show file tree
Hide file tree
Showing 12 changed files with 191 additions and 8 deletions.
43 changes: 42 additions & 1 deletion .github/actions/setup-base/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ runs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Testing userPrefs.h
shell: bash
run: |
echo $USER_PREFS
env:
USER_PREFS: ${{ inputs.USER_PREFS }}
if: ${{ env.USER_PREFS != '' }}

- name: Getting custom userPrefs.h
uses: mobiledevops/secret-to-file-action@v1
env:
USER_PREFS: ${{ inputs.USER_PREFS }}
if: ${{ inputs.USER_PREFS != '' }}
with:
base64-encoded-secret: ${{ inputs.USER_PREFS }}
filename: "userPrefs.h"

- name: Install dependencies
shell: bash
run: |
Expand All @@ -28,11 +45,35 @@ runs:
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip

- name: Create virtualenv
shell: bash
run: |
python3 -m venv ".venv"
- name: Activate virtualenv
shell: bash
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
- name: Create virtualenv
shell: bash
run: |
python3 -m venv ".venv"
- name: Activate virtualenv
shell: bash
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -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
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build_esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- 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
id: build
uses: ./.github/actions/build-variant
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_esp32_c3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- name: Build ESP32-C3
id: build
uses: ./.github/actions/build-variant
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_esp32_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- name: Build ESP32-S3
id: build
uses: ./.github/actions/build-variant
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/build_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,31 @@ jobs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Getting custom userPrefs.h
uses: mobiledevops/secret-to-file-action@v1
env:
USER_PREFS: ${{ inputs.USER_PREFS }}
if: ${{ inputs.USER_PREFS != '' }}
with:
base64-encoded-secret: ${{ inputs.USER_PREFS }}
filename: "userPrefs.h"

- name: Create virtualenv
shell: bash
run: |
python3 -m venv ".venv"
- name: Activate virtualenv
shell: bash
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip install -U platformio adafruit-nrfutil
pip install -U meshtastic --pre
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_nrf52.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- name: Build NRF52
id: build
uses: ./.github/actions/build-variant
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/build_raspbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,26 @@ jobs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Getting userPrefs.h
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.USER_PREFS }}
filename: "userPrefs.h"

- name: Create virtualenv
run: |
python3 -m venv ".venv"
- name: Activate virtualenv
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip install -U platformio adafruit-nrfutil
pip install -U meshtastic --pre
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/build_raspbian_armv7l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,26 @@ jobs:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Getting userPrefs.h
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.USER_PREFS }}
filename: "userPrefs.h"

- name: Create virtualenv
run: |
python3 -m venv ".venv"
- name: Activate virtualenv
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip install -U platformio adafruit-nrfutil
pip install -U meshtastic --pre
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_rpi2040.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- name: Build Raspberry Pi 2040
id: build
uses: ./.github/actions/build-variant
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_stm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build base
id: base
uses: ./.github/actions/setup-base
with:
USER_PREFS: ${{ secrets.USER_PREFS }}

- name: Build Raspberry Pi 2040
id: build
uses: ./.github/actions/build-variant
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/main_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ name: CI
on:
# # Triggers the workflow on push but only for the master branch
push:
branches: [master, develop]
branches:
- master
- develop
- mymesh
paths-ignore:
- "**.md"
- version.properties

# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
pull_request_target:
branches: [master, develop]
branches:
- master
- develop
- mymesh
paths-ignore:
- "**.md"
#- "**.yml"
Expand All @@ -30,6 +36,24 @@ jobs:
- id: checkout
uses: actions/checkout@v4
name: Checkout base

- name: Getting userPrefs.h
uses: mobiledevops/secret-to-file-action@v1
env:
USER_PREFS: ${{ secrets.USER_PREFS }}
if: ${{ env.USER_PREFS != '' }}
with:
base64-encoded-secret: ${{ secrets.USER_PREFS }}
filename: "userPrefs.h"

- name: Testing userPrefs.h
shell: bash
run: |
echo $USER_PREFS
env:
USER_PREFS: ${{ secrets.USER_PREFS }}
if: ${{ env.USER_PREFS != '' }}

- id: jsonStep
run: |
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
Expand Down Expand Up @@ -65,6 +89,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
uses: ./.github/workflows/build_esp32.yml
secrets: inherit
with:
board: ${{ matrix.board }}

Expand All @@ -74,6 +99,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
uses: ./.github/workflows/build_esp32_s3.yml
secrets: inherit
with:
board: ${{ matrix.board }}

Expand All @@ -83,6 +109,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
uses: ./.github/workflows/build_esp32_c3.yml
secrets: inherit
with:
board: ${{ matrix.board }}

Expand All @@ -92,6 +119,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
uses: ./.github/workflows/build_nrf52.yml
secrets: inherit
with:
board: ${{ matrix.board }}

Expand All @@ -101,6 +129,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
uses: ./.github/workflows/build_rpi2040.yml
secrets: inherit
with:
board: ${{ matrix.board }}

Expand All @@ -110,17 +139,20 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
uses: ./.github/workflows/build_stm32.yml
secrets: inherit
with:
board: ${{ matrix.board }}

package-raspbian:
uses: ./.github/workflows/package_raspbian.yml
secrets: inherit

package-raspbian-armv7l:
uses: ./.github/workflows/package_raspbian_armv7l.yml

package-native:
uses: ./.github/workflows/package_amd64.yml
secrets: inherit

after-checks:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip install -U platformio adafruit-nrfutil
pip install -U meshtastic --pre
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
python3 -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
Expand Down

0 comments on commit 2cef47b

Please sign in to comment.