-
Notifications
You must be signed in to change notification settings - Fork 657
130 lines (117 loc) · 3.95 KB
/
Copy pathcmake.yml
File metadata and controls
130 lines (117 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# pull_request_target:
# branches: [ "main" ]
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
call-node-workflow:
uses: ./.github/workflows/node.js.yml
build:
needs: call-node-workflow
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
strategy:
matrix:
GP2040_BOARDCONFIG:
[ARCController,
Blank,
Pico,
PicoW,
BentoBox,
DuelPadZen,
FlatboxRev4,
FlatboxRev5,
FlatboxRev5RGB,
FlatboxRev5USBPassthrough,
FlatboxRev5Southpaw,
Granola,
KB2040,
KeyboardConverter,
Haute42COSMOX,
Haute42COSMOXMLite,
Haute42COSMOXMUltra,
Haute42COSMOXXAnalog,
Liatris,
MavercadeRev1,
MavercadeRev2,
MiSTercadeV2,
OpenCore0,
OpenCore0MIXUP,
OpenCore0WASD,
OSUMGP-RP2040,
PicoAnn,
PicoFightingBoard,
PXPGamepad,
ReflexCtrlGenesis6,
ReflexCtrlNES,
ReflexCtrlSaturn,
ReflexCtrlSNES,
ReflexCtrlVB,
ReflexEncodeV1.2,
ReflexEncodeV2.0,
RP2040AdvancedBreakoutBoard,
RP2040AdvancedBreakoutBoardUSBPassthrough,
RP2040MiniBreakoutBoard,
RP2040MiniBreakoutBoardUSBPassthrough,
SeeedXIAORP2040,
SparkFunProMicro,
WaveshareZero,
Stress,
SGFDevices,
ZeroRhythm]
steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.17.x'
- name: Verify cmake
run: cmake --version
#Global Setup
- name: Checkout GP2040-CE
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
fetch-tags: true
- name: Setup SDK pipeline
uses: Fortinbra/RaspberryPiPicoBuild@v6
- name: Download a Build Artifact
uses: actions/download-artifact@v4.1.2
with:
name: fsData
path: ${{github.workspace}}/lib/httpd/
- name: Get core count
id: core_count
run : cat /proc/cpuinfo | grep processor | wc -l
#End Global Setup
- name: Pico Build Configure CMake
shell: bash
if: ${{ matrix.GP2040_BOARDCONFIG != 'PicoW'}}
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: PicoW Build Configure CMake
shell: bash
if: ${{ matrix.GP2040_BOARDCONFIG == 'PicoW'}}
run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=pico_w
- name: Pico Build
shell: bash
run: GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{steps.core_count.outputs.output}}
- name: Upload Pico Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: GP2040-CE - ${{ matrix.GP2040_BOARDCONFIG }}
path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.uf2
if-no-files-found: error
- name: Upload .elf Artifact
if: ${{ matrix.GP2040_BOARDCONFIG == 'Pico'}}
uses: actions/upload-artifact@v4.3.1
with:
name: elf
path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.elf
if-no-files-found: error