summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDaniel McCarney <daniel@binaryparadox.net>2024-04-19 14:35:51 -0400
committerDaniel McCarney <daniel@binaryparadox.net>2024-04-19 17:19:08 -0400
commit66435e678b388bd20e0534f31756e9f461f5d366 (patch)
tree6361ced66ea213b6ac41f3580efbdce378ca18d3 /.github
parentd23891ff257497effcffcddd7c27dd4fee71395b (diff)
Makefile: only use ASAN for debug+clang
Previously if `$CC` was `clang` the `Makefile` and `Makefile.pkg-config` make files would configure `CFLAGS` and `LDFLAGS` with address sanitizer (ASAN) enabled. We only want this to happen for _debug_ builds that are using `clang`, since it's generally considered bad practice to ship sanitizer builds as release artifacts. This commit updates the logic to require `PROFILE=debug`, and then switches CI to use that profile when running tests. The Valgrind test continues to use `PROFILE=release` because ASAN and Valgrind will conflict, raising the error "ASan runtime does not come first in initial library list;". It may be possible to use both with more care/configuration, but for now we'll just use valgrind with a release build.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/pkg-config.yaml4
-rw-r--r--.github/workflows/test.yaml6
2 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/pkg-config.yaml b/.github/workflows/pkg-config.yaml
index d9da189..0739c8b 100644
--- a/.github/workflows/pkg-config.yaml
+++ b/.github/workflows/pkg-config.yaml
@@ -39,7 +39,7 @@ jobs:
run: make --file=Makefile.pkg-config PREFIX=${PREFIX} install
- name: Build the client/server examples
- run: PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig make --file=Makefile.pkg-config
+ run: PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig make --file=Makefile.pkg-config PROFILE=debug
- name: Verify client is dynamically linked
run: LD_LIBRARY_PATH=$PREFIX/lib ldd target/client | grep "rustls"
@@ -48,4 +48,4 @@ jobs:
run: LD_LIBRARY_PATH=$PREFIX/lib ldd target/server | grep "rustls"
- name: Run the integration tests
- run: LD_LIBRARY_PATH=$PREFIX/lib make --file=Makefile.pkg-config integration
+ run: LD_LIBRARY_PATH=$PREFIX/lib make --file=Makefile.pkg-config PROFILE=debug integration
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 1191654..c01b714 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -43,9 +43,9 @@ jobs:
toolchain: ${{ matrix.rust }}
- env:
CARGO_UNSTABLE_HTTP_REGISTRY: true
- run: make CC=${{ matrix.cc }} PROFILE=release test integration
+ run: make CC=${{ matrix.cc }} PROFILE=debug test integration
- name: Platform verifier connect test
- run: make connect-test
+ run: make PROFILE=debug connect-test
valgrind:
name: Valgrind
@@ -56,7 +56,7 @@ jobs:
persist-credentials: false
- name: Install valgrind
run: sudo apt-get update && sudo apt-get install -y valgrind
- - run: VALGRIND=valgrind make test integration
+ - run: VALGRIND=valgrind make PROFILE=release test integration
test-windows-cmake-debug:
name: Windows CMake, Debug configuration