Skip to content

Commit

Permalink
Run Linux build in both release and debug mode (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits committed Feb 13, 2020
1 parent 8bab2e4 commit a9b9fa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .pipelines/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ container:
image: vowpalwabbit/ubuntu1604-build:0.3.0
endpoint: DockerHub

strategy:
matrix:
Debug:
BUILD_CONFIGURATION: 'Debug'
Release:
BUILD_CONFIGURATION: 'Release'
maxParallel: 2

steps:
- bash: ./.scripts/linux/clang-format-check.sh
displayName: Clang format check
- bash: ./.scripts/linux/build.sh
- bash: ./.scripts/linux/build.sh $(BUILD_CONFIGURATION)
displayName: Build C++
- bash: ./.scripts/linux/test.sh
displayName: Test C++
Expand Down
5 changes: 4 additions & 1 deletion .scripts/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_DIR=$SCRIPT_DIR/../../
cd $REPO_DIR

# If parameter 1 is not supplied, it defaults to Release
BUILD_CONFIGURATION=${1:-Release}

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DWARNINGS=Off -DDO_NOT_BUILD_VW_C_WRAPPER=On -DBUILD_JAVA=On -DBUILD_PYTHON=Off -DBUILD_TESTS=On
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_CONFIGURATION} -DWARNINGS=Off -DDO_NOT_BUILD_VW_C_WRAPPER=On -DBUILD_JAVA=On -DBUILD_PYTHON=Off -DBUILD_TESTS=On
NUM_PROCESSORS=$(cat nprocs.txt)
make all -j ${NUM_PROCESSORS}

0 comments on commit a9b9fa1

Please sign in to comment.