diff --git a/.github/workflows/analyze.yaml b/.github/workflows/analyze.yaml new file mode 100644 index 000000000..73859618d --- /dev/null +++ b/.github/workflows/analyze.yaml @@ -0,0 +1,13 @@ +name: ubsan-unit-tests +on: [push] +jobs: + build: + runs-on: rtx6000-4x + steps: + - uses: actions/checkout@v2 + - name: configure + run: | + cd lib && ./configure --enable-sm80 --disable-openmp && cd .. + - name: analyze + run: | + cd lib && scan-build -o ../_analyze --use-cc clang make diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 000000000..c8edc3546 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,16 @@ +name: ubsan-unit-tests +on: [push] +jobs: + build: + runs-on: rtx6000-4x + steps: + - uses: actions/checkout@v2 + - name: configure & build + run: | + cd lib && ./configure --enable-sm80 && cd .. + make -j 64 -C test COVER=1 all.tests + - name: tests + run: | + make -C test check + - name: coverage report + cd test && ./cover-gen.rb ../_coverage diff --git a/.github/workflows/cuda-int-tests.yaml b/.github/workflows/cuda-int-tests.yaml index 755bd9731..f72b6ced6 100644 --- a/.github/workflows/cuda-int-tests.yaml +++ b/.github/workflows/cuda-int-tests.yaml @@ -8,7 +8,7 @@ jobs: - name: configure & build run: | cd lib && ./configure --enable-sm80 && cd .. - make -j 32 -C test/int/nnc + make -j 64 -C test/int/nnc - name: integration tests run: | make -C test/int/nnc test diff --git a/.github/workflows/macos-unit-tests.yaml b/.github/workflows/macos-unit-tests.yaml index bacebe3df..3553d7877 100644 --- a/.github/workflows/macos-unit-tests.yaml +++ b/.github/workflows/macos-unit-tests.yaml @@ -2,7 +2,7 @@ name: macos-unit-tests on: [push] jobs: build: - runs-on: macos-12 + runs-on: macos-latest steps: - uses: actions/checkout@v2 - name: Install libjpeg and libpng diff --git a/.github/workflows/undef-unit-tests.yaml b/.github/workflows/ubsan-unit-tests.yaml similarity index 56% rename from .github/workflows/undef-unit-tests.yaml rename to .github/workflows/ubsan-unit-tests.yaml index f3d22b9ad..6dd8303cf 100644 --- a/.github/workflows/undef-unit-tests.yaml +++ b/.github/workflows/ubsan-unit-tests.yaml @@ -1,4 +1,4 @@ -name: undef-unit-tests +name: ubsan-unit-tests on: [push] jobs: build: @@ -8,11 +8,11 @@ jobs: - name: configure & build run: | cd lib && ./configure --enable-sm80 && cd .. - make -j 32 -C lib undef - make -j 32 -C bin undef - make -j 32 -C bin/nnc undef - make -j 32 -C bin/cuda undef - make -j 32 -C test undef + make -j 64 -C lib ubsan + make -j 64 -C bin ubsan + make -j 64 -C bin/nnc ubsan + make -j 64 -C bin/cuda ubsan + make -j 64 -C test ubsan - name: tests run: | make -C test test diff --git a/lib/scheme.mk b/lib/scheme.mk index a93af3c8b..6370649f3 100644 --- a/lib/scheme.mk +++ b/lib/scheme.mk @@ -32,18 +32,18 @@ asan: all # Undefined Scheme -UNDEF ?= 0 -ifeq ($(UNDEF), 1) +UBSAN ?= 0 +ifeq ($(UBSAN), 1) CFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined NVFLAGS += -g -O0 LDFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined endif -undef: CFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined -undef: NVFLAGS += -g -O0 -undef: LDFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined -undef: export UNDEF = 1 -undef: all +ubsan: CFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined +ubsan: NVFLAGS += -g -O0 +ubsan: LDFLAGS += -g -fno-omit-frame-pointer -O0 -fsanitize=address -fsanitize=undefined +ubsan: export UBSAN = 1 +ubsan: all # Coverage Scheme