File tree 6 files changed +26
-12
lines changed
6 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 13
13
- ' **.md'
14
14
- ' docs/**'
15
15
16
+ permissions :
17
+ contents : read
18
+
16
19
concurrency :
17
20
group : ${{ github.workflow }}-${{ github.ref }}
18
21
cancel-in-progress : true
22
25
runs-on : ubuntu-latest
23
26
strategy :
24
27
matrix :
25
- shared : [ON, OFF]
28
+ shared : [OFF]
26
29
steps :
27
30
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
28
31
- uses : uraimo/run-on-arch-action@v2
@@ -33,11 +36,11 @@ jobs:
33
36
with :
34
37
arch : aarch64
35
38
githubToken : ${{ github.token }}
36
- distro : ubuntu_latest
39
+ distro : ubuntu22.04
37
40
install : |
38
41
apt-get update -q -y
39
- apt-get install -y cmake make g++ ninja-build
42
+ apt-get install -y cmake make g++ ninja-build git
40
43
run : |
41
- cmake -DADA_SANITIZE =ON -DADA_DEVELOPMENT_CHECKS=ON - DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build
42
- cmake --build build -j=2
44
+ cmake -DADA_SANITIZE_BOUNDS_STRICT =ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
45
+ cmake --build build
43
46
ctest --test-dir build
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS)
59
59
60
60
if (ADA_TESTING AND NOT EMSCRIPTEN)
61
61
if (Git_FOUND)
62
+ set (CTEST_TEST_TIMEOUT 5)
62
63
message (STATUS "The tests are enabled." )
63
64
add_subdirectory (tests)
64
65
else ()
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ option(ADA_SANITIZE_UNDEFINED "Sanitize undefined behaviour" OFF)
8
8
if (ADA_SANITIZE)
9
9
message (STATUS "Address sanitizer enabled." )
10
10
endif ()
11
+ if (ADA_SANITIZE_WITHOUT_LEAKS)
12
+ message (STATUS "Address sanitizer (but not leak) enabled." )
13
+ endif ()
11
14
if (ADA_SANITIZE_UNDEFINED)
12
15
message (STATUS "Undefined sanitizer enabled." )
13
16
endif ()
@@ -35,7 +38,7 @@ if (ADA_COVERAGE)
35
38
endif ()
36
39
37
40
if (NOT CMAKE_BUILD_TYPE )
38
- if (ADA_SANITIZE OR ADA_SANITIZE_BOUNDS_STRICT OR ADA_SANITIZE_UNDEFINED)
41
+ if (ADA_SANITIZE OR ADA_SANITIZE_WITHOUT_LEAKS OR ADA_SANITIZE_BOUNDS_STRICT OR ADA_SANITIZE_UNDEFINED)
39
42
message (STATUS "No build type selected, default to Debug because you have sanitizers." )
40
43
set (CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
41
44
else ()
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ function(add_cpp_test TEST_NAME)
14
14
add_compile_options (-fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all )
15
15
add_compile_definitions (ASAN_OPTIONS=detect_leaks=1)
16
16
endif ()
17
+ if (ADA_SANITIZE_WITHOUT_LEAKS)
18
+ add_compile_options (-fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all )
19
+ endif ()
17
20
if (ADA_SANITIZE_BOUNDS_STRICT)
18
21
add_compile_options (-fsanitize=bounds-strict -fno-sanitize-recover=all )
19
22
add_link_options (-fsanitize=bounds-strict)
Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ if(ADA_SANITIZE)
50
50
target_compile_definitions (ada INTERFACE ASAN_OPTIONS=detect_leaks=1)
51
51
target_link_libraries (ada INTERFACE -fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all )
52
52
endif ()
53
+ if (ADA_SANITIZE_WITHOUT_LEAKS)
54
+ target_compile_options (ada INTERFACE -fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all )
55
+ target_link_libraries (ada INTERFACE -fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all )
56
+ endif ()
53
57
54
58
if (ADA_LOGGING)
55
59
target_compile_definitions (ada PRIVATE ADA_LOGGING=1)
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ else()
39
39
target_link_libraries (ada_c PRIVATE simdjson GTest::gtest_main)
40
40
target_link_libraries (url_search_params PRIVATE simdjson GTest::gtest_main)
41
41
42
- gtest_discover_tests(wpt_tests)
43
- gtest_discover_tests(url_components)
44
- gtest_discover_tests(basic_tests)
45
- gtest_discover_tests(from_file_tests)
46
- gtest_discover_tests(ada_c)
47
- gtest_discover_tests(url_search_params)
42
+ gtest_discover_tests(wpt_tests PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
43
+ gtest_discover_tests(url_components PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
44
+ gtest_discover_tests(basic_tests PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
45
+ gtest_discover_tests(from_file_tests PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
46
+ gtest_discover_tests(ada_c PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
47
+ gtest_discover_tests(url_search_params PROPERTIES TEST_DISCOVERY_TIMEOUT 600 )
48
48
49
49
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
50
50
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
You can’t perform that action at this time.
0 commit comments