-
Notifications
You must be signed in to change notification settings - Fork 39
164 lines (129 loc) · 4.87 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CMake
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
# clang builds are broken in github actions right now: https://github.com/actions/runner-images/issues/8659
#build_linux_clang:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# BUILD_TYPE: [Release, Debug]
#
# steps:
# - uses: actions/checkout@v2
#
# - name: Configure CMake
# 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++
#
# - name: Build
# run: cmake --build build --config ${{matrix.BUILD_TYPE}}
#
# - name: Test
# working-directory: build
# run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
#
# - name: Fuzz Test
# working-directory: build
# run: |
# fuzzing/fuzz_lcs_similarity -max_total_time=30
# fuzzing/fuzz_levenshtein_distance -max_total_time=30
# fuzzing/fuzz_levenshtein_editops -max_total_time=30
# fuzzing/fuzz_indel_distance -max_total_time=30
# fuzzing/fuzz_indel_editops -max_total_time=30
# fuzzing/fuzz_osa_distance -max_total_time=30
# fuzzing/fuzz_damerau_levenshtein_distance -max_total_time=30
build_linux_gcc:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BUILD_TYPE: [Release, Debug]
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1 -DCMAKE_CXX_COMPILER=g++
- name: Build
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
- name: Test
working-directory: build
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
build_windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
BUILD_TYPE: [Release, Debug]
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DRAPIDFUZZ_BUILD_TESTING=1 -DRAPIDFUZZ_ENABLE_LINTERS=1
- name: Build
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
- name: Test
working-directory: build
run: ctest -C ${{matrix.BUILD_TYPE}} --rerun-failed --output-on-failure
build_cmake_installed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Install RapidFuzz
run: sudo cmake --build build --target install
- name: Configure example project
working-directory: examples/cmake_installed
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build example project
working-directory: examples/cmake_installed
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Run example project
working-directory: examples/cmake_installed/build
run: ./foo
build_cmake_subdir:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BUILD_TYPE: [Release, Debug]
steps:
- uses: actions/checkout@v2
- name: Configure the library dependent on RapidFuzz
working-directory: examples/cmake_export
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
- name: Build the library dependent on RapidFuzz
working-directory: examples/cmake_export
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
- name: Install the library dependent on RapidFuzz
working-directory: examples/cmake_export
run: sudo cmake --build build --target install
- name: Configure the app indirectly dependent on RapidFuzz
working-directory: examples/cmake_export/indirect_app
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
- name: Build the app indirectly dependent on RapidFuzz
working-directory: examples/cmake_export/indirect_app
run: cmake --build build --config ${{matrix.BUILD_TYPE}}
- name: Run the app indirectly dependent on RapidFuzz
working-directory: examples/cmake_export/indirect_app/build
run: ./fooapp
build_cpack_installed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Install RapidFuzz
working-directory: build
run: |
cpack -G DEB
sudo dpkg -i *.deb
- name: Configure example project
working-directory: examples/cmake_installed
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build example project
working-directory: examples/cmake_installed
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Run example project
working-directory: examples/cmake_installed/build
run: ./foo