Skip to content

Commit 9564c9b

Browse files
committed
test more compiler variants
1 parent 2db16b3 commit 9564c9b

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

.github/workflows/linux-simple.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Linux builds (basic)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: ${{matrix.compiler.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
matrix:
11+
compiler:
12+
- {cxx: g++-5, other_pkgs: g++-5}
13+
- {cxx: g++-6, other_pkgs: g++-6}
14+
- {cxx: g++-7, other_pkgs: g++-7}
15+
- {cxx: g++-8, other_pkgs: g++-8}
16+
- {cxx: g++-9, other_pkgs: g++-9}
17+
- {cxx: g++-10, other_pkgs: g++-10}
18+
- {cxx: clang++-6.0, other_pkgs: clang-6.0}
19+
- {cxx: clang++-7, other_pkgs: clang-7}
20+
- {cxx: clang++-8, other_pkgs: clang-8}
21+
- {cxx: clang++-9, other_pkgs: clang-9}
22+
- {cxx: clang++-10, other_pkgs: clang-10}
23+
build_type: [Debug, Release]
24+
std: [11, 14]
25+
#std: [11, 14, 17, 20]
26+
#exclude:
27+
# - compiler.cxx: "g++-{5,6,7,8,9,10}"
28+
# std: 17
29+
# - compiler.cxx: "g++-{5,6,7,8,9,10}"
30+
# std: 20
31+
# - compiler.cxx: "clang++-{6.0,7,8,9,10}"
32+
# std: 17
33+
# - compiler.cxx: "clang++-{6.0,7,8,9,10}"
34+
# std: 20
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Add repositories for older GCC
40+
run: |
41+
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main'
42+
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe'
43+
if: ${{ matrix.compiler.cxx == 'g++-5' || matrix.compiler.cxx == 'g++-6' }}
44+
45+
- name: Prepare environment
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y ninja-build ${{matrix.compiler.other_pkgs}}
49+
50+
- name: Configure CMake
51+
env:
52+
CXX: ${{matrix.compiler.cxx}}
53+
run: |
54+
cmake -B build \
55+
-DCMAKE_BUILD_TYPE=${{matrix.built_type}} \
56+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
57+
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
58+
-DCMAKE_CXX_EXTENSIONS=OFF \
59+
-DRAPIDFUZZ_BUILD_TESTING=1 \
60+
-DRAPIDFUZZ_ENABLE_LINTERS=1 \
61+
-DRAPIDFUZZ_BUILD_FUZZERS=1 \
62+
-G Ninja
63+
64+
- name: Build
65+
run: cmake --build build --config ${{matrix.built_type}}
66+
67+
- name: Test
68+
working-directory: build
69+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure -j `nproc`
70+
71+
- name: Fuzz Test
72+
working-directory: build
73+
run: |
74+
fuzzing/fuzz_lcs_similarity -max_total_time=30
75+
fuzzing/fuzz_levenshtein_distance -max_total_time=30
76+
fuzzing/fuzz_levenshtein_editops -max_total_time=30
77+
fuzzing/fuzz_indel_distance -max_total_time=30
78+
fuzzing/fuzz_indel_editops -max_total_time=30
79+
fuzzing/fuzz_osa_distance -max_total_time=30
80+
fuzzing/fuzz_damerau_levenshtein_distance -max_total_time=30

0 commit comments

Comments
 (0)