Skip to content

Commit c21bbfd

Browse files
committed
Migrate travis CI tests
1 parent d92fef0 commit c21bbfd

File tree

7 files changed

+283
-292
lines changed

7 files changed

+283
-292
lines changed

.github/workflows/dev-long-tests.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: dev-long-tests
2+
# Tests longer than 10mn
3+
4+
concurrency:
5+
group: long-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
on:
9+
pull_request:
10+
branches: [ dev, release, actionsTest ]
11+
12+
jobs:
13+
make-test:
14+
runs-on: ubuntu-latest
15+
env:
16+
DEVNULLRIGHTS: 1
17+
READFROMBLOCKDEVICE: 1
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: make test
21+
run: make test
22+
23+
make-test-osx:
24+
runs-on: macos-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: OS-X test
28+
run: make test # make -c lib all doesn't work because of the fact that it's not a tty
29+
30+
tsan-zstreamtest:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: thread sanitizer zstreamtest
35+
run: CC=clang ZSTREAM_TESTTIME=-T3mn make tsan-test-zstream
36+
37+
tsan-fuzztest:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: thread sanitizer fuzztest
42+
run: CC=clang make tsan-fuzztest
43+
44+
gcc-8-asan-ubsan-testzstd:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: gcc-8 + ASan + UBSan + Test Zstd
49+
run: |
50+
make gcc8install
51+
CC=gcc-8 make -j uasan-test-zstd </dev/null V=1
52+
53+
gcc-asan-ubsan-testzstd-32bit:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: ASan + UBSan + Test Zstd, 32bit mode
58+
run: |
59+
make libc6install
60+
make -j uasan-test-zstd32 V=1
61+
62+
# Note : external libraries must be turned off when using MSAN tests,
63+
# because they are not msan-instrumented,
64+
# so any data coming from these libraries is always considered "uninitialized"
65+
66+
gcc-8-asan-ubsan-fuzz:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: gcc-8 + ASan + UBSan + Fuzz Test
71+
run: |
72+
make gcc8install
73+
CC=gcc-8 FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
74+
75+
gcc-asan-ubsan-fuzz32:
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v2
79+
- name: ASan + UBSan + Fuzz Test 32bit
80+
run: |
81+
make libc6install
82+
CFLAGS="-O3 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest
83+
84+
asan-ubsan-regression:
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v2
88+
- name: ASan + UBSan + Regression Test
89+
run: make -j uasanregressiontest
90+
91+
msan-regression:
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v2
95+
- name: MSan + Regression Test
96+
run: make -j msanregressiontest
97+
98+
clang-msan-fuzz:
99+
runs-on: ubuntu-latest
100+
steps:
101+
- uses: actions/checkout@v2
102+
- name: clang + MSan + Fuzz Test
103+
run: |
104+
sudo apt-get update
105+
sudo apt-get install clang
106+
CC=clang FUZZER_FLAGS="--long-tests" make clean msan-fuzztest
107+
108+
clang-msan-testzstd:
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v2
112+
- name: clang + MSan + Test Zstd
113+
run: |
114+
sudo apt-get update
115+
sudo apt-get install clang
116+
CC=clang make msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0 V=1
117+
118+
armfuzz:
119+
runs-on: ubuntu-latest
120+
steps:
121+
- uses: actions/checkout@v2
122+
- name: Qemu ARM emulation + Fuzz Test
123+
run: |
124+
make arminstall
125+
make armfuzz
126+
127+
valgrind-fuzz-test:
128+
runs-on: ubuntu-latest
129+
steps:
130+
- uses: actions/checkout@v2
131+
- name: valgrind + fuzz test stack mode # ~ 7mn
132+
shell: 'script -q -e -c "bash {0}"'
133+
run: |
134+
make valgrindinstall
135+
make -C tests valgrindTest
136+
make clean
137+
make -C tests test-fuzzer-stackmode
138+
139+
static-analyzer-scanbuild:
140+
runs-on: ubuntu-latest
141+
steps:
142+
- uses: actions/checkout@v2
143+
- name: install scan-build
144+
run: sudo apt-get install clang-tools
145+
- name: static analyzer # ~26mn
146+
run: ZSTD_LEGACY_SUPPORT=0 make staticAnalyze
147+
148+
oss-fuzz:
149+
runs-on: ubuntu-latest
150+
strategy:
151+
fail-fast: false
152+
matrix:
153+
sanitizer: [address, undefined, memory]
154+
steps:
155+
- name: Build Fuzzers (${{ matrix.sanitizer }})
156+
id: build
157+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
158+
with:
159+
oss-fuzz-project-name: 'zstd'
160+
dry-run: false
161+
sanitizer: ${{ matrix.sanitizer }}
162+
- name: Run Fuzzers (${{ matrix.sanitizer }})
163+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
164+
with:
165+
oss-fuzz-project-name: 'zstd'
166+
fuzz-seconds: 600
167+
dry-run: false
168+
sanitizer: ${{ matrix.sanitizer }}
169+
- name: Upload Crash
170+
uses: actions/upload-artifact@v1
171+
if: failure() && steps.build.outcome == 'success'
172+
with:
173+
name: ${{ matrix.sanitizer }}-artifacts
174+
path: ./out/artifacts

0 commit comments

Comments
 (0)