|
1 | 1 | name: HyperSerialPico CI Build |
2 | 2 |
|
3 | | -on: [push] |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "**" # Runs on push to any branch |
4 | 7 |
|
5 | 8 | jobs: |
6 | | - |
7 | | -########################### |
8 | | -#### HyperSerialPico ###### |
9 | | -########################### |
| 9 | + ########################### |
| 10 | + #### HyperSerialPico ###### |
| 11 | + ########################### |
10 | 12 |
|
11 | 13 | HyperSerialPico: |
12 | 14 | runs-on: ubuntu-22.04 |
13 | 15 |
|
14 | 16 | steps: |
15 | | - |
16 | | - with: |
17 | | - submodules: recursive |
18 | | - |
19 | | - - name: Install GNU Arm Embedded Toolchain |
20 | | - uses: carlosperate/arm-none-eabi-gcc-action@v1 |
21 | | - with: |
22 | | - release: '12.2.Rel1' |
23 | | - |
24 | | - - name: Build packages |
25 | | - shell: bash |
26 | | - run: | |
27 | | - mkdir build |
28 | | - cd build |
29 | | - cmake .. |
30 | | - cmake --build . --config Release |
31 | | -
|
32 | | - |
33 | | - name: Upload artifacts (commit) |
34 | | - if: (startsWith(github.event.ref, 'refs/tags') != true) |
35 | | - with: |
36 | | - path: | |
37 | | - firmware/*.uf2 |
38 | | -
|
39 | | - |
40 | | - name: Upload artifacts (release) |
41 | | - if: startsWith(github.ref, 'refs/tags/') |
42 | | - with: |
43 | | - name: firmware-release-generic |
44 | | - path: | |
45 | | - firmware/*.uf2 |
46 | | -
|
47 | | - - name: Build packages for Adafruit Feather RP2040 Scorpio (release-only) |
48 | | - if: startsWith(github.ref, 'refs/tags/') |
49 | | - shell: bash |
50 | | - run: | |
51 | | - cd build |
52 | | - rm *.* |
53 | | - rm ../firmware/* |
54 | | - echo "Neopixel is using GPIO16(OUTPUT_DATA_PIN) on output 0." > ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt |
55 | | - echo "SPI is using spi0 interface pins: GPIO19(OUTPUT_SPI_DATA_PIN) and GPIO18(OUTPUT_SPI_CLOCK_PIN) on output 3 and 2 respectively." >> ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt |
56 | | - cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=16 -DOVERRIDE_SPI_DATA_PIN=19 -DOVERRIDE_SPI_CLOCK_PIN=18 -DCMAKE_BUILD_TYPE=Release .. |
57 | | - cmake --build . |
58 | | - zip -j ../firmware/Adafruit_Feather_RP2040_Scorpio.zip ../firmware/* |
59 | | -
|
60 | | - |
61 | | - name: Upload artifacts (release Adafruit_Feather) |
62 | | - if: startsWith(github.ref, 'refs/tags/') |
63 | | - with: |
64 | | - name: firmware-release-adafruit-scorpio |
65 | | - path: | |
66 | | - firmware/*.zip |
67 | | -
|
68 | | - - name: Build packages for Adafruit ItsyBitsy RP2040 (release-only) |
69 | | - if: startsWith(github.ref, 'refs/tags/') |
70 | | - shell: bash |
71 | | - run: | |
72 | | - cd build |
73 | | - rm *.* |
74 | | - rm ../firmware/* |
75 | | - echo "Neopixel is using GPIO14(OUTPUT_DATA_PIN) on output 5." > ../firmware/Firmwares_for_Adafruit_ItsyBitsy_2040.txt |
76 | | - cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=14 -DCMAKE_BUILD_TYPE=Release .. |
77 | | - cmake --build . |
78 | | - rm ../firmware/*_Spi.uf2 |
79 | | - zip -j ../firmware/Adafruit_ItsyBitsy_2040.zip ../firmware/* |
80 | | -
|
81 | | - |
82 | | - name: Upload artifacts (release Adafruit_ItsyBitsy) |
83 | | - if: startsWith(github.ref, 'refs/tags/') |
84 | | - with: |
85 | | - name: firmware-release-adafruit-itsybitsy |
86 | | - path: | |
87 | | - firmware/*.zip |
88 | | -
|
89 | | - - name: Build packages for Pimoroni Plasma Stick 2040 W (release-only) |
90 | | - if: startsWith(github.ref, 'refs/tags/') |
91 | | - shell: bash |
92 | | - run: | |
93 | | - cd build |
94 | | - rm *.* |
95 | | - rm ../firmware/* |
96 | | - echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output PIXELS." > ../firmware/Firmwares_for_Pimoroni_Plasma_Stick_2040_W.txt |
97 | | - cmake -DOVERRIDE_DATA_PIN=15 -DCMAKE_BUILD_TYPE=Release .. |
98 | | - cmake --build . |
99 | | - rm ../firmware/*_Spi.uf2 |
100 | | - zip -j ../firmware/Pimoroni_Plasma_Stick_2040_W.zip ../firmware/* |
101 | | -
|
102 | | - |
103 | | - name: Upload artifacts (release Pimoroni_Plasma_Stick_W) |
104 | | - if: startsWith(github.ref, 'refs/tags/') |
105 | | - with: |
106 | | - name: firmware-release-pimoroni-plasma-stick |
107 | | - path: | |
108 | | - firmware/*.zip |
109 | | -
|
110 | | - - name: Build packages for Pimoroni Plasma 2040 (release-only) |
111 | | - if: startsWith(github.ref, 'refs/tags/') |
112 | | - shell: bash |
113 | | - run: | |
114 | | - cd build |
115 | | - rm *.* |
116 | | - rm ../firmware/* |
117 | | - echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output DA." > ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt |
118 | | - echo "SPI is using spi1 interface pins: GPIO15(OUTPUT_SPI_DATA_PIN) and GPIO14(OUTPUT_SPI_CLOCK_PIN) on output DA and CL respectively." >> ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt |
119 | | - cmake -DOVERRIDE_DATA_PIN=15 -DOVERRIDE_SPI_INTERFACE=spi1 -DOVERRIDE_SPI_DATA_PIN=15 -DOVERRIDE_SPI_CLOCK_PIN=14 -DCMAKE_BUILD_TYPE=Release .. |
120 | | - cmake --build . |
121 | | - zip -j ../firmware/Pimoroni_Plasma_2040.zip ../firmware/* |
122 | | -
|
123 | | - |
124 | | - name: Upload artifacts (release Pimoroni_Plasma) |
125 | | - if: startsWith(github.ref, 'refs/tags/') |
126 | | - with: |
127 | | - name: firmware-release-pimoroni-plasma |
128 | | - path: | |
129 | | - firmware/*.zip |
130 | | -
|
131 | | -################################ |
132 | | -###### Publish Releases ######## |
133 | | -################################ |
| 17 | + |
| 18 | + with: |
| 19 | + submodules: recursive |
| 20 | + |
| 21 | + - name: Install GNU Arm Embedded Toolchain |
| 22 | + uses: carlosperate/arm-none-eabi-gcc-action@v1 |
| 23 | + with: |
| 24 | + release: "12.2.Rel1" |
| 25 | + |
| 26 | + - name: Build packages |
| 27 | + shell: bash |
| 28 | + run: | |
| 29 | + mkdir build |
| 30 | + cd build |
| 31 | + cmake .. |
| 32 | + cmake --build . --config Release |
| 33 | +
|
| 34 | + |
| 35 | + name: Upload artifacts (commit) |
| 36 | + if: (startsWith(github.event.ref, 'refs/tags') != true) |
| 37 | + with: |
| 38 | + path: | |
| 39 | + firmware/*.uf2 |
| 40 | +
|
| 41 | + |
| 42 | + name: Upload artifacts (release) |
| 43 | + if: startsWith(github.ref, 'refs/tags/') |
| 44 | + with: |
| 45 | + name: firmware-release-generic |
| 46 | + path: | |
| 47 | + firmware/*.uf2 |
| 48 | +
|
| 49 | + - name: Build packages for Adafruit Feather RP2040 Scorpio (release-only) |
| 50 | + if: startsWith(github.ref, 'refs/tags/') |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + cd build |
| 54 | + rm *.* |
| 55 | + rm ../firmware/* |
| 56 | + echo "Neopixel is using GPIO16(OUTPUT_DATA_PIN) on output 0." > ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt |
| 57 | + echo "SPI is using spi0 interface pins: GPIO19(OUTPUT_SPI_DATA_PIN) and GPIO18(OUTPUT_SPI_CLOCK_PIN) on output 3 and 2 respectively." >> ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt |
| 58 | + cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=16 -DOVERRIDE_SPI_DATA_PIN=19 -DOVERRIDE_SPI_CLOCK_PIN=18 -DCMAKE_BUILD_TYPE=Release .. |
| 59 | + cmake --build . |
| 60 | + zip -j ../firmware/Adafruit_Feather_RP2040_Scorpio.zip ../firmware/* |
| 61 | +
|
| 62 | + |
| 63 | + name: Upload artifacts (release Adafruit_Feather) |
| 64 | + if: startsWith(github.ref, 'refs/tags/') |
| 65 | + with: |
| 66 | + name: firmware-release-adafruit-scorpio |
| 67 | + path: | |
| 68 | + firmware/*.zip |
| 69 | +
|
| 70 | + # - name: Build packages for Adafruit ItsyBitsy RP2040 (release-only) |
| 71 | + # if: startsWith(github.ref, 'refs/tags/') |
| 72 | + # shell: bash |
| 73 | + # run: | |
| 74 | + # cd build |
| 75 | + # rm *.* |
| 76 | + # rm ../firmware/* |
| 77 | + # echo "Neopixel is using GPIO14(OUTPUT_DATA_PIN) on output 5." > ../firmware/Firmwares_for_Adafruit_ItsyBitsy_2040.txt |
| 78 | + # cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=14 -DCMAKE_BUILD_TYPE=Release .. |
| 79 | + # cmake --build . |
| 80 | + # rm ../firmware/*_Spi.uf2 |
| 81 | + # zip -j ../firmware/Adafruit_ItsyBitsy_2040.zip ../firmware/* |
| 82 | + |
| 83 | + # - uses: actions/[email protected] |
| 84 | + # name: Upload artifacts (release Adafruit_ItsyBitsy) |
| 85 | + # if: startsWith(github.ref, 'refs/tags/') |
| 86 | + # with: |
| 87 | + # name: firmware-release-adafruit-itsybitsy |
| 88 | + # path: | |
| 89 | + # firmware/*.zip |
| 90 | + |
| 91 | + # - name: Build packages for Pimoroni Plasma Stick 2040 W (release-only) |
| 92 | + # if: startsWith(github.ref, 'refs/tags/') |
| 93 | + # shell: bash |
| 94 | + # run: | |
| 95 | + # cd build |
| 96 | + # rm *.* |
| 97 | + # rm ../firmware/* |
| 98 | + # echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output PIXELS." > ../firmware/Firmwares_for_Pimoroni_Plasma_Stick_2040_W.txt |
| 99 | + # cmake -DOVERRIDE_DATA_PIN=15 -DCMAKE_BUILD_TYPE=Release .. |
| 100 | + # cmake --build . |
| 101 | + # rm ../firmware/*_Spi.uf2 |
| 102 | + # zip -j ../firmware/Pimoroni_Plasma_Stick_2040_W.zip ../firmware/* |
| 103 | + |
| 104 | + # - uses: actions/[email protected] |
| 105 | + # name: Upload artifacts (release Pimoroni_Plasma_Stick_W) |
| 106 | + # if: startsWith(github.ref, 'refs/tags/') |
| 107 | + # with: |
| 108 | + # name: firmware-release-pimoroni-plasma-stick |
| 109 | + # path: | |
| 110 | + # firmware/*.zip |
| 111 | + |
| 112 | + # - name: Build packages for Pimoroni Plasma 2040 (release-only) |
| 113 | + # if: startsWith(github.ref, 'refs/tags/') |
| 114 | + # shell: bash |
| 115 | + # run: | |
| 116 | + # cd build |
| 117 | + # rm *.* |
| 118 | + # rm ../firmware/* |
| 119 | + # echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output DA." > ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt |
| 120 | + # echo "SPI is using spi1 interface pins: GPIO15(OUTPUT_SPI_DATA_PIN) and GPIO14(OUTPUT_SPI_CLOCK_PIN) on output DA and CL respectively." >> ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt |
| 121 | + # cmake -DOVERRIDE_DATA_PIN=15 -DOVERRIDE_SPI_INTERFACE=spi1 -DOVERRIDE_SPI_DATA_PIN=15 -DOVERRIDE_SPI_CLOCK_PIN=14 -DCMAKE_BUILD_TYPE=Release .. |
| 122 | + # cmake --build . |
| 123 | + # zip -j ../firmware/Pimoroni_Plasma_2040.zip ../firmware/* |
| 124 | + |
| 125 | + # - uses: actions/[email protected] |
| 126 | + # name: Upload artifacts (release Pimoroni_Plasma) |
| 127 | + # if: startsWith(github.ref, 'refs/tags/') |
| 128 | + # with: |
| 129 | + # name: firmware-release-pimoroni-plasma |
| 130 | + # path: | |
| 131 | + # firmware/*.zip |
| 132 | + |
| 133 | + ################################ |
| 134 | + ###### Publish Releases ######## |
| 135 | + ################################ |
134 | 136 |
|
135 | 137 | publish: |
136 | 138 | name: Publish Releases |
|
0 commit comments