aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/linux_test_asan_noasm.yml24
-rwxr-xr-xscripts/test16
2 files changed, 33 insertions, 7 deletions
diff --git a/.github/workflows/linux_test_asan_noasm.yml b/.github/workflows/linux_test_asan_noasm.yml
new file mode 100644
index 0000000..92ab2fc
--- /dev/null
+++ b/.github/workflows/linux_test_asan_noasm.yml
@@ -0,0 +1,24 @@
1name: linux_ci_asan_noasm
2
3on: [push, pull_request]
4
5jobs:
6 build-native:
7 name: "${{ matrix.compiler }} - ${{ matrix.os }}"
8 runs-on: "${{ matrix.os }}"
9 strategy:
10 matrix:
11 os: ["ubuntu-latest"]
12 compiler: ["clang"]
13 env:
14 CC: "${{ matrix.compiler }}"
15 ARCH: native
16 CFLAGS: "-ggdb -fsanitize=address"
17 LDFLAGS: "-fsanitize=address"
18 CTEST_OUTPUT_ON_FAILURE: 1
19 ENABLE_ASM: OFF
20 steps:
21 - name: "Checkout repository"
22 uses: actions/checkout@main
23 - name: "Run tests"
24 run: ./scripts/test
diff --git a/scripts/test b/scripts/test
index 144930f..66c4f54 100755
--- a/scripts/test
+++ b/scripts/test
@@ -2,6 +2,7 @@
2set -e 2set -e
3 3
4unset CC 4unset CC
5ENABLE_ASM="${ENABLE_ASM:=ON}"
5 6
6if type apt-get >/dev/null 7if type apt-get >/dev/null
7then 8then
@@ -27,21 +28,21 @@ if [ "x$ARCH" = "xnative" ]; then
27 28
28 # test cmake and ninja 29 # test cmake and ninja
29 if [ `uname` = "Darwin" ]; then 30 if [ `uname` = "Darwin" ]; then
30 cmake .. 31 cmake -DENABLE_ASM=${ENABLE_ASM} ..
31 make -j 4 32 make -j 4
32 make test 33 make test
33 34
34 cd ../build-shared 35 cd ../build-shared
35 cmake -DBUILD_SHARED_LIBS=ON .. 36 cmake -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} ..
36 make -j 4 37 make -j 4
37 make test 38 make test
38 else 39 else
39 cmake -GNinja .. 40 cmake -GNinja -DENABLE_ASM=${ENABLE_ASM} ..
40 ninja -j 4 41 ninja -j 4
41 ninja test 42 ninja test
42 43
43 cd ../build-shared 44 cd ../build-shared
44 cmake -GNinja -DBUILD_SHARED_LIBS=ON .. 45 cmake -GNinja -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} ..
45 ninja -j 4 46 ninja -j 4
46 ninja test 47 ninja test
47 fi 48 fi
@@ -61,14 +62,14 @@ elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then
61 rm -fr build-static 62 rm -fr build-static
62 mkdir build-static 63 mkdir build-static
63 cd build-static 64 cd build-static
64 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake .. 65 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DENABLE_ASM=${ENABLE_ASM} ..
65 ninja -j 4 66 ninja -j 4
66 ) 67 )
67 ( 68 (
68 rm -fr build-shared 69 rm -fr build-shared
69 mkdir build-shared 70 mkdir build-shared
70 cd build-shared 71 cd build-shared
71 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON .. 72 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} ..
72 ninja -j 4 73 ninja -j 4
73 ) 74 )
74 75
@@ -140,7 +141,8 @@ elif [ "x$ARCH" = "xandroid" ]; then
140 cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \ 141 cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \
141 -DANDROID_NDK=$ANDROID_NDK_HOME \ 142 -DANDROID_NDK=$ANDROID_NDK_HOME \
142 -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \ 143 -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \
143 -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .. 144 -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL \
145 -DENABLE_ASM=${ENABLE_ASM} ..
144 146
145 ninja -j 4 147 ninja -j 4
146 148