forked from kimwalisch/primecount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
186 lines (173 loc) Β· 6 KB
/
appveyor.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Automated testing using appveyor.com
# https://ci.appveyor.com/projects
version: 1.0.{build}
image:
- Ubuntu
- Ubuntu2004
- macos-bigsur
- Visual Studio 2019
branches:
except:
- gh-pages
platform:
- x64
configuration:
- Debug
- Release
for:
- matrix:
only:
- image: Ubuntu
platform: x64
configuration: Debug
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -O1"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -O1"
build_script:
# POPCNT disabled + Debug
- CXX=g++-7 cmake . -DWITH_POPCNT=OFF -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION
- grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^WITH_POPCNT:BOOL=OFF$" CMakeCache.txt
- make -j8 VERBOSE=1
test_script:
- ctest -j2
- ./primecount --test
- ./primecount 1e14 --gourdon
- ./primecount 1e12 --nth-prime
- ./primecount 1e12 --meissel
- matrix:
only:
- image: Ubuntu
platform: x64
configuration: Release
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror"
build_script:
# libdivide disabled + Release
- CXX=g++-8 cmake . -DWITH_LIBDIVIDE=OFF -DBUILD_TESTS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
- grep "^WITH_LIBDIVIDE:BOOL=OFF$" CMakeCache.txt
- make -j8 VERBOSE=1
- make install
test_script:
- ctest -j2
- ./primecount --test
- matrix:
only:
- image: Ubuntu2004
platform: x64
configuration: Debug
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
build_script:
# Test with GCC sanitizers
- cmake . -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION
- grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
- make -j8 VERBOSE=1
test_script:
- ctest -j2
- ./primecount --test
- ./primecount 1e14 --gourdon
- ./primecount 1e12 --nth-prime
- ./primecount 1e12 --meissel
- matrix:
only:
- image: Ubuntu2004
platform: x64
configuration: Release
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror"
install:
- sudo apt update
- sudo apt install -y asciidoc libxml2-utils xmlto
build_script:
# Test using old clang-9 & build man page
- CXX=clang++-9 cmake . -DBUILD_TESTS=ON -DBUILD_MANPAGE=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- grep "^OpenMP.*:INTERNAL=1$" CMakeCache.txt
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
- make -j8 VERBOSE=1
- make install
test_script:
- ctest -j2
- ./primecount --test
- matrix:
only:
- image: macos-bigsur
platform: x64
configuration: Debug
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -O1 -Wno-long-long"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -O1 -Wno-long-long"
build_script:
# This test should be without OpenMP
- cmake . -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
- make -j8 VERBOSE=1
- make install
test_script:
- ctest -j2
- ./primecount --test
- matrix:
only:
- image: macos-bigsur
platform: x64
configuration: Release
environment:
CFLAGS: "-I/usr/local/opt/libomp/include -Wall -Wextra -pedantic -Werror -Wno-long-long"
CXXFLAGS: "-I/usr/local/opt/libomp/include -Wall -Wextra -pedantic -Werror -Wno-long-long"
LDFLAGS: "-L/usr/local/opt/libomp/lib"
install:
- brew install libomp
build_script:
# Test macOS + OpenMP
- cmake . -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
- grep "^int128.*:INTERNAL=1$" CMakeCache.txt
- grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
- make -j8 VERBOSE=1
- make install
test_script:
- ctest -j2
- ./primecount --test
- matrix:
only:
- image: Visual Studio 2019
platform: x64
configuration: Debug
environment:
CFLAGS: "/W3 /WX /MP /EHsc /O1"
CXXFLAGS: "/W3 /WX /MP /EHsc /O1"
build_script:
- cmake . -G "Visual Studio 16 2019" -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="/W3 /WX /MP /EHsc /O1" -DCMAKE_BUILD_TYPE=%Configuration%
- findstr /b /e OpenMP:INTERNAL=1 CMakeCache.txt
- cmake --build . --config %Configuration% --target install
test_script:
- ctest -j 2 -C %Configuration%
- cd %Configuration%
- primecount.exe --test
- matrix:
only:
- image: Visual Studio 2019
platform: x64
configuration: Release
environment:
CFLAGS: "/W3 /WX /MP /EHsc"
CXXFLAGS: "/W3 /WX /MP /EHsc"
build_script:
- cmake . -G "Visual Studio 16 2019" -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="/W3 /WX /MP /EHsc" -DCMAKE_BUILD_TYPE=%Configuration%
- findstr /b /e OpenMP:INTERNAL=1 CMakeCache.txt
- cmake --build . --config %Configuration% --target install
test_script:
- ctest -j 2 -C %Configuration%
- cd %Configuration%
- primecount.exe --test