Skip to content

Commit 305c2a0

Browse files
committed
next tes
1 parent 41a4cab commit 305c2a0

File tree

6 files changed

+282
-7
lines changed

6 files changed

+282
-7
lines changed
File renamed without changes.

.github/workflows/cmake.yml.d

+202
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
name: CMake
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: Release
7+
8+
jobs:
9+
build_linux_clang:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
BUILD_TYPE: [Release, Debug]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Configure CMake
20+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1 -DRAPIDFUZZ_BUILD_FUZZERS=1 -DCMAKE_CXX_COMPILER=clang++
21+
22+
- name: Build
23+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
24+
25+
- name: Test
26+
working-directory: build
27+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
28+
29+
- name: Fuzz Test
30+
working-directory: build
31+
run: |
32+
fuzzing/fuzz_lcs_similarity -max_total_time=30
33+
fuzzing/fuzz_levenshtein_distance -max_total_time=30
34+
fuzzing/fuzz_levenshtein_editops -max_total_time=30
35+
fuzzing/fuzz_indel_distance -max_total_time=30
36+
fuzzing/fuzz_indel_editops -max_total_time=30
37+
fuzzing/fuzz_osa_distance -max_total_time=30
38+
fuzzing/fuzz_damerau_levenshtein_distance -max_total_time=30
39+
40+
build_linux_clang_32:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
BUILD_TYPE: [Release, Debug]
46+
env:
47+
CXXFLAGS: -m32
48+
CFLAGS: -m32
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Install Dependencies
54+
run: |
55+
sudo apt update
56+
sudo apt install -y libc6-dev-i386 g++-multilib
57+
58+
- name: Configure CMake
59+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1 -DRAPIDFUZZ_BUILD_FUZZERS=1 -DCMAKE_CXX_COMPILER=clang++
60+
61+
- name: Build
62+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
63+
64+
- name: Test
65+
working-directory: build
66+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
67+
68+
- name: Fuzz Test
69+
working-directory: build
70+
run: |
71+
fuzzing/fuzz_lcs_similarity -max_total_time=30
72+
fuzzing/fuzz_levenshtein_distance -max_total_time=30
73+
fuzzing/fuzz_levenshtein_editops -max_total_time=30
74+
fuzzing/fuzz_indel_distance -max_total_time=30
75+
fuzzing/fuzz_indel_editops -max_total_time=30
76+
fuzzing/fuzz_osa_distance -max_total_time=30
77+
fuzzing/fuzz_damerau_levenshtein_distance -max_total_time=30
78+
79+
build_linux_gcc:
80+
runs-on: ubuntu-latest
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
BUILD_TYPE: [Release, Debug]
85+
86+
steps:
87+
- uses: actions/checkout@v2
88+
89+
- name: Configure CMake
90+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1 -DCMAKE_CXX_COMPILER=g++
91+
92+
- name: Build
93+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
94+
95+
- name: Test
96+
working-directory: build
97+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
98+
99+
build_windows:
100+
runs-on: windows-latest
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
BUILD_TYPE: [Release, Debug]
105+
106+
steps:
107+
- uses: actions/checkout@v2
108+
109+
- name: Configure CMake
110+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1
111+
112+
- name: Build
113+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
114+
115+
- name: Test
116+
working-directory: build
117+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
118+
119+
build_cmake_installed:
120+
runs-on: ubuntu-latest
121+
122+
steps:
123+
- uses: actions/checkout@v2
124+
125+
- name: Configure CMake
126+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
127+
128+
- name: Install RapidFuzz
129+
run: sudo cmake --build build --target install
130+
131+
- name: Configure example project
132+
working-directory: examples/cmake_installed
133+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
134+
135+
- name: Build example project
136+
working-directory: examples/cmake_installed
137+
run: cmake --build build --config ${{env.BUILD_TYPE}}
138+
139+
- name: Run example project
140+
working-directory: examples/cmake_installed/build
141+
run: ./foo
142+
143+
build_cmake_subdir:
144+
runs-on: ubuntu-latest
145+
strategy:
146+
fail-fast: false
147+
matrix:
148+
BUILD_TYPE: [Release, Debug]
149+
150+
steps:
151+
- uses: actions/checkout@v2
152+
153+
- name: Configure the library dependent on RapidFuzz
154+
working-directory: examples/cmake_export
155+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
156+
157+
- name: Build the library dependent on RapidFuzz
158+
working-directory: examples/cmake_export
159+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
160+
161+
- name: Install the library dependent on RapidFuzz
162+
working-directory: examples/cmake_export
163+
run: sudo cmake --build build --target install
164+
165+
- name: Configure the app indirectly dependent on RapidFuzz
166+
working-directory: examples/cmake_export/indirect_app
167+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
168+
169+
- name: Build the app indirectly dependent on RapidFuzz
170+
working-directory: examples/cmake_export/indirect_app
171+
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
172+
173+
- name: Run the app indirectly dependent on RapidFuzz
174+
working-directory: examples/cmake_export/indirect_app/build
175+
run: ./fooapp
176+
177+
build_cpack_installed:
178+
runs-on: ubuntu-latest
179+
180+
steps:
181+
- uses: actions/checkout@v2
182+
183+
- name: Configure CMake
184+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
185+
186+
- name: Install RapidFuzz
187+
working-directory: build
188+
run: |
189+
cpack -G DEB
190+
sudo dpkg -i *.deb
191+
192+
- name: Configure example project
193+
working-directory: examples/cmake_installed
194+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
195+
196+
- name: Build example project
197+
working-directory: examples/cmake_installed
198+
run: cmake --build build --config ${{env.BUILD_TYPE}}
199+
200+
- name: Run example project
201+
working-directory: examples/cmake_installed/build
202+
run: ./foo
+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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-22.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
compiler:
13+
- {cxx: g++-10, other_pkgs: g++-10}
14+
- {cxx: g++-11, other_pkgs: g++-11}
15+
- {cxx: clang++-11, other_pkgs: clang-11}
16+
- {cxx: clang++-12, other_pkgs: clang-12}
17+
- {cxx: clang++-13, other_pkgs: clang-13}
18+
- {cxx: clang++-14, other_pkgs: clang-14}
19+
build_type: [Debug, Release]
20+
std: [11, 14, 17, 20]
21+
#std: [11, 14, 17, 20]
22+
#exclude:
23+
# - compiler.cxx: "g++-{5,6,7,8,9,10}"
24+
# std: 17
25+
# - compiler.cxx: "g++-{5,6,7,8,9,10}"
26+
# std: 20
27+
# - compiler.cxx: "clang++-{6.0,7,8,9,10}"
28+
# std: 17
29+
# - compiler.cxx: "clang++-{6.0,7,8,9,10}"
30+
# std: 20
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Add repositories for older GCC
36+
run: |
37+
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main'
38+
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe'
39+
if: ${{ matrix.compiler.cxx == 'g++-5' || matrix.compiler.cxx == 'g++-6' }}
40+
41+
- name: Prepare environment
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y ninja-build ${{matrix.compiler.other_pkgs}}
45+
46+
- name: Configure CMake
47+
env:
48+
CXX: ${{matrix.compiler.cxx}}
49+
run: |
50+
cmake -B build \
51+
-DCMAKE_BUILD_TYPE=${{matrix.built_type}} \
52+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
53+
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
54+
-DCMAKE_CXX_EXTENSIONS=OFF \
55+
-DRAPIDFUZZ_BUILD_TESTING=1 \
56+
-DRAPIDFUZZ_ENABLE_LINTERS=1 \
57+
-DRAPIDFUZZ_BUILD_FUZZERS=1 \
58+
-G Ninja
59+
60+
- name: Build
61+
working-directory: build
62+
run: ninja
63+
64+
- name: Test
65+
working-directory: build
66+
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure -j `nproc`
67+
68+
- name: Fuzz Test
69+
working-directory: build
70+
run: |
71+
fuzzing/fuzz_lcs_similarity -max_total_time=30
72+
fuzzing/fuzz_levenshtein_distance -max_total_time=30
73+
fuzzing/fuzz_levenshtein_editops -max_total_time=30
74+
fuzzing/fuzz_indel_distance -max_total_time=30
75+
fuzzing/fuzz_indel_editops -max_total_time=30
76+
fuzzing/fuzz_osa_distance -max_total_time=30
77+
fuzzing/fuzz_damerau_levenshtein_distance -max_total_time=30"""
78+

.github/workflows/linux-simple2.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linux builds (basic)
1+
name: Linux builds (basic2)
22

33
on: [push, pull_request]
44

@@ -10,12 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
compiler:
13-
- {cxx: g++-10, other_pkgs: g++-10}
14-
- {cxx: g++-11, other_pkgs: g++-11}
15-
- {cxx: clang++-11, other_pkgs: clang-11}
16-
- {cxx: clang++-12, other_pkgs: clang-12}
17-
- {cxx: clang++-13, other_pkgs: clang-13}
18-
- {cxx: clang++-14, other_pkgs: clang-14}
13+
- {cxx: clang++-14, other_pkgs: clang}
1914
build_type: [Debug, Release]
2015
std: [11, 14, 17, 20]
2116
#std: [11, 14, 17, 20]

0 commit comments

Comments
 (0)