Skip to content

Commit 00d5684

Browse files
committed
Revert "Revert "added zlib-ng (disabled by default)""
This reverts commit aaafaad.
1 parent aaafaad commit 00d5684

292 files changed

Lines changed: 65717 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ project(splitcode)
44

55
include(GNUInstallDirs)
66

7+
set(EXT_PROJECTS_DIR ${PROJECT_SOURCE_DIR}/ext)
78
set(CMAKE_CXX_FLAGS_PROFILE "-g")
89

910
if(NOT CMAKE_BUILD_TYPE)
@@ -36,3 +37,23 @@ if (BUILD_FUNCTESTING)
3637
)
3738
endif(BUILD_FUNCTESTING)
3839

40+
include(ExternalProject)
41+
42+
43+
if (NOT ZLIBNG)
44+
set(NO_ZLIBNG "True")
45+
endif(NOT ZLIBNG)
46+
47+
48+
if (NOT NO_ZLIBNG)
49+
message("zlib-ng enabled.")
50+
ExternalProject_Add(zlib-ng
51+
PREFIX ${PROJECT_SOURCE_DIR}/ext/zlib-ng
52+
SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/zlib-ng
53+
BUILD_IN_SOURCE 1
54+
CONFIGURE_COMMAND mkdir -p build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX}
55+
BUILD_COMMAND cd build && make
56+
INSTALL_COMMAND ""
57+
)
58+
endif(NOT NO_ZLIBNG)
59+

ext/zlib-ng/.codecov.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
codecov:
2+
max_report_age: off
3+
notify:
4+
wait_for_ci: false
5+
require_ci_to_pass: false
6+
comment:
7+
require_base: false
8+
require_head: false
9+
coverage:
10+
status:
11+
project:
12+
default:
13+
threshold: 0.07
14+
fixes:
15+
- '/home/actions-runner/_work/zlib-ng/zlib-ng::'
16+
- '/home/actions-runner/_work/zlib-ng/zlib-ng/build/::'
17+
ignore:
18+
- usr/include/.*
19+
- /usr/include/.*
20+
- /build/usr/include/.*
21+
- usr/lib/.*
22+
- /usr/lib/.*
23+
- /build/usr/lib/.*
24+
- usr/lib64/.*
25+
- /usr/lib64/.*
26+
- /build/usr/lib64/.*
27+
- _deps/**/*

ext/zlib-ng/.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.c text
3+
*.h text
4+
Makefile text
5+
configure text eol=lf
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Static Analysis
2+
on: [push, pull_request]
3+
jobs:
4+
static-analysis:
5+
name: GCC
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v3
10+
11+
- name: Install packages (Ubuntu)
12+
run: sudo apt-get install -y gcc-10
13+
14+
- name: Generate project files
15+
run: |
16+
cmake . \
17+
-DCMAKE_BUILD_TYPE=Release \
18+
-DBUILD_SHARED_LIBS=OFF \
19+
-DWITH_FUZZERS=OFF \
20+
-DWITH_CODE_COVERAGE=OFF \
21+
-DWITH_MAINTAINER_WARNINGS=OFF
22+
env:
23+
CC: gcc-10
24+
CFLAGS:
25+
-fanalyzer
26+
-Werror
27+
-Wanalyzer-double-fclose
28+
-Wanalyzer-double-free
29+
-Wanalyzer-exposure-through-output-file
30+
-Wanalyzer-file-leak
31+
-Wanalyzer-free-of-non-heap
32+
-Wanalyzer-malloc-leak
33+
-Wanalyzer-null-argument
34+
-Wanalyzer-null-dereference
35+
-Wanalyzer-possible-null-argument
36+
-Wanalyzer-possible-null-dereference
37+
-Wanalyzer-stale-setjmp-buffer
38+
-Wanalyzer-tainted-array-index
39+
-Wanalyzer-unsafe-call-within-signal-handler
40+
-Wanalyzer-use-after-free
41+
-Wanalyzer-use-of-pointer-in-stale-stack-frame
42+
CI: true
43+
44+
- name: Compile source code
45+
run: cmake --build . --config Release > /dev/null
46+
47+
Clang:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v3
52+
53+
- name: Install packages (Ubuntu)
54+
run: sudo apt-get install -y clang-tools
55+
56+
- name: Generate project files
57+
run: |
58+
scan-build --status-bugs \
59+
cmake . \
60+
-DCMAKE_BUILD_TYPE=Release \
61+
-DBUILD_SHARED_LIBS=OFF \
62+
-DWITH_FUZZERS=OFF \
63+
-DWITH_CODE_COVERAGE=OFF \
64+
-DWITH_MAINTAINER_WARNINGS=OFF
65+
env:
66+
CI: true
67+
68+
- name: Compile source code
69+
run: |
70+
scan-build --status-bugs \
71+
cmake --build . --config Release > /dev/null

0 commit comments

Comments
 (0)