Skip to content

Commit 997b0b5

Browse files
committed
Enforce that testing is enabled.
1 parent 1afc220 commit 997b0b5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: |
2222
python3 -m venv venv && . ./venv/bin/activate
2323
pip install -U setuptools wheel pip conan==2.5.0
24-
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
24+
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DZSWAG_ENABLE_TESTING=ON ..
2525
- name: Build
2626
working-directory: build
2727
run: |
@@ -73,7 +73,8 @@ jobs:
7373
cmake -DPython3_ROOT_DIR=$pythonLocation \
7474
-DPython3_FIND_FRAMEWORK=LAST \
7575
-DCMAKE_BUILD_TYPE=Release \
76-
-DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF ..
76+
-DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF \
77+
-DZSWAG_ENABLE_TESTING=ON ..
7778
cmake --build .
7879
mv bin/wheel bin/wheel-auditme # Same as on Linux
7980
mkdir bin/wheel && mv bin/wheel-auditme/zswag*.whl bin/wheel
@@ -85,7 +86,7 @@ jobs:
8586
working-directory: build
8687
run: |
8788
echo "cmake -DPython3_ROOT_DIR=$env:pythonLocation"
88-
cmake "-DPython3_ROOT_DIR=$env:pythonLocation" -DPython3_FIND_REGISTRY=LAST -DHTTPLIB_USE_ZLIB_IF_AVAILABLE=OFF -DCMAKE_BUILD_TYPE=Release ..
89+
cmake "-DPython3_ROOT_DIR=$env:pythonLocation" -DPython3_FIND_REGISTRY=LAST -DCMAKE_BUILD_TYPE=Release -DZSWAG_ENABLE_TESTING=ON ..
8990
cmake --build . --config Release
9091
- name: Deploy
9192
uses: actions/upload-artifact@v2

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ option(ZSWAG_KEYCHAIN_SUPPORT "Enable zswag keychain support." ON)
3030
option(ZSWAG_ENABLE_TESTING "Enable testing for the project" OFF)
3131

3232
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
33+
message (STATUS "Testing will be enabled as zswag is the top-level project.")
3334
set (ZSWAG_ENABLE_TESTING ON CACHE BOOL "By default, enable testing if this is the main project")
3435
endif()
3536

0 commit comments

Comments
 (0)