Skip to content

Commit e37a47d

Browse files
committed
ci: upload binaries in package mantainer mode
1 parent 109f3d3 commit e37a47d

File tree

2 files changed

+95
-92
lines changed

2 files changed

+95
-92
lines changed

.github/workflows/ci.yml

+93-90
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ 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
49+
package_generator:
50+
- TBZ2
4951

5052
exclude:
5153
# mingw is determined by this author to be too buggy to support
@@ -55,74 +57,74 @@ jobs:
5557
include:
5658
# Add appropriate variables for gcov version required. This will intentionally break
5759
# 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
60+
# - compiler: gcc-11
61+
# gcov_executable: gcov
62+
# enable_ipo: On
6163

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

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

71-
- os: ubuntu-20.04
72-
enable_clang_tidy: On
73-
enable_cppcheck: On
73+
# - os: ubuntu-20.04
74+
# enable_clang_tidy: On
75+
# enable_cppcheck: On
7476

7577
# Set up preferred package generators, for given build configurations
76-
- build_type: Release
77-
package_maintainer_mode: OFF
78-
package_generator: TBZ2
78+
# - build_type: Release
79+
# package_maintainer_mode: OFF
80+
# package_generator: TBZ2
7981

8082
# 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
83+
# - os: ubuntu-20.04
84+
# compiler: gcc-11
85+
# generator: "Unix Makefiles"
86+
# build_type: Debug
87+
# gcov_executable: gcov
88+
# package_maintainer_mode: On
89+
# enable_ipo: Off
90+
# enable_clang_tidy: On
91+
# enable_cppcheck: On
9092

9193
# 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
117-
118-
- os: windows-2022
119-
compiler: msvc
120-
generator: "Visual Studio 17 2022"
121-
build_type: Release
122-
package_maintainer_mode: Off
123-
package_generator: ZIP
124-
enable_clang_tidy: Off
125-
enable_cppcheck: Off
94+
# - os: windows-2022
95+
# compiler: msvc
96+
# generator: "Visual Studio 17 2022"
97+
# build_type: Debug
98+
# package_maintainer_mode: On
99+
# enable_ipo: On
100+
# enable_clang_tidy: Off
101+
# enable_cppcheck: Off
102+
103+
# - os: windows-2022
104+
# compiler: msvc
105+
# generator: "Visual Studio 17 2022"
106+
# build_type: Release
107+
# package_maintainer_mode: On
108+
# enable_ipo: On
109+
# enable_clang_tidy: Off
110+
# enable_cppcheck: Off
111+
112+
# - os: windows-2022
113+
# compiler: msvc
114+
# generator: "Visual Studio 17 2022"
115+
# build_type: Debug
116+
# package_maintainer_mode: Off
117+
# enable_clang_tidy: Off
118+
# enable_cppcheck: Off
119+
120+
# - os: windows-2022
121+
# compiler: msvc
122+
# generator: "Visual Studio 17 2022"
123+
# build_type: Release
124+
# package_maintainer_mode: Off
125+
# package_generator: ZIP
126+
# enable_clang_tidy: Off
127+
# enable_cppcheck: Off
126128

127129
- os: windows-2022
128130
compiler: msvc
@@ -133,6 +135,7 @@ jobs:
133135
build_shared: On
134136
enable_clang_tidy: Off
135137
enable_cppcheck: Off
138+
package_generator: TBZ2
136139

137140
steps:
138141
- name: Check for llvm version mismatches
@@ -171,27 +174,27 @@ jobs:
171174

172175
- name: Configure CMake
173176
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 }}
177+
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
175178
176179
- name: Build
177180
# Execute the build. You can specify a specific target with "--target <NAME>"
178181
run: |
179182
cmake --build ./build --config ${{matrix.build_type}}
180183
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}}
184+
# - name: Unix - Test and coverage
185+
# if: runner.os != 'Windows'
186+
# working-directory: ./build
187+
# # Execute tests defined by the CMake configuration.
188+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
189+
# run: |
190+
# ctest -C ${{matrix.build_type}}
191+
# gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'
192+
193+
# - name: Windows - Test and coverage
194+
# if: runner.os == 'Windows'
195+
# working-directory: ./build
196+
# run: |
197+
# OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}
195198

196199
- name: CPack
197200
if: matrix.package_generator != ''
@@ -200,23 +203,23 @@ jobs:
200203
cpack -C ${{matrix.build_type}} -G ${{matrix.package_generator}}
201204
202205
- name: Publish Snapshot Release
203-
uses: softprops/action-gh-release@v1
204206
if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode != 'ON' && matrix.package_generator != '' }}
205-
with:
206-
tag_name: "snapshot-${{ github.sha }}"
207-
files: |
208-
build/*-*${{ matrix.build_type }}*-*.*
209-
210-
- name: Publish Tagged Release
211207
uses: softprops/action-gh-release@v1
212-
if: ${{ (github.ref == 'refs/heads/main') && matrix.package_maintainer_mode != 'ON' && matrix.package_generator != '' }}
213208
with:
209+
tag_name: "snapshot-${{ github.sha }}"
214210
files: |
215211
build/*-*${{ matrix.build_type }}*-*.*
216212
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
213+
# - name: Publish Tagged Release
214+
# uses: softprops/action-gh-release@v1
215+
# if: ${{ (github.ref == 'refs/heads/main') && matrix.package_generator != '' }}
216+
# with:
217+
# files: |
218+
# build/*-*${{ matrix.build_type }}*-*.*
219+
220+
# - name: Publish to codecov
221+
# uses: codecov/codecov-action@v2
222+
# with:
223+
# flags: ${{ runner.os }}
224+
# name: ${{ runner.os }}-coverage
225+
# 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)