|
5 | 5 | branches: [main] |
6 | 6 | release: |
7 | 7 | types: [published] |
| 8 | + workflow_dispatch: |
8 | 9 |
|
9 | 10 | jobs: |
10 | 11 | build: |
11 | 12 |
|
12 | 13 | runs-on: ubuntu-latest |
13 | 14 | continue-on-error: false |
14 | 15 |
|
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + build: |
| 19 | + - name: 'tinys3_test_stand' |
| 20 | + path: '.' |
| 21 | + target: esp32s3 |
| 22 | + command: | |
| 23 | + idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.test_stand" build |
| 24 | + - name: 'motorgo' |
| 25 | + path: '.' |
| 26 | + target: esp32s3 |
| 27 | + command: | |
| 28 | + idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.motorgo" build |
| 29 | +
|
15 | 30 | steps: |
16 | 31 | - name: Checkout repo |
17 | 32 | uses: actions/checkout@v4 |
18 | | - with: |
19 | | - submodules: 'recursive' |
20 | 33 |
|
21 | 34 | - name: Build Main Code |
22 | 35 | uses: espressif/esp-idf-ci-action@v1 |
23 | 36 | with: |
24 | | - esp_idf_version: release-v5.2 |
25 | | - target: esp32s3 |
26 | | - path: '.' |
27 | | - command: 'idf.py build' |
| 37 | + esp_idf_version: release-v5.4 |
| 38 | + target: ${{ matrix.build.target }} |
| 39 | + path: ${{ matrix.build.path }} |
| 40 | + command: ${{ matrix.build.command }} |
28 | 41 |
|
29 | 42 | - name: Upload Build Outputs |
30 | 43 | uses: actions/upload-artifact@v4 |
31 | 44 | with: |
32 | | - name: build-artifacts |
| 45 | + name: ${{ matrix.build.name }}-build-artifacts |
33 | 46 | path: | |
| 47 | + build/*.bin |
| 48 | + build/*.elf |
34 | 49 | build/bootloader/bootloader.bin |
35 | 50 | build/partition_table/partition-table.bin |
36 | | - build/bldc_test_stand.bin |
| 51 | + build/flasher_args.json |
37 | 52 | build/flash_args |
38 | 53 |
|
| 54 | + - name: Zip up files for upload to release |
| 55 | + if: ${{ github.event.release && github.event.action == 'published' }} |
| 56 | + shell: bash |
| 57 | + run: | |
| 58 | + cd build |
| 59 | + zip -r ../${{ matrix.build.name }}.zip *.bin *.elf bootloader/bootloader.bin partition_table/partition-table.bin flasher_args.json flash_args |
| 60 | + cd .. |
| 61 | +
|
39 | 62 | - name: Attach files to release |
40 | 63 | uses: softprops/action-gh-release@v2 |
41 | 64 | if: ${{ github.event.release && github.event.action == 'published' }} |
42 | 65 | with: |
43 | | - files: | |
44 | | - build/bldc_test_stand.bin |
45 | | - build/bootloader/bootloader.bin |
46 | | - build/partition_table/partition-table.bin |
47 | | - build/flash_args |
| 66 | + files: ${{ matrix.build.name }}.zip |
48 | 67 |
|
| 68 | + package: |
| 69 | + name: Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu) |
| 70 | + needs: build |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + os: [windows-latest, macos-latest, ubuntu-latest] |
| 74 | + build: ['tinys3_test_stand', 'motorgo'] |
| 75 | + runs-on: ${{ matrix.os }} |
| 76 | + steps: |
| 77 | + |
| 78 | + with: |
| 79 | + zipfile-name: ${{ matrix.build }}-build-artifacts |
| 80 | + programmer-name: 'software-defined-haptics-${{ matrix.build }}_programmer' |
0 commit comments