Skip to content

Commit

Permalink
Add quest matrix to CI (#81)
Browse files Browse the repository at this point in the history
* Add quest matrix to CI

* Add cmake quest option
  • Loading branch information
APN-Pucky authored Nov 10, 2024
1 parent 7b7b35c commit 940f384
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ set( BUILD_SHARED_LIBRARIES OFF)
set( Boost_USE_STATIC_LIBS ON )
set( CMAKE_EXE_LINKER_FLAGS "-static")
endif()
add_definitions(-DTYRANT_OPTIMIZER_VERSION="${VERSION}" ${DEBUG} -DNQUEST)
add_definitions(-DTYRANT_OPTIMIZER_VERSION="${VERSION}" ${DEBUG})


project(tuo)
file(GLOB TUO_SOURCES "*.cpp")
Expand All @@ -24,6 +25,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/extern/hPMML/include)
enable_language(CXX)
add_executable(tuo ${TUO_SOURCES})

option(WITH_QUEST "With Quests enabled" OFF)
if(NOT WITH_QUEST)
add_definitions(-DNQUEST)
endif()
option(USE_OPENMP "Use OpenMP instead of Boost" OFF)
if(USE_OPENMP)
# src: https://stackoverflow.com/a/12404666
Expand Down
13 changes: 11 additions & 2 deletions build/windows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ MXE_DIR=/usr/lib/mxe
declare -a a_openmp=("" "-openmp" )
declare -a a_debug=("" "-debug" "-time")
declare -a a_bit=("" "-x86" )
declare -a a_quest=("" "-quest" )

for omp in "${a_openmp[@]}"
do
for dbg in "${a_debug[@]}"
do
for bit in "${a_bit[@]}"
do
for quest in "${a_quest[@]}"
do

DFLAGS=""
BDIR="build-dir${bit}${omp}${dbg}"
NAME="tuo${bit}${omp}${dbg}.exe"
BDIR="build-dir${quest}${bit}${omp}${dbg}"
NAME="tuo${quest}${bit}${omp}${dbg}.exe"

if [ "$bit" = "" ]; then
#Windows x64 Build
Expand All @@ -39,6 +42,11 @@ fi
if [ "$omp" = "-openmp" ]; then
DFLAGS="${DFLAGS} -DUSE_OPENMP=ON"
fi
if [ "$quest" = "" ]; then
DFLAGS="${DFLAGS} -DWITH_QUEST=OFF"
else
DFLAGS="${DFLAGS} -DWITH_QUEST=ON"
fi
#prep cmake
${MXE_DIR}/usr/bin/${MXE_TARGET}-cmake . -B${BDIR} -DVERSION:STRING="$(git describe --tags --abbrev=0 --dirty)${bit}${omp}${dbg}" ${DFLAGS}

Expand All @@ -55,5 +63,6 @@ mv ${BDIR}/tuo.exe ${NAME}
done
done
done
done

set +xue

0 comments on commit 940f384

Please sign in to comment.