diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2020-10-03 11:21:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 11:21:35 (GMT) |
commit | 08eb91637afcd733584d1c5ad49e02467a9163a6 (patch) | |
tree | 635cfc4db18b1b2a4a7b290e6e560baa1d4ca742 | |
parent | 3dc8664859dad031870e6a594457e32768a85df0 (diff) | |
parent | 6fa1c59e02ff84e75627a04af80605c5e99e6667 (diff) | |
download | Ninja-08eb91637afcd733584d1c5ad49e02467a9163a6.zip Ninja-08eb91637afcd733584d1c5ad49e02467a9163a6.tar.gz Ninja-08eb91637afcd733584d1c5ad49e02467a9163a6.tar.bz2 |
Merge pull request #1855 from splinter-build/add-sanitizers
Add debug build with sanitizers support, fix scan-build
-rw-r--r-- | .github/workflows/linux.yml | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 47dd062..511b92b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -22,23 +22,36 @@ jobs: curl -L -O https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/p7zip-plugins-16.02-10.el7.x86_64.rpm rpm -U --quiet p7zip-16.02-10.el7.x86_64.rpm rpm -U --quiet p7zip-plugins-16.02-10.el7.x86_64.rpm - yum install -y make gcc-c++ clang-analyzer + yum install -y make gcc-c++ libasan clang-analyzer - - name: Build ninja + - name: Build debug ninja + shell: bash + env: + CFLAGS: -fstack-protector-all -fsanitize=address + CXXFLAGS: -fstack-protector-all -fsanitize=address + run: | + scan-build -o scanlogs cmake -DCMAKE_BUILD_TYPE=Debug -B debug-build + scan-build -o scanlogs cmake --build debug-build --parallel --config Debug + + - name: Test debug ninja + run: ./ninja_test + working-directory: debug-build + + - name: Build release ninja shell: bash run: | - cmake -DCMAKE_BUILD_TYPE=Release -B build - scan-build -o scanlogs cmake --build build --parallel --config Release - strip build/ninja + cmake -DCMAKE_BUILD_TYPE=Release -B release-build + cmake --build release-build --parallel --config Release + strip release-build/ninja - - name: Test ninja + - name: Test release ninja run: ./ninja_test - working-directory: build + working-directory: release-build - name: Create ninja archive run: | mkdir artifact - 7z a artifact/ninja-linux.zip ./build/ninja + 7z a artifact/ninja-linux.zip ./release-build/ninja # Upload ninja binary archive as an artifact - name: Upload artifact |