Commit 2028e35928ee8725128f52cae999ac6829dee2fc

Authored by Jay Berkenbilt
1 parent 4bc7b6ce

Actually run windows builds in Release mode in CI

build-scripts/build-windows
@@ -30,7 +30,7 @@ unzip doc.zip @@ -30,7 +30,7 @@ unzip doc.zip
30 unzip qpdf-external-libs-bin.zip 30 unzip qpdf-external-libs-bin.zip
31 31
32 cd build 32 cd build
33 -../cmake-win $tool ci 33 +../cmake-win $tool ci $config
34 cmake --build . --verbose -j$(nproc) "${cmake_xargs[@]}" 34 cmake --build . --verbose -j$(nproc) "${cmake_xargs[@]}"
35 ctest --verbose "${ctest_xargs[@]}" 35 ctest --verbose "${ctest_xargs[@]}"
36 cpack -G NSIS -C $config 36 cpack -G NSIS -C $config
cmake-win
@@ -3,6 +3,7 @@ set -e @@ -3,6 +3,7 @@ set -e
3 whoami=$(basename $0) 3 whoami=$(basename $0)
4 tool=$1 4 tool=$1
5 mode=$2 5 mode=$2
  6 +config=${3-RelWithDebInfo}
6 7
7 dir=$(realpath --relative-to . $(dirname $0)) 8 dir=$(realpath --relative-to . $(dirname $0))
8 if [ "$dir" = "." ]; then 9 if [ "$dir" = "." ]; then
@@ -12,13 +13,13 @@ fi @@ -12,13 +13,13 @@ fi
12 declare -a args 13 declare -a args
13 case $tool in 14 case $tool in
14 msvc) 15 msvc)
15 - args=(-DCMAKE_BUILD_TYPE=RelWithDebInfo) 16 + args=(-DCMAKE_BUILD_TYPE=$config)
16 if cl 2>&1 | grep -q 'for x86'; then 17 if cl 2>&1 | grep -q 'for x86'; then
17 args=("${args[@]}" -A win32) 18 args=("${args[@]}" -A win32)
18 fi 19 fi
19 ;; 20 ;;
20 mingw) 21 mingw)
21 - args=(-G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo) 22 + args=(-G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=$config)
22 ;; 23 ;;
23 *) 24 *)
24 echo 1>&2 "Usage: $whoami {msvc|mingw}" 25 echo 1>&2 "Usage: $whoami {msvc|mingw}"
@@ -36,9 +37,9 @@ cmake "${args[@]}" $dir @@ -36,9 +37,9 @@ cmake "${args[@]}" $dir
36 set +x 37 set +x
37 if [ "$tool" = "msvc" ]; then 38 if [ "$tool" = "msvc" ]; then
38 echo "" 39 echo ""
39 - echo "*****************************************************************"  
40 - echo "*** Remember to pass --config RelWithDebInfo to cmake --build ***"  
41 - echo "*** and -C RelWithDebInfo to ctest ***"  
42 - echo "*****************************************************************" 40 + echo "***"
  41 + echo "*** Remember to pass --config $config to cmake --build"
  42 + echo "*** and -C $config to ctest"
  43 + echo "***"
43 echo "" 44 echo ""
44 fi 45 fi