You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

388 lines
11 KiB

  1. version: 2.1
  2. .emulated_job: &defaultjob
  3. machine: true
  4. steps:
  5. - checkout
  6. - run: &checkouttask
  7. name: Pull submodules
  8. command: |
  9. git submodule init
  10. git submodule update
  11. git checkout $CIRCLECI_BRANCH
  12. git reset --hard $CIRCLECI_SHA1
  13. - run:
  14. name: Install the emulation handlers
  15. command: docker run --rm --privileged multiarch/qemu-user-static:register --reset
  16. - restore_cache:
  17. keys:
  18. - v1-ccache-{{ .Environment.CIRCLE_JOB }}
  19. - run:
  20. name: Run the tests in a container
  21. command: |
  22. docker run -e CI=true -e PQCLEAN_ONLY_TYPES -e PQCLEAN_ONLY_DIFF=1 -e PQCLEAN_SKIP_SCHEMES=sphincs-haraka-128f-robust,sphincs-haraka-192s-robust,sphincs-sha256-128f-robust,sphincs-sha256-192s-robust,sphincs-shake256-128f-robust,sphincs-shake256-192s-robust,sphincs-haraka-128f-simple,sphincs-haraka-192s-simple,sphincs-sha256-128f-simple,sphincs-sha256-192s-simple,sphincs-shake256-128f-simple,sphincs-shake256-192s-simple,sphincs-haraka-128s-robust,sphincs-haraka-256f-robust,sphincs-sha256-128s-robust,sphincs-sha256-256f-robust,sphincs-shake256-128s-robust,sphincs-shake256-256f-robust,sphincs-haraka-128s-simple,sphincs-haraka-256f-simple,sphincs-sha256-128s-simple,sphincs-sha256-256f-simple,sphincs-shake256-128s-simple,sphincs-shake256-256f-simple,sphincs-haraka-192f-robust,sphincs-haraka-256s-robust,sphincs-sha256-192f-robust,sphincs-sha256-256s-robust,sphincs-shake256-192f-robust,sphincs-shake256-256s-robust,sphincs-haraka-192f-simple,sphincs-haraka-256s-simple,sphincs-sha256-192f-simple,sphincs-sha256-256s-simple,sphincs-shake256-192f-simple,sphincs-shake256-256s-simple --rm -v `pwd`:`pwd` -w `pwd` -v ~/ccache:/ccache "pqclean/ci-container:$ARCH" /bin/bash -c "
  23. uname -a &&
  24. PQCLEAN_SKIP_TESTS=api_h,char,duplicate_consistency,metadata,preprocessor,no_symlinks,microsoft_nmakefile_present,makefile_present,format,license,clang_tidy
  25. export CCACHE_NOSTATS=1 &&
  26. export CCACHE_DIR=/ccache &&
  27. export CCACHE_SLOPPINESS=include_file_mtime &&
  28. export CC=\"ccache ${CC}\" &&
  29. pip3 install -r requirements.txt &&
  30. mkdir test-results &&
  31. cd test && python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2"
  32. no_output_timeout: 2h
  33. - save_cache:
  34. key: v1-ccache-{{ .Environment.CIRCLE_JOB }}
  35. paths:
  36. - ~/ccache
  37. - store_test_results:
  38. path: test/test-results
  39. .native_job: &nativejob
  40. docker:
  41. - image: pqclean/ci-container:$ARCH
  42. steps:
  43. - checkout
  44. - run:
  45. <<: *checkouttask
  46. - restore_cache:
  47. keys:
  48. - v1-ccache-{{ .Environment.CIRCLE_JOB }}
  49. - run:
  50. name: Run tests
  51. command: |
  52. export CCACHE_NOSTATS=1
  53. export CCACHE_DIR=/ccache
  54. export CCACHE_SLOPPINESS=include_file_mtime
  55. export CC="ccache ${CC}"
  56. export PQCLEAN_ONLY_DIFF=1
  57. export PQCLEAN_SKIP_SCHEMES=sphincs-haraka-128f-robust,sphincs-haraka-192s-robust,sphincs-sha256-128f-robust,sphincs-sha256-192s-robust,sphincs-shake256-128f-robust,sphincs-shake256-192s-robust,sphincs-haraka-128f-simple,sphincs-haraka-192s-simple,sphincs-sha256-128f-simple,sphincs-sha256-192s-simple,sphincs-shake256-128f-simple,sphincs-shake256-192s-simple,sphincs-haraka-128s-robust,sphincs-haraka-256f-robust,sphincs-sha256-128s-robust,sphincs-sha256-256f-robust,sphincs-shake256-128s-robust,sphincs-shake256-256f-robust,sphincs-haraka-128s-simple,sphincs-haraka-256f-simple,sphincs-sha256-128s-simple,sphincs-sha256-256f-simple,sphincs-shake256-128s-simple,sphincs-shake256-256f-simple,sphincs-haraka-192f-robust,sphincs-haraka-256s-robust,sphincs-sha256-192f-robust,sphincs-sha256-256s-robust,sphincs-shake256-192f-robust,sphincs-shake256-256s-robust,sphincs-haraka-192f-simple,sphincs-haraka-256s-simple,sphincs-sha256-192f-simple,sphincs-sha256-256s-simple,sphincs-shake256-192f-simple,sphincs-shake256-256s-simple
  58. pip3 install -r requirements.txt
  59. mkdir test-results
  60. cd test
  61. python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2
  62. no_output_timeout: 2h
  63. - store_test_results:
  64. path: test/test-results
  65. - store_artifacts:
  66. path: test/test-results
  67. - save_cache:
  68. key: v1-ccache-{{ .Environment.CIRCLE_JOB }}
  69. paths:
  70. - /ccache
  71. jobs:
  72. # First the KEM jobs
  73. arm32-gcc-kem:
  74. <<: *defaultjob
  75. environment:
  76. CC: gcc
  77. ARCH: armhf
  78. PQCLEAN_ONLY_TYPES: kem
  79. arm32-clang-kem:
  80. <<: *defaultjob
  81. environment:
  82. CC: clang
  83. ARCH: armhf
  84. PQCLEAN_ONLY_TYPES: kem
  85. ppc-clang-kem:
  86. <<: *defaultjob
  87. environment:
  88. CC: clang
  89. ARCH: unstable-ppc
  90. PQCLEAN_ONLY_TYPES: kem
  91. ppc-gcc-kem:
  92. <<: *defaultjob
  93. environment:
  94. CC: gcc
  95. ARCH: unstable-ppc
  96. PQCLEAN_ONLY_TYPES: kem
  97. amd64-gcc-kem:
  98. <<: *nativejob
  99. environment:
  100. CC: gcc
  101. ARCH: amd64
  102. PQCLEAN_ONLY_TYPES: kem
  103. amd64-clang-kem:
  104. <<: *nativejob
  105. environment:
  106. CC: clang
  107. ARCH: amd64
  108. PQCLEAN_ONLY_TYPES: kem
  109. amd64-clang-sanitizers-kem:
  110. <<: *nativejob
  111. environment:
  112. PQCLEAN_ONLY_TESTS: test_functest_sanitizers
  113. RUN_SLOW: 1
  114. CC: clang
  115. ARCH: amd64
  116. PQCLEAN_ONLY_TYPES: kem
  117. amd64-clang-sanitizers-sign:
  118. <<: *nativejob
  119. environment:
  120. PQCLEAN_ONLY_TESTS: test_functest_sanitizers
  121. RUN_SLOW: 1
  122. CC: clang
  123. ARCH: amd64
  124. PQCLEAN_ONLY_TYPES: sign
  125. i386-gcc-kem:
  126. <<: *nativejob
  127. environment:
  128. CC: gcc
  129. ARCH: i386
  130. PQCLEAN_ONLY_TYPES: kem
  131. i386-clang-kem:
  132. <<: *nativejob
  133. environment:
  134. CC: clang
  135. ARCH: i386
  136. PQCLEAN_ONLY_TYPES: kem
  137. # These are for the scheduled builds
  138. arm32-gcc-slow-kem:
  139. <<: *defaultjob
  140. environment:
  141. CC: gcc
  142. ARCH: armhf
  143. RUN_SLOW: 1
  144. PQCLEAN_ONLY_TYPES: kem
  145. arm32-clang-slow-kem:
  146. <<: *defaultjob
  147. environment:
  148. CC: clang
  149. ARCH: armhf
  150. RUN_SLOW: 1
  151. PQCLEAN_ONLY_TYPES: kem
  152. ppc-clang-slow-kem:
  153. <<: *defaultjob
  154. environment:
  155. CC: clang
  156. ARCH: unstable-ppc
  157. RUN_SLOW: 1
  158. PQCLEAN_ONLY_TYPES: kem
  159. ppc-gcc-slow-kem:
  160. <<: *defaultjob
  161. environment:
  162. CC: gcc
  163. ARCH: unstable-ppc
  164. RUN_SLOW: 1
  165. PQCLEAN_ONLY_TYPES: kem
  166. amd64-gcc-slow-kem:
  167. <<: *nativejob
  168. environment:
  169. CC: gcc
  170. ARCH: amd64
  171. RUN_SLOW: 1
  172. PQCLEAN_ONLY_TYPES: kem
  173. amd64-clang-slow-kem:
  174. <<: *nativejob
  175. environment:
  176. CC: clang
  177. ARCH: amd64
  178. RUN_SLOW: 1
  179. PQCLEAN_ONLY_TYPES: kem
  180. i386-gcc-slow-kem:
  181. <<: *nativejob
  182. environment:
  183. CC: gcc
  184. ARCH: i386
  185. RUN_SLOW: 1
  186. PQCLEAN_ONLY_TYPES: kem
  187. i386-clang-slow-kem:
  188. <<: *nativejob
  189. environment:
  190. CC: clang
  191. ARCH: i386
  192. RUN_SLOW: 1
  193. PQCLEAN_ONLY_TYPES: kem
  194. # the Sign jobs
  195. arm32-gcc-sign:
  196. <<: *defaultjob
  197. environment:
  198. CC: gcc
  199. ARCH: armhf
  200. PQCLEAN_ONLY_TYPES: sign
  201. arm32-clang-sign:
  202. <<: *defaultjob
  203. environment:
  204. CC: clang
  205. ARCH: armhf
  206. PQCLEAN_ONLY_TYPES: sign
  207. ppc-clang-sign:
  208. <<: *defaultjob
  209. environment:
  210. CC: clang
  211. ARCH: unstable-ppc
  212. PQCLEAN_ONLY_TYPES: sign
  213. ppc-gcc-sign:
  214. <<: *defaultjob
  215. environment:
  216. CC: gcc
  217. ARCH: unstable-ppc
  218. PQCLEAN_ONLY_TYPES: sign
  219. amd64-gcc-sign:
  220. <<: *nativejob
  221. environment:
  222. CC: gcc
  223. ARCH: amd64
  224. PQCLEAN_ONLY_TYPES: sign
  225. amd64-clang-sign:
  226. <<: *nativejob
  227. environment:
  228. CC: clang
  229. ARCH: amd64
  230. PQCLEAN_ONLY_TYPES: sign
  231. i386-gcc-sign:
  232. <<: *nativejob
  233. environment:
  234. CC: gcc
  235. ARCH: i386
  236. PQCLEAN_ONLY_TYPES: sign
  237. i386-clang-sign:
  238. <<: *nativejob
  239. environment:
  240. CC: clang
  241. ARCH: i386
  242. PQCLEAN_ONLY_TYPES: sign
  243. # These are for the scheduled builds
  244. arm32-gcc-slow-sign:
  245. <<: *defaultjob
  246. environment:
  247. CC: gcc
  248. ARCH: armhf
  249. RUN_SLOW: 1
  250. PQCLEAN_ONLY_TYPES: sign
  251. arm32-clang-slow-sign:
  252. <<: *defaultjob
  253. environment:
  254. CC: clang
  255. ARCH: armhf
  256. RUN_SLOW: 1
  257. PQCLEAN_ONLY_TYPES: sign
  258. ppc-clang-slow-sign:
  259. <<: *defaultjob
  260. environment:
  261. CC: clang
  262. ARCH: unstable-ppc
  263. RUN_SLOW: 1
  264. PQCLEAN_ONLY_TYPES: sign
  265. ppc-gcc-slow-sign:
  266. <<: *defaultjob
  267. environment:
  268. CC: gcc
  269. ARCH: unstable-ppc
  270. RUN_SLOW: 1
  271. PQCLEAN_ONLY_TYPES: sign
  272. amd64-gcc-slow-sign:
  273. <<: *nativejob
  274. environment:
  275. CC: gcc
  276. ARCH: amd64
  277. RUN_SLOW: 1
  278. PQCLEAN_ONLY_TYPES: sign
  279. amd64-clang-slow-sign:
  280. <<: *nativejob
  281. environment:
  282. CC: clang
  283. ARCH: amd64
  284. RUN_SLOW: 1
  285. PQCLEAN_ONLY_TYPES: sign
  286. i386-gcc-slow-sign:
  287. <<: *nativejob
  288. environment:
  289. CC: gcc
  290. ARCH: i386
  291. RUN_SLOW: 1
  292. PQCLEAN_ONLY_TYPES: sign
  293. i386-clang-slow-sign:
  294. <<: *nativejob
  295. environment:
  296. CC: clang
  297. ARCH: i386
  298. RUN_SLOW: 1
  299. PQCLEAN_ONLY_TYPES: sign
  300. workflows:
  301. version: 2
  302. build:
  303. jobs:
  304. # AMD64
  305. - amd64-gcc-kem
  306. - amd64-clang-kem
  307. - amd64-gcc-sign
  308. - amd64-clang-sign
  309. - amd64-clang-sanitizers-kem: &sanitizers
  310. requires:
  311. - amd64-gcc-kem
  312. - amd64-gcc-sign
  313. - amd64-clang-kem
  314. - amd64-clang-sign
  315. - amd64-clang-sanitizers-sign:
  316. <<: *sanitizers
  317. # i386
  318. - i386-gcc-kem: &i386
  319. requires:
  320. - amd64-gcc-kem
  321. - amd64-gcc-sign
  322. - amd64-clang-kem
  323. - amd64-clang-sign
  324. - i386-clang-kem:
  325. <<: *i386
  326. - i386-gcc-sign:
  327. <<: *i386
  328. - i386-clang-sign:
  329. <<: *i386
  330. # ARM 32 bit
  331. - arm32-gcc-kem: &arm32
  332. requires:
  333. - i386-gcc-kem
  334. - i386-gcc-sign
  335. - i386-clang-kem
  336. - i386-clang-sign
  337. - arm32-clang-kem:
  338. <<: *arm32
  339. - arm32-gcc-sign:
  340. <<: *arm32
  341. - arm32-clang-sign:
  342. <<: *arm32
  343. # PPC
  344. - ppc-gcc-kem: &ppc
  345. requires:
  346. - arm32-gcc-kem
  347. - arm32-clang-kem
  348. - arm32-gcc-sign
  349. - arm32-clang-sign
  350. - ppc-clang-kem:
  351. <<: *ppc
  352. - ppc-gcc-sign:
  353. <<: *ppc
  354. - ppc-clang-sign:
  355. <<: *ppc
  356. scheduled:
  357. triggers:
  358. - schedule:
  359. cron: "0 5 * * 6"
  360. filters:
  361. branches:
  362. only: master
  363. jobs:
  364. - amd64-clang-slow-kem
  365. - amd64-clang-slow-sign
  366. - amd64-gcc-slow-kem
  367. - amd64-gcc-slow-sign
  368. - arm32-clang-slow-kem
  369. - arm32-clang-slow-sign
  370. - arm32-gcc-slow-kem
  371. - arm32-gcc-slow-sign
  372. - i386-clang-slow-kem
  373. - i386-clang-slow-sign
  374. - i386-gcc-slow-kem
  375. - i386-gcc-slow-sign
  376. - ppc-clang-slow-kem
  377. - ppc-clang-slow-sign
  378. - ppc-gcc-slow-kem
  379. - ppc-gcc-slow-sign
  380. # vim: set ft=yaml ts=2 sw=2 tw=0 et :
  381. # vim: set ft=yaml ts=2 sw=2 tw=0 et :