|
| 1 | +name: Reusable esp32c61-at workflow template |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + # parameters from upstream workflow |
| 6 | + inputs: |
| 7 | + module_name: |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + artifacts_name: |
| 11 | + required: true |
| 12 | + type: string |
| 13 | + enable_at_debug: |
| 14 | + required: false |
| 15 | + type: boolean |
| 16 | + # parameters from upstream inherit |
| 17 | + secrets: |
| 18 | + ESP32C61_4MB_TOKEN: |
| 19 | + required: false |
| 20 | + |
| 21 | +jobs: |
| 22 | + build-template-esp32c61: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + env: |
| 25 | + PLATFORM: PLATFORM_ESP32C61 |
| 26 | + MODULE_NAME: ${{ inputs.module_name }} |
| 27 | + SILENCE: 0 |
| 28 | + steps: |
| 29 | + |
| 30 | + |
| 31 | + with: |
| 32 | + python-version: '3.10' |
| 33 | + - name: Set up environment variables |
| 34 | + run: | |
| 35 | + source .github/workflows/utils.sh && setup_env_variables |
| 36 | + - name: Enable AT debug log |
| 37 | + if: ${{ inputs.enable_at_debug == true }} |
| 38 | + run: | |
| 39 | + source .github/workflows/utils.sh && enable_at_debug |
| 40 | + - name: Enlarge app partition size |
| 41 | + if: ${{ inputs.enable_at_debug == true }} |
| 42 | + run: | |
| 43 | + source .github/workflows/utils.sh && enlarge_app_partition |
| 44 | + - name: Set up OTA tokens |
| 45 | + run: | |
| 46 | + cd components/at/private_include |
| 47 | + rm -f at_ota_token.h |
| 48 | + echo -e "#pragma once" >> at_ota_token.h |
| 49 | + echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32C61_4MB \"${{ secrets.ESP32C61_4MB_TOKEN }}\"" >> at_ota_token.h |
| 50 | + echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C61_4MB \"${{ secrets.ESP32C61_4MB_TOKEN }}\"" >> at_ota_token.h |
| 51 | + cd - |
| 52 | + - name: Install compilation environment |
| 53 | + run: | |
| 54 | + ./build.py install |
| 55 | + - name: Compile |
| 56 | + run: | |
| 57 | + ./build.py build |
| 58 | + - name: Upload artifacts |
| 59 | + |
| 60 | + with: |
| 61 | + name: ${{ inputs.artifacts_name }} |
| 62 | + path: | |
| 63 | + sdkconfig |
| 64 | + build/*.bin |
| 65 | + build/*.elf |
| 66 | + build/*.map |
| 67 | + build/bootloader/*.bin |
| 68 | + build/partition_table/*.bin |
| 69 | + build/customized_partitions/* |
| 70 | + build/flasher_args.json |
| 71 | + build/project_description.json |
| 72 | + build/download.config |
| 73 | + build/factory/* |
0 commit comments