Skip to content

Commit b3b93d6

Browse files
authored
fix asan config (#104)
A few changes to make the ASAN configuration consistent with the other C++ projects, to assist with sharing build script changes.
1 parent e37bd61 commit b3b93d6

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
BUILD_DIR: "cmake-build"
15+
BUILD_TYPE: "Debug"
1516
CC: "gcc-11"
1617
CXX: "g++-11"
1718
LANG: "en_US.UTF-8"
@@ -38,19 +39,23 @@ jobs:
3839
python3 -V
3940
4041
echo "==== conan ===="
41-
pip install "conan==1.62.0"
42+
pip install -r requirements.txt
4243
conan --version
4344
if [[ ! -f ~/.conan/profiles/default ]]; then conan profile new default --detect; fi
4445
conan profile update settings.compiler.libcxx=libstdc++11 default
4546
4647
- name: Install Project Dependencies
4748
run: |
48-
conan install . --build --install-folder $BUILD_DIR --profile ./sanitized
49+
if [[ "$BUILD_TYPE" == "Debug" ]]; then
50+
conan install . --build --install-folder $BUILD_DIR --profile ./sanitized
51+
else
52+
conan install . --build=missing --install-folder $BUILD_DIR
53+
fi
4954
5055
- name: Build spectator-cpp
5156
run: |
5257
cd $BUILD_DIR
53-
cmake .. -DCMAKE_BUILD_TYPE=Debug
58+
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
5459
cmake --build .
5560
5661
- name: Test spectator-cpp

build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ if [[ ! -d $BUILD_DIR ]]; then
2828

2929
echo -e "${BLUE}==== install required dependencies ====${NC}"
3030
if [[ "$BUILD_TYPE" == "Debug" ]]; then
31-
PROFILE="--profile ./sanitized"
31+
conan install . --build --install-folder $BUILD_DIR --profile ./sanitized
3232
else
33-
PROFILE=""
33+
conan install . --build=missing --install-folder $BUILD_DIR
3434
fi
35-
conan install . --build=missing --install-folder $BUILD_DIR $PROFILE
3635
fi
3736

3837
pushd $BUILD_DIR || exit 1

0 commit comments

Comments
 (0)