|
| 1 | +#!/usr/bin/env bash |
| 2 | +set -euo pipefail |
| 3 | + |
| 4 | +source_dir="${GITHUB_WORKSPACE:-$(pwd)}" |
| 5 | +build_root="${RUNNER_TEMP:-/tmp}/gecode-example-features" |
| 6 | + |
| 7 | +rm -rf "$build_root" |
| 8 | + |
| 9 | +cmake -S "$source_dir" -B "$build_root/int" -G Ninja \ |
| 10 | + -DGECODE_ENABLE_EXAMPLES=ON \ |
| 11 | + -DGECODE_ENABLE_SET_VARS=OFF \ |
| 12 | + -DGECODE_ENABLE_FLOAT_VARS=OFF \ |
| 13 | + -DGECODE_ENABLE_FLATZINC=OFF \ |
| 14 | + -DGECODE_ENABLE_QT=OFF \ |
| 15 | + -DGECODE_ENABLE_GIST=OFF |
| 16 | + |
| 17 | +grep -q '^GECODE_ENABLE_SET_VARS:BOOL=OFF$' "$build_root/int/CMakeCache.txt" |
| 18 | +grep -q '^GECODE_ENABLE_FLOAT_VARS:BOOL=OFF$' "$build_root/int/CMakeCache.txt" |
| 19 | +cmake --build "$build_root/int" --target help > "$build_root/int-targets.txt" |
| 20 | +grep -q '^tsp:' "$build_root/int-targets.txt" |
| 21 | +! grep -q '^crew:' "$build_root/int-targets.txt" |
| 22 | +! grep -q '^cartesian-heart:' "$build_root/int-targets.txt" |
| 23 | +! grep -q '^archimedean-spiral:' "$build_root/int-targets.txt" |
| 24 | +cmake --build "$build_root/int" --target tsp |
| 25 | + |
| 26 | +cmake -S "$source_dir" -B "$build_root/optional" -G Ninja \ |
| 27 | + -DGECODE_ENABLE_EXAMPLES=ON \ |
| 28 | + -DGECODE_ENABLE_SET_VARS=ON \ |
| 29 | + -DGECODE_ENABLE_FLOAT_VARS=ON \ |
| 30 | + -DGECODE_ENABLE_MPFR=OFF \ |
| 31 | + -DGECODE_ENABLE_FLATZINC=OFF \ |
| 32 | + -DGECODE_ENABLE_QT=OFF \ |
| 33 | + -DGECODE_ENABLE_GIST=OFF |
| 34 | + |
| 35 | +cmake --build "$build_root/optional" --target help > "$build_root/optional-targets.txt" |
| 36 | +grep -q '^crew:' "$build_root/optional-targets.txt" |
| 37 | +grep -q '^cartesian-heart:' "$build_root/optional-targets.txt" |
| 38 | +! grep -q '^archimedean-spiral:' "$build_root/optional-targets.txt" |
0 commit comments