2019-04-18 16:26:52 +01:00
|
|
|
version: 2.1
|
2019-02-28 13:27:32 +00:00
|
|
|
|
|
|
|
.emulated_job: &defaultjob
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-04-18 08:19:24 +01:00
|
|
|
- run: &checkouttask
|
2019-04-05 09:45:06 +01:00
|
|
|
name: Pull submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2019-04-18 08:19:24 +01:00
|
|
|
git checkout $CIRCLECI_BRANCH
|
|
|
|
git reset --hard $CIRCLECI_SHA1
|
2019-02-28 13:27:32 +00:00
|
|
|
- run:
|
|
|
|
name: Install the emulation handlers
|
|
|
|
command: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
2019-12-12 10:35:19 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-ccache-{{ .Environment.CIRCLE_JOB }}
|
2019-02-28 13:27:32 +00:00
|
|
|
- run:
|
|
|
|
name: Run the tests in a container
|
|
|
|
command: |
|
2019-12-12 10:35:19 +00:00
|
|
|
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 "
|
2019-02-28 13:27:32 +00:00
|
|
|
uname -a &&
|
2019-12-12 10:35:19 +00:00
|
|
|
export CCACHE_NOSTATS=1 &&
|
|
|
|
export CCACHE_DIR=/ccache &&
|
|
|
|
export CCACHE_SLOPPINESS=include_file_mtime &&
|
|
|
|
export CC=\"ccache ${CC}\" &&
|
2019-04-05 11:51:35 +01:00
|
|
|
pip3 install -r requirements.txt &&
|
2019-04-18 10:16:47 +01:00
|
|
|
mkdir test-results &&
|
2020-02-05 12:09:57 +00:00
|
|
|
cd test && python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2"
|
2019-07-29 09:38:25 +01:00
|
|
|
no_output_timeout: 2h
|
2019-12-12 10:35:19 +00:00
|
|
|
- save_cache:
|
|
|
|
key: v1-ccache-{{ .Environment.CIRCLE_JOB }}
|
|
|
|
paths:
|
|
|
|
- ~/ccache
|
2019-04-18 10:16:47 +01:00
|
|
|
- store_test_results:
|
2019-10-17 08:37:14 +01:00
|
|
|
path: test/test-results
|
2019-02-28 13:27:32 +00:00
|
|
|
|
|
|
|
.native_job: &nativejob
|
|
|
|
docker:
|
|
|
|
- image: pqclean/ci-container:$ARCH
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-04-05 09:45:06 +01:00
|
|
|
- run:
|
2019-04-18 08:19:24 +01:00
|
|
|
<<: *checkouttask
|
2019-12-12 10:35:19 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-ccache-{{ .Environment.CIRCLE_JOB }}
|
2019-02-28 13:27:32 +00:00
|
|
|
- run:
|
|
|
|
name: Run tests
|
|
|
|
command: |
|
2019-12-12 10:35:19 +00:00
|
|
|
export CCACHE_NOSTATS=1
|
|
|
|
export CCACHE_DIR=/ccache
|
|
|
|
export CCACHE_SLOPPINESS=include_file_mtime
|
|
|
|
export CC="ccache ${CC}"
|
2019-04-16 13:17:18 +01:00
|
|
|
export PQCLEAN_ONLY_DIFF=1
|
2019-04-29 14:48:44 +01:00
|
|
|
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
|
2019-04-18 10:16:47 +01:00
|
|
|
pip3 install -r requirements.txt
|
|
|
|
mkdir test-results
|
|
|
|
cd test
|
2020-02-05 12:09:57 +00:00
|
|
|
python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2
|
2019-07-29 09:38:25 +01:00
|
|
|
no_output_timeout: 2h
|
2019-04-18 10:16:47 +01:00
|
|
|
- store_test_results:
|
2019-08-07 09:03:17 +01:00
|
|
|
path: test/test-results
|
|
|
|
- store_artifacts:
|
|
|
|
path: test/test-results
|
2019-12-12 10:35:19 +00:00
|
|
|
- save_cache:
|
|
|
|
key: v1-ccache-{{ .Environment.CIRCLE_JOB }}
|
|
|
|
paths:
|
|
|
|
- /ccache
|
2019-02-28 13:27:32 +00:00
|
|
|
|
|
|
|
jobs:
|
2019-08-28 12:16:07 +01:00
|
|
|
# First the KEM jobs
|
|
|
|
arm32-gcc-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: armhf
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
arm32-clang-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: armhf
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
ppc-clang-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: unstable-ppc
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
ppc-gcc-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: unstable-ppc
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
amd64-gcc-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: amd64
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
amd64-clang-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-02-28 13:27:32 +00:00
|
|
|
ARCH: amd64
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
i386-gcc-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: i386
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
i386-clang-kem:
|
2019-02-28 13:27:32 +00:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-02-28 13:27:32 +00:00
|
|
|
ARCH: i386
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
2019-04-18 16:26:52 +01:00
|
|
|
# These are for the scheduled builds
|
2019-08-28 12:16:07 +01:00
|
|
|
arm32-gcc-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: armhf
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
arm32-clang-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: armhf
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
ppc-clang-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
ppc-gcc-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
amd64-gcc-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: amd64
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
amd64-clang-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-04-18 16:26:52 +01:00
|
|
|
ARCH: amd64
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
i386-gcc-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: i386
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
i386-clang-slow-kem:
|
2019-04-18 16:26:52 +01:00
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-04-18 16:26:52 +01:00
|
|
|
ARCH: i386
|
|
|
|
RUN_SLOW: 1
|
2019-08-28 12:16:07 +01:00
|
|
|
PQCLEAN_ONLY_TYPES: kem
|
|
|
|
# the Sign jobs
|
|
|
|
arm32-gcc-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: armhf
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
arm32-clang-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: armhf
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
ppc-clang-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
ppc-gcc-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
amd64-gcc-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: amd64
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
amd64-clang-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-08-28 12:16:07 +01:00
|
|
|
ARCH: amd64
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
i386-gcc-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: i386
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
i386-clang-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-08-28 12:16:07 +01:00
|
|
|
ARCH: i386
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
# These are for the scheduled builds
|
|
|
|
arm32-gcc-slow-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: armhf
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
arm32-clang-slow-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: armhf
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
ppc-clang-slow-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: clang
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
ppc-gcc-slow-sign:
|
|
|
|
<<: *defaultjob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: unstable-ppc
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
amd64-gcc-slow-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: amd64
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
amd64-clang-slow-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-08-28 12:16:07 +01:00
|
|
|
ARCH: amd64
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
i386-gcc-slow-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
|
|
|
CC: gcc
|
|
|
|
ARCH: i386
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
|
|
|
i386-clang-slow-sign:
|
|
|
|
<<: *nativejob
|
|
|
|
environment:
|
2020-01-22 09:36:36 +00:00
|
|
|
CC: clang
|
2019-08-28 12:16:07 +01:00
|
|
|
ARCH: i386
|
|
|
|
RUN_SLOW: 1
|
|
|
|
PQCLEAN_ONLY_TYPES: sign
|
2019-02-28 13:27:32 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
2019-08-28 12:16:07 +01:00
|
|
|
# AMD64
|
|
|
|
- amd64-gcc-kem
|
|
|
|
- amd64-clang-kem
|
|
|
|
- amd64-gcc-sign
|
|
|
|
- amd64-clang-sign
|
|
|
|
# i386
|
|
|
|
- i386-gcc-kem: &i386
|
2019-04-18 16:26:52 +01:00
|
|
|
requires:
|
2019-08-28 12:16:07 +01:00
|
|
|
- amd64-gcc-kem
|
|
|
|
- amd64-gcc-sign
|
|
|
|
- amd64-clang-kem
|
|
|
|
- amd64-clang-sign
|
|
|
|
- i386-clang-kem:
|
|
|
|
<<: *i386
|
|
|
|
- i386-gcc-sign:
|
|
|
|
<<: *i386
|
|
|
|
- i386-clang-sign:
|
|
|
|
<<: *i386
|
2019-10-17 11:14:23 +01:00
|
|
|
# ARM 32 bit
|
|
|
|
- arm32-gcc-kem: &arm32
|
2019-04-18 16:26:52 +01:00
|
|
|
requires:
|
2019-08-28 12:16:07 +01:00
|
|
|
- i386-gcc-kem
|
|
|
|
- i386-gcc-sign
|
|
|
|
- i386-clang-kem
|
2019-10-17 11:14:23 +01:00
|
|
|
- i386-clang-sign
|
2019-08-28 12:16:07 +01:00
|
|
|
- arm32-clang-kem:
|
|
|
|
<<: *arm32
|
|
|
|
- arm32-gcc-sign:
|
|
|
|
<<: *arm32
|
|
|
|
- arm32-clang-sign:
|
|
|
|
<<: *arm32
|
|
|
|
# PPC
|
|
|
|
- ppc-gcc-kem: &ppc
|
2019-04-18 16:26:52 +01:00
|
|
|
requires:
|
2019-08-28 12:16:07 +01:00
|
|
|
- arm32-gcc-kem
|
|
|
|
- arm32-clang-kem
|
|
|
|
- arm32-gcc-sign
|
|
|
|
- arm32-clang-sign
|
|
|
|
- ppc-clang-kem:
|
|
|
|
<<: *ppc
|
|
|
|
- ppc-gcc-sign:
|
|
|
|
<<: *ppc
|
|
|
|
- ppc-clang-sign:
|
|
|
|
<<: *ppc
|
2019-04-18 16:26:52 +01:00
|
|
|
scheduled:
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
2019-08-07 09:03:39 +01:00
|
|
|
cron: "0 5 * * 6"
|
2019-04-18 16:26:52 +01:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: master
|
|
|
|
jobs:
|
2019-08-28 12:16:07 +01:00
|
|
|
- amd64-clang-slow-kem
|
|
|
|
- amd64-clang-slow-sign
|
|
|
|
- amd64-gcc-slow-kem
|
|
|
|
- amd64-gcc-slow-sign
|
|
|
|
- arm32-clang-slow-kem
|
|
|
|
- arm32-clang-slow-sign
|
|
|
|
- arm32-gcc-slow-kem
|
|
|
|
- arm32-gcc-slow-sign
|
|
|
|
- i386-clang-slow-kem
|
|
|
|
- i386-clang-slow-sign
|
|
|
|
- i386-gcc-slow-kem
|
|
|
|
- i386-gcc-slow-sign
|
|
|
|
- ppc-clang-slow-kem
|
|
|
|
- ppc-clang-slow-sign
|
|
|
|
- ppc-gcc-slow-kem
|
|
|
|
- ppc-gcc-slow-sign
|
2019-04-18 16:26:52 +01:00
|
|
|
|
|
|
|
# vim: set ft=yaml ts=2 sw=2 tw=0 et :
|
2019-02-28 13:27:32 +00:00
|
|
|
|
|
|
|
# vim: set ft=yaml ts=2 sw=2 tw=0 et :
|