diff options
| author | Theo Buehler <tb@openbsd.org> | 2023-04-28 18:44:59 +0200 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2023-04-28 18:44:59 +0200 |
| commit | 0b9dd2d1bc9990043cdbd01be1a93bf4da1db914 (patch) | |
| tree | 6c8be34b12f812dda6ea63916a6a3d3b7431ae91 | |
| parent | 4c2ab9981ec049bd9aa618321c747f1d48fe9a74 (diff) | |
| parent | 4fdce0c68441bcbff65ed5303fe5472c2915520a (diff) | |
| download | portable-0b9dd2d1bc9990043cdbd01be1a93bf4da1db914.tar.gz portable-0b9dd2d1bc9990043cdbd01be1a93bf4da1db914.tar.bz2 portable-0b9dd2d1bc9990043cdbd01be1a93bf4da1db914.zip | |
Land #849, no-asm ASAN
| -rw-r--r-- | .github/workflows/linux_test_asan_noasm.yml | 24 | ||||
| -rwxr-xr-x | scripts/test | 16 |
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 @@ | |||
| 1 | name: linux_ci_asan_noasm | ||
| 2 | |||
| 3 | on: [push, pull_request] | ||
| 4 | |||
| 5 | jobs: | ||
| 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 @@ | |||
| 2 | set -e | 2 | set -e |
| 3 | 3 | ||
| 4 | unset CC | 4 | unset CC |
| 5 | ENABLE_ASM="${ENABLE_ASM:=ON}" | ||
| 5 | 6 | ||
| 6 | if type apt-get >/dev/null | 7 | if type apt-get >/dev/null |
| 7 | then | 8 | then |
| @@ -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 | ||
