Skip to content

Commit 414bcf2

Browse files
authored
Merge pull request #2675 from senhuang42/ci_overhaul
[CI][1/2] Re-do the github actions workflows, migrate various travis and appveyor tests.
2 parents 3824ba6 + bb0cd72 commit 414bcf2

File tree

7 files changed

+259
-292
lines changed

7 files changed

+259
-292
lines changed

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

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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+
oss-fuzz:
140+
runs-on: ubuntu-latest
141+
strategy:
142+
fail-fast: false
143+
matrix:
144+
sanitizer: [address, undefined, memory]
145+
steps:
146+
- name: Build Fuzzers (${{ matrix.sanitizer }})
147+
id: build
148+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
149+
with:
150+
oss-fuzz-project-name: 'zstd'
151+
dry-run: false
152+
sanitizer: ${{ matrix.sanitizer }}
153+
- name: Run Fuzzers (${{ matrix.sanitizer }})
154+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
155+
with:
156+
oss-fuzz-project-name: 'zstd'
157+
fuzz-seconds: 600
158+
dry-run: false
159+
sanitizer: ${{ matrix.sanitizer }}
160+
- name: Upload Crash
161+
uses: actions/upload-artifact@v1
162+
if: failure() && steps.build.outcome == 'success'
163+
with:
164+
name: ${{ matrix.sanitizer }}-artifacts
165+
path: ./out/artifacts

.github/workflows/generic-dev.yml renamed to .github/workflows/dev-short-tests.yml

Lines changed: 72 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,29 @@
1-
name: generic-dev
1+
name: dev-short-tests
2+
# Faster tests: mostly build tests, along with some other
3+
# misc tests
4+
5+
concurrency:
6+
group: fast-${{ github.ref }}
7+
cancel-in-progress: true
28

39
on:
410
pull_request:
511
branches: [ dev, release, actionsTest ]
612

713
jobs:
8-
9-
# Dev PR jobs that still have to be migrated from travis
10-
#
11-
# versionTag (only on release tags)
12-
# valgrindTest (keeps failing for some reason. need investigation)
13-
# staticAnalyze (need trusty so need self-hosted)
14-
# pcc-fuzz: (need trusty so need self-hosted)
15-
# min-decomp-macros (flakey)
16-
#
17-
# setting up self-hosted is pretty straightforward, but
18-
# I need admins permissions to the repo for that it looks like
19-
# So I'm tabling that for now
20-
#
21-
# The release branch exclusive jobs will be in a separate
22-
# workflow file (the osx tests and meson build that is)
23-
24-
benchmarking:
14+
linux-kernel:
2515
runs-on: ubuntu-latest
2616
steps:
2717
- uses: actions/checkout@v2
28-
- name: make benchmarking
29-
run: make benchmarking
18+
- name: linux kernel, library + build + test
19+
run: make -C contrib/linux-kernel test CFLAGS="-Werror -Wunused-const-variable -Wunused-but-set-variable"
3020

31-
test:
21+
benchmarking:
3222
runs-on: ubuntu-latest
33-
env:
34-
DEVNULLRIGHTS: 1
35-
READFROMBLOCKDEVICE: 1
3623
steps:
3724
- uses: actions/checkout@v2
38-
- name: make test
39-
run: make test
25+
- name: make benchmarking
26+
run: make benchmarking
4027

4128
check-32bit: # designed to catch https://github.com/facebook/zstd/issues/2428
4229
runs-on: ubuntu-latest
@@ -62,42 +49,6 @@ jobs:
6249
# candidate test (to check) : underlink test
6350
# LDFLAGS=-Wl,--no-undefined : will make the linker fail if dll is underlinked
6451

65-
gcc-8-asan-ubsan-testzstd:
66-
runs-on: ubuntu-latest
67-
steps:
68-
- uses: actions/checkout@v2
69-
- name: gcc-8 + ASan + UBSan + Test Zstd
70-
run: |
71-
make gcc8install
72-
CC=gcc-8 CFLAGS="-Werror" make -j all
73-
make clean
74-
CC=gcc-8 make -j uasan-test-zstd </dev/null V=1
75-
76-
gcc-asan-ubsan-testzstd-32bit:
77-
runs-on: ubuntu-latest
78-
steps:
79-
- uses: actions/checkout@v2
80-
- name: ASan + UBSan + Test Zstd, 32bit mode
81-
run: |
82-
make libc6install
83-
CFLAGS="-Werror -m32" make -j all32
84-
make clean
85-
make -j uasan-test-zstd32 V=1
86-
87-
clang-msan-testzstd:
88-
runs-on: ubuntu-latest
89-
steps:
90-
- uses: actions/checkout@v2
91-
- name: clang + MSan + Test Zstd
92-
run: |
93-
sudo apt-get update
94-
sudo apt-get install clang
95-
CC=clang make msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0 V=1
96-
97-
# Note : external libraries must be turned off when using MSAN tests,
98-
# because they are not msan-instrumented,
99-
# so any data coming from these libraries is always considered "uninitialized"
100-
10152
cmake-build-and-test-check:
10253
runs-on: ubuntu-latest
10354
steps:
@@ -109,44 +60,6 @@ jobs:
10960
cd "../zstd source"
11061
FUZZERTEST=-T1mn ZSTREAM_TESTTIME=-T1mn make cmakebuild
11162
112-
gcc-8-asan-ubsan-fuzz:
113-
runs-on: ubuntu-latest
114-
steps:
115-
- uses: actions/checkout@v2
116-
- name: gcc-8 + ASan + UBSan + Fuzz Test
117-
run: |
118-
make gcc8install
119-
CC=gcc-8 FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
120-
121-
gcc-asan-ubsan-fuzz32:
122-
runs-on: ubuntu-latest
123-
steps:
124-
- uses: actions/checkout@v2
125-
- name: ASan + UBSan + Fuzz Test 32bit
126-
run: |
127-
make libc6install
128-
CFLAGS="-O2 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest
129-
130-
clang-msan-fuzz:
131-
runs-on: ubuntu-latest
132-
steps:
133-
- uses: actions/checkout@v2
134-
- name: clang + MSan + Fuzz Test
135-
run: |
136-
sudo apt-get update
137-
sudo apt-get install clang
138-
CC=clang FUZZER_FLAGS="--long-tests" make clean msan-fuzztest
139-
140-
asan-ubsan-msan-regression:
141-
runs-on: ubuntu-latest
142-
steps:
143-
- uses: actions/checkout@v2
144-
- name: ASan + UBSan + MSan + Regression Test
145-
run: |
146-
make -j uasanregressiontest
147-
make clean
148-
make -j msanregressiontest
149-
15063
cpp-gnu90-c99-compatibility:
15164
runs-on: ubuntu-latest
15265
steps:
@@ -180,15 +93,6 @@ jobs:
18093
make arminstall
18194
make armbuild
18295
183-
armfuzz:
184-
runs-on: ubuntu-latest
185-
steps:
186-
- uses: actions/checkout@v2
187-
- name: Qemu ARM emulation + Fuzz Test
188-
run: |
189-
make arminstall
190-
make armfuzz
191-
19296
bourne-shell:
19397
runs-on: ubuntu-latest
19498
steps:
@@ -199,6 +103,65 @@ jobs:
199103
tar -xf shellcheck-v0.7.1.linux.x86_64.tar.xz
200104
shellcheck-v0.7.1/shellcheck --shell=sh --severity=warning --exclude=SC2010 tests/playTests.sh
201105
106+
zlib-wrapper:
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: actions/checkout@v2
110+
- name: zlib wrapper test
111+
run: |
112+
make valgrindinstall
113+
make -C zlibWrapper test
114+
make -C zlibWrapper valgrindTest
115+
116+
lz4-threadpool-partial-libs:
117+
runs-on: ubuntu-latest
118+
steps:
119+
- uses: actions/checkout@v2
120+
- name: LZ4, thread pool, and partial libs testslib wrapper test
121+
run: |
122+
make lz4install
123+
make -C tests test-lz4
124+
make check < /dev/null | tee # mess with lz4 console detection
125+
make clean
126+
make -C tests test-pool
127+
make clean
128+
bash tests/libzstd_partial_builds.sh
129+
130+
gcc-make-tests-32bit:
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v2
134+
- name: Make all, 32bit mode
135+
run: |
136+
make libc6install
137+
CFLAGS="-Werror -m32" make -j all32
138+
139+
gcc-8-make:
140+
runs-on: ubuntu-latest
141+
steps:
142+
- uses: actions/checkout@v2
143+
- name: gcc-8 build
144+
run: |
145+
make gcc8install
146+
CC=gcc-8 CFLAGS="-Werror" make -j all
147+
148+
visual-2015:
149+
# only GH actions windows-2016 contains VS 2015
150+
runs-on: windows-2016
151+
strategy:
152+
matrix:
153+
platform: [x64, Win32]
154+
configuration: [Debug, Release]
155+
steps:
156+
- uses: actions/checkout@v2
157+
- name: Add MSBuild to PATH
158+
uses: microsoft/[email protected]
159+
- name: Build
160+
working-directory: ${{env.GITHUB_WORKSPACE}}
161+
run: >
162+
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140
163+
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}}
164+
202165
# For reference : icc tests
203166
# icc tests are currently failing on Github Actions, likely to issues during installation stage
204167
# To be fixed later

0 commit comments

Comments
 (0)