/
appveyor.yml
132 lines (123 loc) Β· 7.17 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
# Automated testing using appveyor.com
# https://ci.appveyor.com/projects
version: 1.0.{build}
image:
- Ubuntu
- macos
- Visual Studio 2019
branches:
except:
- gh-pages
platform:
- x64
configuration:
- Debug
- Release
for:
# Test using GCC sanitizers
- matrix:
only:
- image: Ubuntu
platform: x64
configuration: Debug
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
build_script:
- cmake . -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=$CONFIGURATION
- make VERBOSE=1
test_script:
- ctest
# Run primesieve binary
- ./primesieve 1e10
- ./primesieve 1e9 --nth-prime
- ./primesieve 1e13 --dist=1e9 --size=32 --print=6
# Test printing primes and prime k-tuplets
- if [ "$(./primesieve 1e8 -p | md5sum | cut -f1 -d' ')" != "4e2b0027288a27e9c99699364877c9db" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p2 | md5sum | cut -f1 -d' ')" != "5076d235d5b03389034ec107227eab98" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p3 | md5sum | cut -f1 -d' ')" != "1b40d7e67868ccc857df11c3e0f7e0f5" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p4 | md5sum | cut -f1 -d' ')" != "b998d7cdbeae6623cdecba1b921cb2e1" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p5 | md5sum | cut -f1 -d' ')" != "1ec7d5704d7399caf43667090b5bf836" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p6 | md5sum | cut -f1 -d' ')" != "0fb813d345c94cf2012588d1f71328b5" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p | md5sum | cut -f1 -d' ')" != "5fbe254a97ad3bbc07c224908c9d59b2" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p2 | md5sum | cut -f1 -d' ')" != "7a7a770c1841a17a9a63b92b7b6532b9" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p3 | md5sum | cut -f1 -d' ')" != "72323b08c62ad8342f7331e3d6d45a64" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p4 | md5sum | cut -f1 -d' ')" != "c2b0818499f77aa35681db3826caf3f6" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p5 | md5sum | cut -f1 -d' ')" != "11b50e4f75899891a62465f6d68fb76e" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p6 | md5sum | cut -f1 -d' ')" != "5a0bc83fdef0bb116d60f356adfde52f" ]; then exit 1; fi
- matrix:
only:
- image: Ubuntu
platform: x64
configuration: Release
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long"
install:
- sudo apt update -qq
- sudo apt install -y asciidoc libxml2-utils xmlto
build_script:
- cmake . -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_MANPAGE=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- make VERBOSE=1
- make install
test_script:
- ctest
# Run primesieve binary
- ./primesieve 1e10
- ./primesieve 1e9 --nth-prime
- ./primesieve 1e13 --dist=1e9 --size=32 --print=6
# Test printing primes and prime k-tuplets
- if [ "$(./primesieve 1e8 -p | md5sum | cut -f1 -d' ')" != "4e2b0027288a27e9c99699364877c9db" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p2 | md5sum | cut -f1 -d' ')" != "5076d235d5b03389034ec107227eab98" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p3 | md5sum | cut -f1 -d' ')" != "1b40d7e67868ccc857df11c3e0f7e0f5" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p4 | md5sum | cut -f1 -d' ')" != "b998d7cdbeae6623cdecba1b921cb2e1" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p5 | md5sum | cut -f1 -d' ')" != "1ec7d5704d7399caf43667090b5bf836" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p6 | md5sum | cut -f1 -d' ')" != "0fb813d345c94cf2012588d1f71328b5" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p | md5sum | cut -f1 -d' ')" != "5fbe254a97ad3bbc07c224908c9d59b2" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p2 | md5sum | cut -f1 -d' ')" != "7a7a770c1841a17a9a63b92b7b6532b9" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p3 | md5sum | cut -f1 -d' ')" != "72323b08c62ad8342f7331e3d6d45a64" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p4 | md5sum | cut -f1 -d' ')" != "c2b0818499f77aa35681db3826caf3f6" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p5 | md5sum | cut -f1 -d' ')" != "11b50e4f75899891a62465f6d68fb76e" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p6 | md5sum | cut -f1 -d' ')" != "5a0bc83fdef0bb116d60f356adfde52f" ]; then exit 1; fi
- matrix:
only:
- image: macos
platform: x64
environment:
CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long"
CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long"
build_script:
- cmake . -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd)
- make VERBOSE=1
- make install
test_script:
- ctest
# Run primesieve binary
- ./primesieve 1e10
- ./primesieve 1e9 --nth-prime
- ./primesieve 1e13 --dist=1e9 --size=32 --print=6
# Test printing primes and prime k-tuplets
- if [ "$(./primesieve 1e8 -p | md5 | cut -f1 -d' ')" != "4e2b0027288a27e9c99699364877c9db" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p2 | md5 | cut -f1 -d' ')" != "5076d235d5b03389034ec107227eab98" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p3 | md5 | cut -f1 -d' ')" != "1b40d7e67868ccc857df11c3e0f7e0f5" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p4 | md5 | cut -f1 -d' ')" != "b998d7cdbeae6623cdecba1b921cb2e1" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p5 | md5 | cut -f1 -d' ')" != "1ec7d5704d7399caf43667090b5bf836" ]; then exit 1; fi
- if [ "$(./primesieve 1e8 -p6 | md5 | cut -f1 -d' ')" != "0fb813d345c94cf2012588d1f71328b5" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p | md5 | cut -f1 -d' ')" != "5fbe254a97ad3bbc07c224908c9d59b2" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p2 | md5 | cut -f1 -d' ')" != "7a7a770c1841a17a9a63b92b7b6532b9" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p3 | md5 | cut -f1 -d' ')" != "72323b08c62ad8342f7331e3d6d45a64" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p4 | md5 | cut -f1 -d' ')" != "c2b0818499f77aa35681db3826caf3f6" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p5 | md5 | cut -f1 -d' ')" != "11b50e4f75899891a62465f6d68fb76e" ]; then exit 1; fi
- if [ "$(./primesieve 1e10 -d1e8 -p6 | md5 | cut -f1 -d' ')" != "5a0bc83fdef0bb116d60f356adfde52f" ]; then exit 1; fi
- matrix:
only:
- image: Visual Studio 2019
platform: x64
environment:
CFLAGS: "/W3 /WX"
CXXFLAGS: "/W3 /WX"
build_script:
- cmake . -G "Visual Studio 16 2019" -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=%Configuration%
- cmake --build . --config %Configuration% --target install
test_script:
- ctest -C %Configuration%