PR Check All envs on Dispatch #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: PR Check All envs on Dispatch | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: "Pull Request Number" | |
| type: string | |
| required: true | |
| jobs: | |
| compile_sketch: | |
| name: Build ${{ matrix.board.env }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| board: | |
| - { env: "m5stack-cardputer", family: "ESP32-S3",} | |
| - { env: "m5stack-cplus2", family: "ESP32",} | |
| - { env: "m5stack-cplus1_1", family: "ESP32",} | |
| - { env: "LAUNCHER_m5stack-cplus1_1", family: "ESP32",} | |
| - { env: "m5stack-core2", family: "ESP32",} | |
| - { env: "m5stack-core16mb", family: "ESP32",} | |
| - { env: "m5stack-core4mb", family: "ESP32",} | |
| - { env: "m5stack-cores3", family: "ESP32-S3",} | |
| - { env: "esp32-s3-devkitc-1", family: "ESP32-S3",} | |
| - { env: "esp32-c5", family: "ESP32-C5",} | |
| - { env: "CYD-2432S028", family: "ESP32",} | |
| - { env: "CYD-2USB", family: "ESP32",} | |
| - { env: "CYD-2432W328C", family: "ESP32",} | |
| - { env: "CYD-2432W328C_2", family: "ESP32",} | |
| - { env: "CYD-2432W328R-or-S024R", family: "ESP32",} | |
| - { env: "LAUNCHER_CYD-2432W328R-or-S024R", family: "ESP32",} | |
| - { env: "LAUNCHER_CYD-2432S028", family: "ESP32",} | |
| - { env: "LAUNCHER_CYD-2USB", family: "ESP32",} | |
| - { env: "LAUNCHER_CYD-2432W328C", family: "ESP32",} | |
| - { env: "lilygo-t-embed-cc1101", family: "ESP32-S3",} | |
| - { env: "lilygo-t-embed", family: "ESP32-S3",} | |
| - { env: "lilygo-t-deck", family: "ESP32-S3",} | |
| - { env: "lilygo-t-watch-s3", family: "ESP32-S3",} | |
| - { env: "lilygo-t-deck-pro", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-s3", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-s3-touch", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-s3-mmc", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-s3-touch-mmc", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-S3-pro", family: "ESP32-S3",} | |
| - { env: "lilygo-t-display-ttgo", family: "ESP32",} | |
| - { env: "lilygo-t-hmi", family: "ESP32-S3",} | |
| - { env: "lilygo-t-lora-pager", family: "ESP32-S3",} | |
| - { env: "smoochiee-board", family: "ESP32-S3",} | |
| - { env: "Phantom_S024R", family: "ESP32",} | |
| - { env: "LAUNCHER_Phantom_S024R", family: "ESP32",} | |
| - { env: "Marauder-Mini", family: "ESP32",} | |
| - { env: "LAUNCHER_Marauder-Mini", family: "ESP32",} | |
| - { env: "Awok-Mini", family: "ESP32",} | |
| - { env: "Marauder-v7", family: "ESP32",} | |
| - { env: "LAUNCHER_Marauder-v7", family: "ESP32",} | |
| - { env: "Marauder-V4-V6", family: "ESP32",} | |
| - { env: "Marauder-v61", family: "ESP32",} | |
| - { env: "LAUNCHER_Marauder-V4-V6", family: "ESP32",} | |
| - { env: "LAUNCHER_Marauder-v61", family: "ESP32",} | |
| - { env: "Awok-Touch", family: "ESP32",} | |
| - { env: "WaveSentry-R1", family: "ESP32",} | |
| - { env: "LAUNCHER_WaveSentry-R1", family: "ESP32",} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: refs/pull/${{ github.event.inputs.pr_number }}/merge | |
| - id: build | |
| name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| # - name: Cache pip | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: ~/.cache/pip | |
| # key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-pip- | |
| # - name: Cache PlatformIO | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: | | |
| # ~/.platformio | |
| # key: Bruce-platformio-${{ hashFiles('**/platformio.ini') }} | |
| # restore-keys: Bruce-platformio- | |
| # - name: Restore PIO | |
| # uses: actions/cache/restore@v4 | |
| # with: | |
| # path: | | |
| # ${{ github.workspace }}/.pio | |
| # key: Bruce-pio-${{ matrix.board.env }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| # restore-keys: | | |
| # Bruce-pio-${{ matrix.board.env }}- | |
| - name: Install PlatformIO Core | |
| run: | | |
| pip install platformio requests esptool intelhex | |
| if [[ "${{ github.ref_type }}" == "tag" ]]; then | |
| version=${{ github.ref_name }} | |
| else | |
| version="${GITHUB_SHA::7}" | |
| fi | |
| sed -i "s/-DBRUCE_VERSION=/-DBRUCE_VERSION='\"$version\"' ; /g" ./platformio.ini | |
| sed -i "s/-DGIT_COMMIT_HASH='\"Homebrew\"'/\!echo '-DGIT_COMMIT_HASH=\\\\\\\\\"'\$\(git describe --always --dirty)'\\\\\\\\\"'/g" ./platformio.ini | |
| cat ./platformio.ini | |
| - name: Run Compile | |
| run: | | |
| platformio run -e ${{ matrix.board.env }} | |
| # - name: Cache PIO | |
| # uses: actions/cache/save@v4 | |
| # with: | |
| # path: | | |
| # ${{ github.workspace }}/.pio | |
| # key: Bruce-pio-${{ matrix.board.env }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| # - name: Merge Files | |
| # run: | | |
| # pio run -e ${{ matrix.board.env }} -t build-firmware | |
| - name: Upload ${{ matrix.board.env }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Bruce-${{ matrix.board.env }} | |
| path: Bruce-*.bin | |
| retention-days: 5 | |
| if-no-files-found: error |