Skip to content

Commit 0495a9c

Browse files
authored
Release packages (#172)
1 parent d57ae99 commit 0495a9c

File tree

9 files changed

+99
-89
lines changed

9 files changed

+99
-89
lines changed

.github/workflows/linux_gcc_cmake_build.yml

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -53,78 +53,83 @@ jobs:
5353
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
5454
run: cmake --build . --target cppcheck_static_analysis
5555

56-
- name: Build
57-
# Linux has 2 cores
58-
run: |
59-
cmake --build --list-presets
60-
cmake --build --preset=${{env.BUILD_DEV_ALL_PRESET}} --parallel 2
61-
62-
- name: Test
56+
- name: Build Release
57+
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
6358
run: |
64-
ctest --preset=${{env.BUILD_DEV_ALL_PRESET}} --parallel 2
59+
cmake --build . --parallel 2 --config Release
6560
6661
- name: Bootstrap through CMake
6762
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
6863
run: |
69-
cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc
64+
cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release
7065
7166
- name: BuildExe IM example tiny-process-library
7267
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
7368
run: |
74-
cmake --build . --target run_buildexe_im_tpl_gcc_linux
69+
cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release
70+
71+
- name: CPack Release
72+
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
73+
run: |
74+
cpack -C Release -G ZIP
75+
76+
- name: Upload CPack
77+
uses: actions/upload-artifact@v2
78+
with:
79+
name: "BuildExe_Linux"
80+
path: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}/BuildCC-0.1.1-Linux.zip
7581

7682
- name: Install
7783
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
7884
run: |
79-
sudo cmake --install .
85+
sudo cmake --install . --config Release
8086
8187
- name: AfterInstall Example
8288
working-directory: ${{github.workspace}}/example/gcc/AfterInstall
8389
run: |
84-
cmake -B build -G Ninja
85-
cmake --build build --parallel 2
86-
cd build
87-
./build
90+
cmake -B build -G "Ninja Multi-Config"
91+
cmake --build build --parallel 2 --config Release
92+
./build/Release/build
8893
8994
- name: Hybrid Simple Example
9095
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
9196
run: |
92-
cmake --build . --target run_hybrid_simple_example_linux
97+
cmake --build . --target run_hybrid_simple_example_linux --config Release
9398
9499
- name: Hybrid Foolib Example
95100
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
96101
run: |
97-
cmake --build . --target run_hybrid_foolib_example_linux
102+
cmake --build . --target run_hybrid_foolib_example_linux --config Release
98103
99104
- name: Hybrid External Lib Example
100105
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
101106
run: |
102-
cmake --build . --target run_hybrid_externallib_example_linux
107+
cmake --build . --target run_hybrid_externallib_example_linux --config Release
103108
104109
- name: Hybrid Custom Target Example
105110
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
106111
run: |
107-
cmake --build . --target run_hybrid_customtarget_example_linux
112+
cmake --build . --target run_hybrid_customtarget_example_linux --config Release
108113
109114
- name: Hybrid Generic Target Example
110115
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
111116
run: |
112-
cmake --build . --target run_hybrid_generic_example
117+
cmake --build . --target run_hybrid_generic_example --config Release
113118
114119
- name: Hybrid PCH Target Example
115120
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
116121
run: |
117-
cmake --build . --target run_hybrid_pch_example_linux
122+
cmake --build . --target run_hybrid_pch_example_linux --config Release
118123
119124
- name: Hybrid Dep Chaining Target Example
120125
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
121126
run: |
122-
cmake --build . --target run_hybrid_depchaining_example_linux
127+
cmake --build . --target run_hybrid_depchaining_example_linux --config Release
123128
124129
- name: Hybrid Target Info Example
125130
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_ALL}}
126131
run: |
127-
cmake --build . --target run_hybrid_targetinfo_example_linux
132+
cmake --build . --target run_hybrid_targetinfo_example_linux --config Release
128133
129134
build_single:
130135
name: GCC single lib
@@ -167,93 +172,87 @@ jobs:
167172
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
168173
run: cmake --build . --target cppcheck_static_analysis
169174

170-
- name: Build
175+
- name: Build Debug for test
171176
# Linux has 2 cores
172177
run: |
173178
cmake --build --list-presets
174-
cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2
175-
176-
- name: Test
177-
run: |
178-
ctest --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2
179+
cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Debug
180+
ctest --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 -C Debug
179181
180-
- name: Coveralls
182+
- name: Codecov
181183
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
182184
run: |
183185
cmake --build . --target lcov_coverage
184186
cat ../codecov.yml | curl --data-binary @- https://codecov.io/validate
185187
bash <(curl -s https://codecov.io/bash) -f coverage_truncated.info || echo "Codecov did not collect coverage reports"
186188
189+
- name: Build Release for example
190+
run: |
191+
cmake --build --preset=${{env.BUILD_DEV_SINGLE_PRESET}} --parallel 2 --config Release
192+
187193
- name: Bootstrap through CMake
188194
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
189195
run: |
190-
cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc
196+
cmake --build . --target run_buildcc_lib_bootstrap_linux_gcc --config Release
191197
192198
- name: BuildExe IM example tiny-process-library
193199
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
194200
run: |
195-
cmake --build . --target run_buildexe_im_tpl_gcc_linux
201+
cmake --build . --target run_buildexe_im_tpl_linux_gcc --config Release
196202
197203
# - name: TODO, BuildExe SM simple hyrid example
198204

199-
- name: Upload BuildExe
200-
uses: actions/upload-artifact@v2
201-
with:
202-
name: "BuildExe_Linux"
203-
path: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}/buildexe/buildexe
204-
205205
- name: Install
206206
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
207207
run: |
208-
sudo cmake --install .
208+
sudo cmake --install . --config Release
209209
210210
- name: AfterInstall Example
211211
working-directory: ${{github.workspace}}/example/gcc/AfterInstall
212212
run: |
213-
cmake -B build -G Ninja
214-
cmake --build build --parallel 2
215-
cd build
216-
./build
213+
cmake -B build -G "Ninja Multi-Config"
214+
cmake --build build --parallel 2 --config Release
215+
./build/Release/build
217216
218217
- name: Hybrid Simple Example
219218
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
220219
run: |
221-
cmake --build . --target run_hybrid_simple_example_linux
220+
cmake --build . --target run_hybrid_simple_example_linux --config Release
222221
223222
- name: Hybrid Foolib Example
224223
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
225224
run: |
226-
cmake --build . --target run_hybrid_foolib_example_linux
225+
cmake --build . --target run_hybrid_foolib_example_linux --config Release
227226
228227
- name: Hybrid External Lib Example
229228
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
230229
run: |
231-
cmake --build . --target run_hybrid_externallib_example_linux
230+
cmake --build . --target run_hybrid_externallib_example_linux --config Release
232231
233232
- name: Hybrid Custom Target Example
234233
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
235234
run: |
236-
cmake --build . --target run_hybrid_customtarget_example_linux
235+
cmake --build . --target run_hybrid_customtarget_example_linux --config Release
237236
238237
- name: Hybrid Generic Target Example
239238
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
240239
run: |
241-
cmake --build . --target run_hybrid_generic_example
240+
cmake --build . --target run_hybrid_generic_example --config Release
242241
243242
- name: Hybrid PCH Target Example
244243
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
245244
run: |
246-
cmake --build . --target run_hybrid_pch_example_linux
245+
cmake --build . --target run_hybrid_pch_example_linux --config Release
247246
248247
- name: Hybrid Dep Chaining Target Example
249248
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
250249
run: |
251-
cmake --build . --target run_hybrid_depchaining_example_linux
250+
cmake --build . --target run_hybrid_depchaining_example_linux --config Release
252251
253252
- name: Hybrid Target Info Example
254253
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_SINGLE}}
255254
run: |
256-
cmake --build . --target run_hybrid_targetinfo_example_linux
255+
cmake --build . --target run_hybrid_targetinfo_example_linux --config Release
257256
258257
build_interface:
259258
name: GCC interface lib
@@ -287,12 +286,12 @@ jobs:
287286
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_DEV_INTERFACE}}
288287
run: cmake --build . --target cppcheck_static_analysis
289288

290-
- name: Build
289+
- name: Build Debug
291290
# Linux has 2 cores
292291
run: |
293292
cmake --build --list-presets
294-
cmake --build --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2
293+
cmake --build --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 --config Debug
295294
296295
- name: Test
297296
run: |
298-
ctest --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2
297+
ctest --preset=${{env.BUILD_DEV_INTERFACE_PRESET}} --parallel 2 -C Debug

.github/workflows/win_cmake_build.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,25 @@ jobs:
5858
- name: BuildExe IM example tiny-process-library
5959
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}
6060
run: |
61-
cmake --build . --config Release --target run_buildexe_im_tpl_msvc_win
61+
cmake --build . --config Release --target run_buildexe_im_tpl_win_msvc
6262
6363
# - name: TODO, BuildExe SM simple hyrid example
6464

65-
- name: Upload BuildExe
65+
- name: CPack Release
66+
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}
67+
run: |
68+
cpack -C Release -G ZIP
69+
70+
- name: Upload CPack
6671
uses: actions/upload-artifact@v2
6772
with:
6873
name: "BuildExe_Win"
69-
path: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}/buildexe/Release/buildexe.exe
74+
path: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}/BuildCC-0.1.1-win64.zip
7075

7176
- name: Install
7277
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_MSVC_DEV_ALL}}
7378
run: |
74-
cmake --install .
79+
cmake --install . --config Release
7580
7681
- name: AfterInstall Example
7782
working-directory: ${{github.workspace}}/example/gcc/AfterInstall
@@ -156,59 +161,59 @@ jobs:
156161
# Linux has 2 cores
157162
run: |
158163
cmake --build --list-presets
159-
cmake --build --preset=${{env.BUILD_CLANG_PRESET}} --parallel 2
164+
cmake --build --preset=${{env.BUILD_CLANG_PRESET}} --parallel 2 --config Release
160165
161166
- name: Install
162167
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
163168
run: |
164-
cmake --install .
169+
cmake --install . --config Release
165170
166171
- name: AfterInstall Example
167172
working-directory: ${{github.workspace}}/example/gcc/AfterInstall
168173
run: |
169174
$env:Path += ";C:/Program Files (x86)/BuildCC"
170175
cmake -B build
171-
cmake --build build --parallel 2
172-
cd build/Debug
176+
cmake --build build --parallel 2 --config Release
177+
cd build/Release
173178
ls
174179
.\build.exe
175180
176181
- name: Hybrid Simple Example
177182
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
178183
run: |
179-
cmake --build . --target run_hybrid_simple_example_win
184+
cmake --build . --target run_hybrid_simple_example_win --config Release
180185
181186
- name: Hybrid Foolib Example
182187
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
183188
run: |
184-
cmake --build . --target run_hybrid_foolib_example_win
189+
cmake --build . --target run_hybrid_foolib_example_win --config Release
185190
186191
- name: Hybrid External Lib Example
187192
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
188193
run: |
189-
cmake --build . --target run_hybrid_externallib_example_win
194+
cmake --build . --target run_hybrid_externallib_example_win --config Release
190195
191196
- name: Hybrid Custom Target Example
192197
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
193198
run: |
194-
cmake --build . --target run_hybrid_customtarget_example_win
199+
cmake --build . --target run_hybrid_customtarget_example_win --config Release
195200
196201
- name: Hybrid Generic Target Example
197202
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
198203
run: |
199-
cmake --build . --target run_hybrid_generic_example
204+
cmake --build . --target run_hybrid_generic_example --config Release
200205
201206
- name: Hybrid PCH Target Example
202207
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
203208
run: |
204-
cmake --build . --target run_hybrid_pch_example_win
209+
cmake --build . --target run_hybrid_pch_example_win --config Release
205210
206211
- name: Hybrid Dep Chaining Target Example
207212
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
208213
run: |
209-
cmake --build . --target run_hybrid_depchaining_example_win
214+
cmake --build . --target run_hybrid_depchaining_example_win --config Release
210215
211216
- name: Hybrid Target Info Example
212217
working-directory: ${{github.workspace}}/${{env.BUILD_FOLDER_CLANG_DEV_ALL}}
213218
run: |
214-
cmake --build . --target run_hybrid_targetinfo_example_win
219+
cmake --build . --target run_hybrid_targetinfo_example_win --config Release

CMakePresets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"name": "gcc_dev_all",
1111
"displayName": "GCC full build",
1212
"description": "GCC build with all developer options",
13-
"generator": "Ninja",
13+
"generator": "Ninja Multi-Config",
1414
"binaryDir": "${sourceDir}/_build_gcc_dev_all",
1515
"cacheVariables": {
1616
"CMAKE_BUILD_TYPE": "Debug",
@@ -35,7 +35,7 @@
3535
"name": "gcc_dev_single",
3636
"displayName": "GCC single lib build",
3737
"description": "GCC build for single lib buildcc",
38-
"generator": "Ninja",
38+
"generator": "Ninja Multi-Config",
3939
"binaryDir": "${sourceDir}/_build_gcc_dev_single",
4040
"cacheVariables": {
4141
"CMAKE_BUILD_TYPE": "Debug",
@@ -60,7 +60,7 @@
6060
"name": "gcc_dev_interface",
6161
"displayName": "GCC interface lib build",
6262
"description": "GCC build for interface lib buildcc",
63-
"generator": "Ninja",
63+
"generator": "Ninja Multi-Config",
6464
"binaryDir": "${sourceDir}/_build_gcc_dev_interface",
6565
"cacheVariables": {
6666
"CMAKE_BUILD_TYPE": "Debug",
@@ -85,7 +85,7 @@
8585
"name": "clang_dev_all",
8686
"displayName": "Clang all options",
8787
"description": "Clang build with all developer options",
88-
"generator": "Ninja",
88+
"generator": "Ninja Multi-Config",
8989
"binaryDir": "${sourceDir}/_build_clang_dev_all",
9090
"cacheVariables": {
9191
"CMAKE_BUILD_TYPE": "Debug",

0 commit comments

Comments
 (0)