|
| 1 | +name: Nightly container builds for selected targets |
| 2 | + |
| 3 | +on: |
| 4 | + # pull_request: |
| 5 | + schedule: |
| 6 | + - cron: '0 3 * * *' # Runs at 03:00 UTC every day |
| 7 | + |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-target: |
| 11 | + strategy: |
| 12 | + fail-fast: false # Continues to build other targets in the matrix, even if one fails. |
| 13 | + |
| 14 | + matrix: # Add the target and build type you wish to generate firmware for: |
| 15 | + include: [ |
| 16 | + { target: SL_STK3701A, build-type: MinSizeRel, container: AzureRTOS}, |
| 17 | + { target: MXCHIP_AZ3166, build-type: MinSizeRel, container: ChibiOS }, |
| 18 | + { target: ST_STM32F769I_DISCOVERY, build-type: MinSizeRel, container: ChibiOS }, |
| 19 | + { target: ORGPAL_PALTHREE, build-type: MinSizeRel, container: ChibiOS }, |
| 20 | + { target: ORGPAL_PALX, build-type: MinSizeRel, container: ChibiOS }, |
| 21 | + { target: ST_NUCLEO64_F091RC, build-type: MinSizeRel, container: ChibiOS }, |
| 22 | + { target: M5Core2, build-type: MinSizeRel, container: ESP32 }, |
| 23 | + { target: ESP_WROVER_KIT, build-type: MinSizeRel, container: ESP32 }, |
| 24 | + { target: ESP32_S2_USB, build-type: MinSizeRel, container: ESP32 }, |
| 25 | + { target: ESP32_S3, build-type: MinSizeRel, container: ESP32 }, |
| 26 | + { target: ESP32_C3, build-type: MinSizeRel, container: ESP32 }, |
| 27 | + { target: ESP32_C6_THREAD, build-type: MinSizeRel, container: ESP32 }, |
| 28 | + { target: ESP32_H2_THREAD, build-type: MinSizeRel, container: ESP32 }, |
| 29 | + { target: NXP_MIMXRT1060_EVK, build-type: MinSizeRel, container: FreeRTOS-NXP }, |
| 30 | + { target: TI_CC1352R1_LAUNCHXL, build-type: MinSizeRel, container: TI, radio-freq: 915 }, |
| 31 | + ] |
| 32 | + |
| 33 | + runs-on: ubuntu-latest |
| 34 | + permissions: |
| 35 | + contents: read |
| 36 | + |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v5 |
| 39 | + with: |
| 40 | + submodules: true |
| 41 | + |
| 42 | + - name: Free Disk Space (Ubuntu) |
| 43 | + uses: jlumbroso/free-disk-space@main |
| 44 | + with: |
| 45 | + # this might remove tools that are actually needed, |
| 46 | + # when set to "true" but frees about 6 GB |
| 47 | + tool-cache: true |
| 48 | + large-packages: false |
| 49 | + |
| 50 | + - name: Update repo submodules |
| 51 | + run: | |
| 52 | + git submodule update --init |
| 53 | +
|
| 54 | + - name: Adjust config templates for a devcontainer |
| 55 | + run: | |
| 56 | + # Move into the config directory |
| 57 | + pushd config |
| 58 | +
|
| 59 | + # Rename the templates |
| 60 | + mv user-prefs.TEMPLATE.json user-prefs.json |
| 61 | + mv user-tools-repos.TEMPLATE.json user-tools-repos.json |
| 62 | +
|
| 63 | + # Adjust the file content for a valid radio frequency (TI targets) |
| 64 | + sed -i -- 's|"RADIO_FREQUENCY": "CHANGE_ME_TO_A_VALID_VALUE_868_OR_915"|"RADIO_FREQUENCY": "${{ matrix.radio-freq }}"|g' user-prefs.json |
| 65 | +
|
| 66 | + # Adjust the file content for a devcontainer |
| 67 | + sed -i -- 's|"name": "user-tools-repos-container"|"name": "user-tools-repos"|g' user-tools-repos.json |
| 68 | +
|
| 69 | + # Move out of the config directory |
| 70 | + popd |
| 71 | +
|
| 72 | + - name: Adjust devcontainer.json for ${{ matrix.container }} source |
| 73 | + run: | |
| 74 | + # Move into the .devcontainer directory |
| 75 | + pushd .devcontainer/${{ matrix.container }} |
| 76 | +
|
| 77 | + # Target the dockerfile source. |
| 78 | + sed -i -- 's|"dockerFile": "Dockerfile.${{ matrix.container }}"|"dockerFile": "Dockerfile.${{ matrix.container }}.SRC"|g' devcontainer.json |
| 79 | +
|
| 80 | + # Move out of the .devcontainer directory |
| 81 | + popd |
| 82 | +
|
| 83 | + - name: Build ${{ matrix.target }} ${{ matrix.build-type }} Firmware |
| 84 | + uses: devcontainers/[email protected] |
| 85 | + with: |
| 86 | + configFile: ./.devcontainer/${{ matrix.container }}/devcontainer.json |
| 87 | + push: never |
| 88 | + runCmd: | |
| 89 | + # Build target: |
| 90 | + cmake --preset=${{ matrix.target }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} |
| 91 | + cmake --build build |
0 commit comments