Skip to content

Commit

Permalink
Cirrus: Use references for common commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sanssecours committed Feb 10, 2019
1 parent b1a3572 commit cc657fe
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .cirrus.yml
Expand Up @@ -18,7 +18,7 @@ bsd_task:
yajl yajl
script: script:
- mkdir build && cd build - &create_and_chage_to_build_dir mkdir build && cd build
- > # We use `-std=c11`, since the header `math.h` on FreeBSD requires C11 features - > # We use `-std=c11`, since the header `math.h` on FreeBSD requires C11 features
cmake cmake
-DBINDINGS=ALL -DBINDINGS=ALL
Expand All @@ -29,14 +29,21 @@ bsd_task:
-DTARGET_PLUGIN_FOLDER='' -DTARGET_PLUGIN_FOLDER=''
-GNinja -GNinja
.. ..
- ninja - &build ninja
- output="$(ninja install 2>&1)" || printf '%s' "$output" - &install output="$(ninja install 2>&1)" || printf '%s' "$output"


tests_script: tests_script:
# Work around stalled process plugin and library problems on FreeBSD: https://issues.libelektra.org/2323 # Work around stalled process plugin and library problems on FreeBSD: https://issues.libelektra.org/2323
- sudo mount -t fdescfs fdesc /dev/fd - sudo mount -t fdescfs fdesc /dev/fd
- ninja -C build run_all - &run_tests | # Run tests
- kdb run_all cd build
if [[ "$ENABLE_ASAN" == 'ON' ]]; then
ninja run_nocheckshell
elif [[ "$BUILD_FULL" == 'ON' ]]; then
ninja run_all && kdb-full run_all
else
ninja run_all && kdb run_all
fi


mac_task: mac_task:
matrix: matrix:
Expand Down Expand Up @@ -133,7 +140,7 @@ mac_task:
export CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ export CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++
- SYSTEM_DIR="$PWD/kdbsystem" - SYSTEM_DIR="$PWD/kdbsystem"
- INSTALL_DIR="$PWD/install" - INSTALL_DIR="$PWD/install"
- mkdir build && cd build - *create_and_chage_to_build_dir
- | - |
CMAKE_OPTIONS=( CMAKE_OPTIONS=(
-DBINDINGS="${BINDINGS:-ALL}" -DBINDINGS="${BINDINGS:-ALL}"
Expand All @@ -158,20 +165,12 @@ mac_task:
printf '—— CMake Config ——\n' printf '—— CMake Config ——\n'
for option in "${CMAKE_OPTIONS[@]}"; do printf '%s\n' "$option"; done for option in "${CMAKE_OPTIONS[@]}"; do printf '%s\n' "$option"; done
- cmake ${CMAKE_OPTIONS[@]} - cmake ${CMAKE_OPTIONS[@]}
- ninja - *build
- output="$(ninja install 2>&1)" || printf '%s' "$output" - *install


tests_script: tests_script:
- export PATH=$PATH:"$PWD/install/bin" - export PATH=$PATH:"$PWD/install/bin"
- cd build - *run_tests
- | # Run tests
if [[ "$ENABLE_ASAN" == 'ON' ]]; then
ninja run_nocheckshell
elif [[ "$BUILD_FULL" == 'ON' ]]; then
ninja run_all && kdb-full run_all
else
ninja run_all && kdb run_all
fi
- | # Uninstall Elektra - | # Uninstall Elektra
output="$(ninja uninstall 2>&1)" || printf '%s' "$output" output="$(ninja uninstall 2>&1)" || printf '%s' "$output"
- | # Make sure uninstalling removes all files - | # Make sure uninstalling removes all files
Expand Down

0 comments on commit cc657fe

Please sign in to comment.