Skip to content

Commit 3565c3c

Browse files
committed
ci: upload binaries in package maintainer mode
1 parent 109f3d3 commit 3565c3c

File tree

2 files changed

+92
-92
lines changed

2 files changed

+92
-92
lines changed

.github/workflows/ci.yml

+90-90
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040
- "Ninja Multi-Config"
4141
build_type:
4242
- Release
43-
- Debug
43+
# - Debug
4444
package_maintainer_mode:
4545
- ON
46-
- OFF
46+
# - OFF
4747
build_shared:
4848
- OFF
4949

@@ -55,65 +55,65 @@ jobs:
5555
include:
5656
# Add appropriate variables for gcov version required. This will intentionally break
5757
# if you try to use a compiler that does not have gcov set
58-
- compiler: gcc-11
59-
gcov_executable: gcov
60-
enable_ipo: On
58+
# - compiler: gcc-11
59+
# gcov_executable: gcov
60+
# enable_ipo: On
6161

62-
- compiler: llvm-15.0.2
63-
enable_ipo: Off
64-
gcov_executable: "llvm-cov gcov"
62+
# - compiler: llvm-15.0.2
63+
# enable_ipo: Off
64+
# gcov_executable: "llvm-cov gcov"
6565

66-
- os: macos-12
67-
enable_ipo: Off
68-
enable_cppcheck: OFF
69-
enable_clang_tidy: OFF
66+
# - os: macos-12
67+
# enable_ipo: Off
68+
# enable_cppcheck: OFF
69+
# enable_clang_tidy: OFF
7070

71-
- os: ubuntu-20.04
72-
enable_clang_tidy: On
73-
enable_cppcheck: On
71+
# - os: ubuntu-20.04
72+
# enable_clang_tidy: On
73+
# enable_cppcheck: On
7474

7575
# Set up preferred package generators, for given build configurations
76-
- build_type: Release
77-
package_maintainer_mode: OFF
78-
package_generator: TBZ2
76+
# - build_type: Release
77+
# package_maintainer_mode: OFF
78+
# package_generator: TBZ2
7979

8080
# This exists solely to make sure a non-multiconfig build works
81-
- os: ubuntu-20.04
82-
compiler: gcc-11
83-
generator: "Unix Makefiles"
84-
build_type: Debug
85-
gcov_executable: gcov
86-
package_maintainer_mode: On
87-
enable_ipo: Off
88-
enable_clang_tidy: On
89-
enable_cppcheck: On
81+
# - os: ubuntu-20.04
82+
# compiler: gcc-11
83+
# generator: "Unix Makefiles"
84+
# build_type: Debug
85+
# gcov_executable: gcov
86+
# package_maintainer_mode: On
87+
# enable_ipo: Off
88+
# enable_clang_tidy: On
89+
# enable_cppcheck: On
9090

9191
# Windows msvc builds
92-
- os: windows-2022
93-
compiler: msvc
94-
generator: "Visual Studio 17 2022"
95-
build_type: Debug
96-
package_maintainer_mode: On
97-
enable_ipo: On
98-
enable_clang_tidy: Off
99-
enable_cppcheck: Off
100-
101-
- os: windows-2022
102-
compiler: msvc
103-
generator: "Visual Studio 17 2022"
104-
build_type: Release
105-
package_maintainer_mode: On
106-
enable_ipo: On
107-
enable_clang_tidy: Off
108-
enable_cppcheck: Off
109-
110-
- os: windows-2022
111-
compiler: msvc
112-
generator: "Visual Studio 17 2022"
113-
build_type: Debug
114-
package_maintainer_mode: Off
115-
enable_clang_tidy: Off
116-
enable_cppcheck: Off
92+
# - os: windows-2022
93+
# compiler: msvc
94+
# generator: "Visual Studio 17 2022"
95+
# build_type: Debug
96+
# package_maintainer_mode: On
97+
# enable_ipo: On
98+
# enable_clang_tidy: Off
99+
# enable_cppcheck: Off
100+
101+
# - os: windows-2022
102+
# compiler: msvc
103+
# generator: "Visual Studio 17 2022"
104+
# build_type: Release
105+
# package_maintainer_mode: On
106+
# enable_ipo: On
107+
# enable_clang_tidy: Off
108+
# enable_cppcheck: Off
109+
110+
# - os: windows-2022
111+
# compiler: msvc
112+
# generator: "Visual Studio 17 2022"
113+
# build_type: Debug
114+
# package_maintainer_mode: Off
115+
# enable_clang_tidy: Off
116+
# enable_cppcheck: Off
117117

118118
- os: windows-2022
119119
compiler: msvc
@@ -124,15 +124,15 @@ jobs:
124124
enable_clang_tidy: Off
125125
enable_cppcheck: Off
126126

127-
- os: windows-2022
128-
compiler: msvc
129-
generator: "Visual Studio 17 2022"
130-
build_type: Release
131-
package_maintainer_mode: On
132-
enable_ipo: On
133-
build_shared: On
134-
enable_clang_tidy: Off
135-
enable_cppcheck: Off
127+
# - os: windows-2022
128+
# compiler: msvc
129+
# generator: "Visual Studio 17 2022"
130+
# build_type: Release
131+
# package_maintainer_mode: On
132+
# enable_ipo: On
133+
# build_shared: On
134+
# enable_clang_tidy: Off
135+
# enable_cppcheck: Off
136136

137137
steps:
138138
- name: Check for llvm version mismatches
@@ -171,27 +171,27 @@ jobs:
171171

172172
- name: Configure CMake
173173
run: |
174-
cmake -S . -B ./build -G "${{matrix.generator}}" -Djson2cpp_ENABLE_CLANG_TIDY:BOOL=${{ matrix.enable_clang_tidy }} -Djson2cpp_ENABLE_CPPCHECK:BOOL=${{ matrix.enable_cppcheck }} -Djson2cpp_ENABLE_IPO=${{matrix.enable_ipo }} -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -Djson2cpp_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.package_maintainer_mode}} -Djson2cpp_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DGIT_SHA:STRING=${{ github.sha }}
174+
cmake -S . -B ./build -G "${{matrix.generator}}" -Djson2cpp_ENABLE_CLANG_TIDY:BOOL=${{ matrix.enable_clang_tidy }} -Djson2cpp_ENABLE_CPPCHECK:BOOL=${{ matrix.enable_cppcheck }} -Djson2cpp_ENABLE_IPO=${{matrix.enable_ipo }} -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -Djson2cpp_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.package_maintainer_mode}} -Djson2cpp_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DGIT_SHA:STRING=${{ github.sha }} -DBUILD_TESTINGLBOOL=OFF
175175
176176
- name: Build
177177
# Execute the build. You can specify a specific target with "--target <NAME>"
178178
run: |
179179
cmake --build ./build --config ${{matrix.build_type}}
180180
181-
- name: Unix - Test and coverage
182-
if: runner.os != 'Windows'
183-
working-directory: ./build
184-
# Execute tests defined by the CMake configuration.
185-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
186-
run: |
187-
ctest -C ${{matrix.build_type}}
188-
gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'
189-
190-
- name: Windows - Test and coverage
191-
if: runner.os == 'Windows'
192-
working-directory: ./build
193-
run: |
194-
OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}
181+
# - name: Unix - Test and coverage
182+
# if: runner.os != 'Windows'
183+
# working-directory: ./build
184+
# # Execute tests defined by the CMake configuration.
185+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
186+
# run: |
187+
# ctest -C ${{matrix.build_type}}
188+
# gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'
189+
190+
# - name: Windows - Test and coverage
191+
# if: runner.os == 'Windows'
192+
# working-directory: ./build
193+
# run: |
194+
# OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}
195195

196196
- name: CPack
197197
if: matrix.package_generator != ''
@@ -201,22 +201,22 @@ jobs:
201201
202202
- name: Publish Snapshot Release
203203
uses: softprops/action-gh-release@v1
204-
if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode != 'ON' && matrix.package_generator != '' }}
204+
if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode == 'ON' && matrix.package_generator != '' }}
205205
with:
206206
tag_name: "snapshot-${{ github.sha }}"
207207
files: |
208208
build/*-*${{ matrix.build_type }}*-*.*
209209
210-
- name: Publish Tagged Release
211-
uses: softprops/action-gh-release@v1
212-
if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode != 'ON' && matrix.package_generator != '' }}
213-
with:
214-
files: |
215-
build/*-*${{ matrix.build_type }}*-*.*
216-
217-
- name: Publish to codecov
218-
uses: codecov/codecov-action@v2
219-
with:
220-
flags: ${{ runner.os }}
221-
name: ${{ runner.os }}-coverage
222-
files: ./build/coverage.xml
210+
# - name: Publish Tagged Release
211+
# uses: softprops/action-gh-release@v1
212+
# if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode == 'ON' && matrix.package_generator != '' }}
213+
# with:
214+
# files: |
215+
# build/*-*${{ matrix.build_type }}*-*.*
216+
217+
# - name: Publish to codecov
218+
# uses: codecov/codecov-action@v2
219+
# with:
220+
# flags: ${{ runner.os }}
221+
# name: ${{ runner.os }}-coverage
222+
# files: ./build/coverage.xml

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ endif()
7272
include(CTest)
7373

7474
if(BUILD_TESTING)
75-
add_subdirectory(test)
75+
# add_subdirectory(test)
7676
endif()
7777

7878

7979
if(json2cpp_BUILD_FUZZ_TESTS)
8080
message(AUTHOR_WARNING "Building Fuzz Tests, using fuzzing sanitizer https://www.llvm.org/docs/LibFuzzer.html")
81-
add_subdirectory(fuzz_test)
81+
# add_subdirectory(fuzz_test)
8282
endif()
8383

8484
# If MSVC is being used, and ASAN is enabled, we need to set the debugger environment

0 commit comments

Comments
 (0)