From 351d17ae7099c873b0d4223c85af507543284bf5 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Fri, 29 May 2020 15:08:51 +0200 Subject: [PATCH] Implement testing via Github actions * Fix a bunch of issues in SPHINCS+ on Windows * Fix testing makefile dependencies by fixing times of common files (affected Windows testing mainly) --- .circleci/config.yml | 387 ------------------ .github/pull_request_template.md | 5 +- .github/workflows/common.yml | 146 +++++++ .github/workflows/generate_workflows.py | 53 +++ .github/workflows/kem_firesaber.yml | 184 +++++++++ .github/workflows/kem_frodokem1344aes.yml | 184 +++++++++ .github/workflows/kem_frodokem1344shake.yml | 184 +++++++++ .github/workflows/kem_frodokem640aes.yml | 184 +++++++++ .github/workflows/kem_frodokem640shake.yml | 184 +++++++++ .github/workflows/kem_frodokem976aes.yml | 184 +++++++++ .github/workflows/kem_frodokem976shake.yml | 184 +++++++++ .github/workflows/kem_hqc-128.yml | 184 +++++++++ .github/workflows/kem_hqc-192.yml | 184 +++++++++ .github/workflows/kem_hqc-256.yml | 184 +++++++++ .github/workflows/kem_hqc-rmrs-128.yml | 184 +++++++++ .github/workflows/kem_hqc-rmrs-192.yml | 184 +++++++++ .github/workflows/kem_hqc-rmrs-256.yml | 184 +++++++++ .github/workflows/kem_kyber1024-90s.yml | 184 +++++++++ .github/workflows/kem_kyber1024.yml | 184 +++++++++ .github/workflows/kem_kyber512-90s.yml | 184 +++++++++ .github/workflows/kem_kyber512.yml | 184 +++++++++ .github/workflows/kem_kyber768-90s.yml | 184 +++++++++ .github/workflows/kem_kyber768.yml | 184 +++++++++ .github/workflows/kem_lightsaber.yml | 184 +++++++++ .github/workflows/kem_mceliece348864.yml | 184 +++++++++ .github/workflows/kem_mceliece348864f.yml | 184 +++++++++ .github/workflows/kem_mceliece460896.yml | 184 +++++++++ .github/workflows/kem_mceliece460896f.yml | 184 +++++++++ .github/workflows/kem_mceliece6688128.yml | 184 +++++++++ .github/workflows/kem_mceliece6688128f.yml | 184 +++++++++ .github/workflows/kem_mceliece6960119.yml | 184 +++++++++ .github/workflows/kem_mceliece6960119f.yml | 184 +++++++++ .github/workflows/kem_mceliece8192128.yml | 184 +++++++++ .github/workflows/kem_mceliece8192128f.yml | 184 +++++++++ .github/workflows/kem_ntruhps2048509.yml | 184 +++++++++ .github/workflows/kem_ntruhps2048677.yml | 184 +++++++++ .github/workflows/kem_ntruhps4096821.yml | 184 +++++++++ .github/workflows/kem_ntruhrss701.yml | 184 +++++++++ .github/workflows/kem_ntrulpr653.yml | 184 +++++++++ .github/workflows/kem_ntrulpr761.yml | 184 +++++++++ .github/workflows/kem_ntrulpr857.yml | 184 +++++++++ .github/workflows/kem_saber.yml | 184 +++++++++ .github/workflows/kem_sntrup653.yml | 184 +++++++++ .github/workflows/kem_sntrup761.yml | 184 +++++++++ .github/workflows/kem_sntrup857.yml | 184 +++++++++ .github/workflows/sign_dilithium2.yml | 184 +++++++++ .github/workflows/sign_dilithium3.yml | 184 +++++++++ .github/workflows/sign_dilithium4.yml | 184 +++++++++ .github/workflows/sign_falcon-1024.yml | 184 +++++++++ .github/workflows/sign_falcon-512.yml | 184 +++++++++ .../workflows/sign_rainbowIIIc-classic.yml | 184 +++++++++ .../sign_rainbowIIIc-cyclic-compressed.yml | 184 +++++++++ .github/workflows/sign_rainbowIIIc-cyclic.yml | 184 +++++++++ .github/workflows/sign_rainbowIa-classic.yml | 184 +++++++++ .../sign_rainbowIa-cyclic-compressed.yml | 184 +++++++++ .github/workflows/sign_rainbowIa-cyclic.yml | 184 +++++++++ .github/workflows/sign_rainbowVc-classic.yml | 184 +++++++++ .../sign_rainbowVc-cyclic-compressed.yml | 184 +++++++++ .github/workflows/sign_rainbowVc-cyclic.yml | 184 +++++++++ .../sign_sphincs-haraka-128f-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-128f-simple.yml | 184 +++++++++ .../sign_sphincs-haraka-128s-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-128s-simple.yml | 184 +++++++++ .../sign_sphincs-haraka-192f-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-192f-simple.yml | 184 +++++++++ .../sign_sphincs-haraka-192s-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-192s-simple.yml | 184 +++++++++ .../sign_sphincs-haraka-256f-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-256f-simple.yml | 184 +++++++++ .../sign_sphincs-haraka-256s-robust.yml | 184 +++++++++ .../sign_sphincs-haraka-256s-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-128f-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-128f-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-128s-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-128s-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-192f-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-192f-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-192s-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-192s-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-256f-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-256f-simple.yml | 184 +++++++++ .../sign_sphincs-sha256-256s-robust.yml | 184 +++++++++ .../sign_sphincs-sha256-256s-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-128f-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-128f-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-128s-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-128s-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-192f-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-192f-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-192s-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-192s-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-256f-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-256f-simple.yml | 184 +++++++++ .../sign_sphincs-shake256-256s-robust.yml | 184 +++++++++ .../sign_sphincs-shake256-256s-simple.yml | 184 +++++++++ .github/workflows/template.yml.j2 | 185 +++++++++ .travis.yml | 123 ------ CONTRIBUTING.md | 2 + appveyor.yml | 53 --- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/sha256avx.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 13 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- .../avx2/Makefile.Microsoft_nmake | 11 +- .../avx2/fips202x4.c | 6 +- requirements.txt | 1 + test/test_makefile_dependencies.py | 17 +- test/test_workflows.py | 14 + 138 files changed, 17304 insertions(+), 704 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/common.yml create mode 100644 .github/workflows/generate_workflows.py create mode 100644 .github/workflows/kem_firesaber.yml create mode 100644 .github/workflows/kem_frodokem1344aes.yml create mode 100644 .github/workflows/kem_frodokem1344shake.yml create mode 100644 .github/workflows/kem_frodokem640aes.yml create mode 100644 .github/workflows/kem_frodokem640shake.yml create mode 100644 .github/workflows/kem_frodokem976aes.yml create mode 100644 .github/workflows/kem_frodokem976shake.yml create mode 100644 .github/workflows/kem_hqc-128.yml create mode 100644 .github/workflows/kem_hqc-192.yml create mode 100644 .github/workflows/kem_hqc-256.yml create mode 100644 .github/workflows/kem_hqc-rmrs-128.yml create mode 100644 .github/workflows/kem_hqc-rmrs-192.yml create mode 100644 .github/workflows/kem_hqc-rmrs-256.yml create mode 100644 .github/workflows/kem_kyber1024-90s.yml create mode 100644 .github/workflows/kem_kyber1024.yml create mode 100644 .github/workflows/kem_kyber512-90s.yml create mode 100644 .github/workflows/kem_kyber512.yml create mode 100644 .github/workflows/kem_kyber768-90s.yml create mode 100644 .github/workflows/kem_kyber768.yml create mode 100644 .github/workflows/kem_lightsaber.yml create mode 100644 .github/workflows/kem_mceliece348864.yml create mode 100644 .github/workflows/kem_mceliece348864f.yml create mode 100644 .github/workflows/kem_mceliece460896.yml create mode 100644 .github/workflows/kem_mceliece460896f.yml create mode 100644 .github/workflows/kem_mceliece6688128.yml create mode 100644 .github/workflows/kem_mceliece6688128f.yml create mode 100644 .github/workflows/kem_mceliece6960119.yml create mode 100644 .github/workflows/kem_mceliece6960119f.yml create mode 100644 .github/workflows/kem_mceliece8192128.yml create mode 100644 .github/workflows/kem_mceliece8192128f.yml create mode 100644 .github/workflows/kem_ntruhps2048509.yml create mode 100644 .github/workflows/kem_ntruhps2048677.yml create mode 100644 .github/workflows/kem_ntruhps4096821.yml create mode 100644 .github/workflows/kem_ntruhrss701.yml create mode 100644 .github/workflows/kem_ntrulpr653.yml create mode 100644 .github/workflows/kem_ntrulpr761.yml create mode 100644 .github/workflows/kem_ntrulpr857.yml create mode 100644 .github/workflows/kem_saber.yml create mode 100644 .github/workflows/kem_sntrup653.yml create mode 100644 .github/workflows/kem_sntrup761.yml create mode 100644 .github/workflows/kem_sntrup857.yml create mode 100644 .github/workflows/sign_dilithium2.yml create mode 100644 .github/workflows/sign_dilithium3.yml create mode 100644 .github/workflows/sign_dilithium4.yml create mode 100644 .github/workflows/sign_falcon-1024.yml create mode 100644 .github/workflows/sign_falcon-512.yml create mode 100644 .github/workflows/sign_rainbowIIIc-classic.yml create mode 100644 .github/workflows/sign_rainbowIIIc-cyclic-compressed.yml create mode 100644 .github/workflows/sign_rainbowIIIc-cyclic.yml create mode 100644 .github/workflows/sign_rainbowIa-classic.yml create mode 100644 .github/workflows/sign_rainbowIa-cyclic-compressed.yml create mode 100644 .github/workflows/sign_rainbowIa-cyclic.yml create mode 100644 .github/workflows/sign_rainbowVc-classic.yml create mode 100644 .github/workflows/sign_rainbowVc-cyclic-compressed.yml create mode 100644 .github/workflows/sign_rainbowVc-cyclic.yml create mode 100644 .github/workflows/sign_sphincs-haraka-128f-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-128f-simple.yml create mode 100644 .github/workflows/sign_sphincs-haraka-128s-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-128s-simple.yml create mode 100644 .github/workflows/sign_sphincs-haraka-192f-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-192f-simple.yml create mode 100644 .github/workflows/sign_sphincs-haraka-192s-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-192s-simple.yml create mode 100644 .github/workflows/sign_sphincs-haraka-256f-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-256f-simple.yml create mode 100644 .github/workflows/sign_sphincs-haraka-256s-robust.yml create mode 100644 .github/workflows/sign_sphincs-haraka-256s-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-128f-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-128f-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-128s-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-128s-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-192f-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-192f-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-192s-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-192s-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-256f-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-256f-simple.yml create mode 100644 .github/workflows/sign_sphincs-sha256-256s-robust.yml create mode 100644 .github/workflows/sign_sphincs-sha256-256s-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-128f-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-128f-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-128s-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-128s-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-192f-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-192f-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-192s-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-192s-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-256f-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-256f-simple.yml create mode 100644 .github/workflows/sign_sphincs-shake256-256s-robust.yml create mode 100644 .github/workflows/sign_sphincs-shake256-256s-simple.yml create mode 100644 .github/workflows/template.yml.j2 delete mode 100644 appveyor.yml create mode 100644 test/test_workflows.py diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2a8e67a7..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,387 +0,0 @@ -version: 2.1 - -.emulated_job: &defaultjob - machine: true - steps: - - checkout - - run: &checkouttask - name: Pull submodules - command: | - git submodule init - git submodule update - git checkout $CIRCLECI_BRANCH - git reset --hard $CIRCLECI_SHA1 - - run: - name: Install the emulation handlers - command: docker run --rm --privileged multiarch/qemu-user-static:register --reset - - restore_cache: - keys: - - v1-ccache-{{ .Environment.CIRCLE_JOB }} - - run: - name: Run the tests in a container - command: | - 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 " - uname -a && - PQCLEAN_SKIP_TESTS=api_h,char,duplicate_consistency,metadata,preprocessor,no_symlinks,microsoft_nmakefile_present,makefile_present,format,license,clang_tidy - export CCACHE_NOSTATS=1 && - export CCACHE_DIR=/ccache && - export CCACHE_SLOPPINESS=include_file_mtime && - export CC=\"ccache ${CC}\" && - pip3 install -r requirements.txt && - mkdir test-results && - cd test && python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2" - no_output_timeout: 2h - - save_cache: - key: v1-ccache-{{ .Environment.CIRCLE_JOB }} - paths: - - ~/ccache - - store_test_results: - path: test/test-results - -.native_job: &nativejob - docker: - - image: pqclean/ci-container:$ARCH - steps: - - checkout - - run: - <<: *checkouttask - - restore_cache: - keys: - - v1-ccache-{{ .Environment.CIRCLE_JOB }} - - run: - name: Run tests - command: | - export CCACHE_NOSTATS=1 - export CCACHE_DIR=/ccache - export CCACHE_SLOPPINESS=include_file_mtime - export CC="ccache ${CC}" - export PQCLEAN_ONLY_DIFF=1 - 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 - pip3 install -r requirements.txt - mkdir test-results - cd test - python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=2 - no_output_timeout: 2h - - store_test_results: - path: test/test-results - - store_artifacts: - path: test/test-results - - save_cache: - key: v1-ccache-{{ .Environment.CIRCLE_JOB }} - paths: - - /ccache - -jobs: - # First the KEM jobs - arm32-gcc-kem: - <<: *defaultjob - environment: - CC: gcc - ARCH: armhf - PQCLEAN_ONLY_TYPES: kem - arm32-clang-kem: - <<: *defaultjob - environment: - CC: clang - ARCH: armhf - PQCLEAN_ONLY_TYPES: kem - ppc-clang-kem: - <<: *defaultjob - environment: - CC: clang - ARCH: unstable-ppc - PQCLEAN_ONLY_TYPES: kem - ppc-gcc-kem: - <<: *defaultjob - environment: - CC: gcc - ARCH: unstable-ppc - PQCLEAN_ONLY_TYPES: kem - amd64-gcc-kem: - <<: *nativejob - environment: - CC: gcc - ARCH: amd64 - PQCLEAN_ONLY_TYPES: kem - amd64-clang-kem: - <<: *nativejob - environment: - CC: clang - ARCH: amd64 - PQCLEAN_ONLY_TYPES: kem - amd64-clang-sanitizers-kem: - <<: *nativejob - environment: - PQCLEAN_ONLY_TESTS: test_functest_sanitizers - RUN_SLOW: 1 - CC: clang - ARCH: amd64 - PQCLEAN_ONLY_TYPES: kem - amd64-clang-sanitizers-sign: - <<: *nativejob - environment: - PQCLEAN_ONLY_TESTS: test_functest_sanitizers - RUN_SLOW: 1 - CC: clang - ARCH: amd64 - PQCLEAN_ONLY_TYPES: sign - i386-gcc-kem: - <<: *nativejob - environment: - CC: gcc - ARCH: i386 - PQCLEAN_ONLY_TYPES: kem - i386-clang-kem: - <<: *nativejob - environment: - CC: clang - ARCH: i386 - PQCLEAN_ONLY_TYPES: kem - # These are for the scheduled builds - arm32-gcc-slow-kem: - <<: *defaultjob - environment: - CC: gcc - ARCH: armhf - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - arm32-clang-slow-kem: - <<: *defaultjob - environment: - CC: clang - ARCH: armhf - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - ppc-clang-slow-kem: - <<: *defaultjob - environment: - CC: clang - ARCH: unstable-ppc - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - ppc-gcc-slow-kem: - <<: *defaultjob - environment: - CC: gcc - ARCH: unstable-ppc - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - amd64-gcc-slow-kem: - <<: *nativejob - environment: - CC: gcc - ARCH: amd64 - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - amd64-clang-slow-kem: - <<: *nativejob - environment: - CC: clang - ARCH: amd64 - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - i386-gcc-slow-kem: - <<: *nativejob - environment: - CC: gcc - ARCH: i386 - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: kem - i386-clang-slow-kem: - <<: *nativejob - environment: - CC: clang - ARCH: i386 - RUN_SLOW: 1 - 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: - CC: clang - ARCH: amd64 - PQCLEAN_ONLY_TYPES: sign - i386-gcc-sign: - <<: *nativejob - environment: - CC: gcc - ARCH: i386 - PQCLEAN_ONLY_TYPES: sign - i386-clang-sign: - <<: *nativejob - environment: - CC: clang - 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: - CC: clang - 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: - CC: clang - ARCH: i386 - RUN_SLOW: 1 - PQCLEAN_ONLY_TYPES: sign - -workflows: - version: 2 - build: - jobs: - # AMD64 - - amd64-gcc-kem - - amd64-clang-kem - - amd64-gcc-sign - - amd64-clang-sign - - amd64-clang-sanitizers-kem: &sanitizers - requires: - - amd64-gcc-kem - - amd64-gcc-sign - - amd64-clang-kem - - amd64-clang-sign - - amd64-clang-sanitizers-sign: - <<: *sanitizers - # i386 - - i386-gcc-kem: &i386 - requires: - - amd64-gcc-kem - - amd64-gcc-sign - - amd64-clang-kem - - amd64-clang-sign - - i386-clang-kem: - <<: *i386 - - i386-gcc-sign: - <<: *i386 - - i386-clang-sign: - <<: *i386 - # ARM 32 bit - - arm32-gcc-kem: &arm32 - requires: - - i386-gcc-kem - - i386-gcc-sign - - i386-clang-kem - - i386-clang-sign - - arm32-clang-kem: - <<: *arm32 - - arm32-gcc-sign: - <<: *arm32 - - arm32-clang-sign: - <<: *arm32 - # PPC - - ppc-gcc-kem: &ppc - requires: - - arm32-gcc-kem - - arm32-clang-kem - - arm32-gcc-sign - - arm32-clang-sign - - ppc-clang-kem: - <<: *ppc - - ppc-gcc-sign: - <<: *ppc - - ppc-clang-sign: - <<: *ppc - scheduled: - triggers: - - schedule: - cron: "0 5 * * 6" - filters: - branches: - only: master - jobs: - - 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 - -# vim: set ft=yaml ts=2 sw=2 tw=0 et : - -# vim: set ft=yaml ts=2 sw=2 tw=0 et : diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 676086df..8a6ef673 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,9 +2,10 @@ - -#### Manually checked properties + +#### Manually checked properties +* [ ] Generated Github workflow (run ``.github/workflows/generate_workflows.py``) (new schemes) * [ ] No stringification macros * [ ] Output-parameter pointers in functions are on the left * [ ] Negative return values on failure of API functions (within restrictions of FO transform). diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml new file mode 100644 index 00000000..55497800 --- /dev/null +++ b/.github/workflows/common.yml @@ -0,0 +1,146 @@ +on: ['push', 'pull-request'] + +name: Test common files and sanity checks + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -r requirements.txt + - name: Run tests + run: | + cd test + python3 test_common.py + python3 test_workflows.py + test-emulated: + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python + with: + path: ~/.cache/pip + key: v1-python-pip + + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -r requirements.txt && \ + cd test && \ + python3 test_common.py" + test-windows: + strategy: + matrix: + bits: + - 64 + - 32 + env: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Install python requirements + run: python -m pip install -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + python3 test_common.py + shell: cmd + test-macos: + env: + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: ${{ matrix.compiler == 'gcc9' }} + - name: Install Python dependencies + run: python3 -m pip install -r requirements.txt + - name: Run tests + run: | + cd test + python3 test_common.py + diff --git a/.github/workflows/generate_workflows.py b/.github/workflows/generate_workflows.py new file mode 100644 index 00000000..18906c16 --- /dev/null +++ b/.github/workflows/generate_workflows.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +import sys +import difflib + +from pathlib import Path + +import jinja2 + + +def render_workflow(scheme_path): + result = 0 + scheme_name = scheme_path.name + scheme_type = str(scheme_path.parent.name).split("_")[1] + target_name = f"{scheme_type}_{scheme_name}.yml" + + tpl = TPL_ENV.get_template("template.yml.j2") + new_contents = tpl.render(scheme_type=scheme_type, scheme_name=scheme_name) + if not TEST_MODE: + with open(target_name, "w") as f: + f.write(new_contents) + else: + if (Path(".") / target_name).exists(): + with open(target_name, "r") as f: + file_contents = f.read() + else: + file_contents = "" + + if file_contents != new_contents: + sys.stdout.writelines(difflib.unified_diff( + file_contents.splitlines(keepends=True), new_contents.splitlines(keepends=True), + fromfile=f"old/{target_name}", tofile=f"new/{target_name}") + ) + result = 1 + + return result + + +if __name__ == "__main__": + TEST_MODE = len(sys.argv) > 1 and sys.argv[1] == "test" + + loader = jinja2.FileSystemLoader(".") + TPL_ENV = jinja2.Environment( + loader=loader, variable_start_string="{-", variable_end_string="-}" + ) + with open("template.yml.j2") as f: + TEMPLATE = f.read() + root = Path("../..") + + paths = root.glob("crypto_*/*") + for path in paths: + result = render_workflow(path) + + sys.exit(result) diff --git a/.github/workflows/kem_firesaber.yml b/.github/workflows/kem_firesaber.yml new file mode 100644 index 00000000..8ce608c2 --- /dev/null +++ b/.github/workflows/kem_firesaber.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/firesaber/**' + - '.github/workflows/kem_firesaber.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/firesaber/**' + - '.github/workflows/kem_firesaber.yml' + - '*' + +name: Test firesaber + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: firesaber + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=firesaber -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: firesaber + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: firesaber + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem1344aes.yml b/.github/workflows/kem_frodokem1344aes.yml new file mode 100644 index 00000000..d4dbb7a7 --- /dev/null +++ b/.github/workflows/kem_frodokem1344aes.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem1344aes/**' + - '.github/workflows/kem_frodokem1344aes.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem1344aes/**' + - '.github/workflows/kem_frodokem1344aes.yml' + - '*' + +name: Test frodokem1344aes + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344aes + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem1344aes -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344aes + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344aes + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem1344shake.yml b/.github/workflows/kem_frodokem1344shake.yml new file mode 100644 index 00000000..657d5ebf --- /dev/null +++ b/.github/workflows/kem_frodokem1344shake.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem1344shake/**' + - '.github/workflows/kem_frodokem1344shake.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem1344shake/**' + - '.github/workflows/kem_frodokem1344shake.yml' + - '*' + +name: Test frodokem1344shake + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344shake + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem1344shake -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344shake + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem1344shake + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem640aes.yml b/.github/workflows/kem_frodokem640aes.yml new file mode 100644 index 00000000..0cae9b32 --- /dev/null +++ b/.github/workflows/kem_frodokem640aes.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem640aes/**' + - '.github/workflows/kem_frodokem640aes.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem640aes/**' + - '.github/workflows/kem_frodokem640aes.yml' + - '*' + +name: Test frodokem640aes + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem640aes + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem640aes -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem640aes + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem640aes + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem640shake.yml b/.github/workflows/kem_frodokem640shake.yml new file mode 100644 index 00000000..5b73e7dc --- /dev/null +++ b/.github/workflows/kem_frodokem640shake.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem640shake/**' + - '.github/workflows/kem_frodokem640shake.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem640shake/**' + - '.github/workflows/kem_frodokem640shake.yml' + - '*' + +name: Test frodokem640shake + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem640shake + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem640shake -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem640shake + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem640shake + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem976aes.yml b/.github/workflows/kem_frodokem976aes.yml new file mode 100644 index 00000000..35f29b81 --- /dev/null +++ b/.github/workflows/kem_frodokem976aes.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem976aes/**' + - '.github/workflows/kem_frodokem976aes.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem976aes/**' + - '.github/workflows/kem_frodokem976aes.yml' + - '*' + +name: Test frodokem976aes + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem976aes + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem976aes -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem976aes + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem976aes + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_frodokem976shake.yml b/.github/workflows/kem_frodokem976shake.yml new file mode 100644 index 00000000..e0623c00 --- /dev/null +++ b/.github/workflows/kem_frodokem976shake.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem976shake/**' + - '.github/workflows/kem_frodokem976shake.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/frodokem976shake/**' + - '.github/workflows/kem_frodokem976shake.yml' + - '*' + +name: Test frodokem976shake + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: frodokem976shake + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=frodokem976shake -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: frodokem976shake + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: frodokem976shake + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-128.yml b/.github/workflows/kem_hqc-128.yml new file mode 100644 index 00000000..182c94fd --- /dev/null +++ b/.github/workflows/kem_hqc-128.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-128/**' + - '.github/workflows/kem_hqc-128.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-128/**' + - '.github/workflows/kem_hqc-128.yml' + - '*' + +name: Test hqc-128 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-128 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-128 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-128 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-128 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-192.yml b/.github/workflows/kem_hqc-192.yml new file mode 100644 index 00000000..a3a98336 --- /dev/null +++ b/.github/workflows/kem_hqc-192.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-192/**' + - '.github/workflows/kem_hqc-192.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-192/**' + - '.github/workflows/kem_hqc-192.yml' + - '*' + +name: Test hqc-192 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-192 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-192 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-192 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-192 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-256.yml b/.github/workflows/kem_hqc-256.yml new file mode 100644 index 00000000..588a5aa0 --- /dev/null +++ b/.github/workflows/kem_hqc-256.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-256/**' + - '.github/workflows/kem_hqc-256.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-256/**' + - '.github/workflows/kem_hqc-256.yml' + - '*' + +name: Test hqc-256 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-256 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-256 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-256 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-256 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-rmrs-128.yml b/.github/workflows/kem_hqc-rmrs-128.yml new file mode 100644 index 00000000..e21cbda2 --- /dev/null +++ b/.github/workflows/kem_hqc-rmrs-128.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-128/**' + - '.github/workflows/kem_hqc-rmrs-128.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-128/**' + - '.github/workflows/kem_hqc-rmrs-128.yml' + - '*' + +name: Test hqc-rmrs-128 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-128 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-rmrs-128 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-128 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-128 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-rmrs-192.yml b/.github/workflows/kem_hqc-rmrs-192.yml new file mode 100644 index 00000000..2f616e0c --- /dev/null +++ b/.github/workflows/kem_hqc-rmrs-192.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-192/**' + - '.github/workflows/kem_hqc-rmrs-192.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-192/**' + - '.github/workflows/kem_hqc-rmrs-192.yml' + - '*' + +name: Test hqc-rmrs-192 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-192 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-rmrs-192 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-192 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-192 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_hqc-rmrs-256.yml b/.github/workflows/kem_hqc-rmrs-256.yml new file mode 100644 index 00000000..6b82bebc --- /dev/null +++ b/.github/workflows/kem_hqc-rmrs-256.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-256/**' + - '.github/workflows/kem_hqc-rmrs-256.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/hqc-rmrs-256/**' + - '.github/workflows/kem_hqc-rmrs-256.yml' + - '*' + +name: Test hqc-rmrs-256 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-256 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=hqc-rmrs-256 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-256 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: hqc-rmrs-256 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber1024-90s.yml b/.github/workflows/kem_kyber1024-90s.yml new file mode 100644 index 00000000..294ce6a0 --- /dev/null +++ b/.github/workflows/kem_kyber1024-90s.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber1024-90s/**' + - '.github/workflows/kem_kyber1024-90s.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber1024-90s/**' + - '.github/workflows/kem_kyber1024-90s.yml' + - '*' + +name: Test kyber1024-90s + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber1024-90s + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber1024-90s -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber1024-90s + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber1024-90s + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber1024.yml b/.github/workflows/kem_kyber1024.yml new file mode 100644 index 00000000..93ae2d4f --- /dev/null +++ b/.github/workflows/kem_kyber1024.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber1024/**' + - '.github/workflows/kem_kyber1024.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber1024/**' + - '.github/workflows/kem_kyber1024.yml' + - '*' + +name: Test kyber1024 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber1024 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber1024 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber1024 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber1024 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber512-90s.yml b/.github/workflows/kem_kyber512-90s.yml new file mode 100644 index 00000000..fa343207 --- /dev/null +++ b/.github/workflows/kem_kyber512-90s.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber512-90s/**' + - '.github/workflows/kem_kyber512-90s.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber512-90s/**' + - '.github/workflows/kem_kyber512-90s.yml' + - '*' + +name: Test kyber512-90s + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber512-90s + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber512-90s -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber512-90s + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber512-90s + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber512.yml b/.github/workflows/kem_kyber512.yml new file mode 100644 index 00000000..6fc33a27 --- /dev/null +++ b/.github/workflows/kem_kyber512.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber512/**' + - '.github/workflows/kem_kyber512.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber512/**' + - '.github/workflows/kem_kyber512.yml' + - '*' + +name: Test kyber512 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber512 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber512 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber512 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber512 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber768-90s.yml b/.github/workflows/kem_kyber768-90s.yml new file mode 100644 index 00000000..12c9807b --- /dev/null +++ b/.github/workflows/kem_kyber768-90s.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber768-90s/**' + - '.github/workflows/kem_kyber768-90s.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber768-90s/**' + - '.github/workflows/kem_kyber768-90s.yml' + - '*' + +name: Test kyber768-90s + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber768-90s + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber768-90s -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber768-90s + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber768-90s + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_kyber768.yml b/.github/workflows/kem_kyber768.yml new file mode 100644 index 00000000..d45fba79 --- /dev/null +++ b/.github/workflows/kem_kyber768.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber768/**' + - '.github/workflows/kem_kyber768.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/kyber768/**' + - '.github/workflows/kem_kyber768.yml' + - '*' + +name: Test kyber768 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: kyber768 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=kyber768 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: kyber768 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: kyber768 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_lightsaber.yml b/.github/workflows/kem_lightsaber.yml new file mode 100644 index 00000000..925e98ac --- /dev/null +++ b/.github/workflows/kem_lightsaber.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/lightsaber/**' + - '.github/workflows/kem_lightsaber.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/lightsaber/**' + - '.github/workflows/kem_lightsaber.yml' + - '*' + +name: Test lightsaber + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: lightsaber + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=lightsaber -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: lightsaber + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: lightsaber + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece348864.yml b/.github/workflows/kem_mceliece348864.yml new file mode 100644 index 00000000..9c17330a --- /dev/null +++ b/.github/workflows/kem_mceliece348864.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece348864/**' + - '.github/workflows/kem_mceliece348864.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece348864/**' + - '.github/workflows/kem_mceliece348864.yml' + - '*' + +name: Test mceliece348864 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece348864 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece348864f.yml b/.github/workflows/kem_mceliece348864f.yml new file mode 100644 index 00000000..f68321e9 --- /dev/null +++ b/.github/workflows/kem_mceliece348864f.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece348864f/**' + - '.github/workflows/kem_mceliece348864f.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece348864f/**' + - '.github/workflows/kem_mceliece348864f.yml' + - '*' + +name: Test mceliece348864f + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864f + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece348864f -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864f + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece348864f + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece460896.yml b/.github/workflows/kem_mceliece460896.yml new file mode 100644 index 00000000..21bd8f54 --- /dev/null +++ b/.github/workflows/kem_mceliece460896.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece460896/**' + - '.github/workflows/kem_mceliece460896.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece460896/**' + - '.github/workflows/kem_mceliece460896.yml' + - '*' + +name: Test mceliece460896 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece460896 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece460896f.yml b/.github/workflows/kem_mceliece460896f.yml new file mode 100644 index 00000000..d17c473a --- /dev/null +++ b/.github/workflows/kem_mceliece460896f.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece460896f/**' + - '.github/workflows/kem_mceliece460896f.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece460896f/**' + - '.github/workflows/kem_mceliece460896f.yml' + - '*' + +name: Test mceliece460896f + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896f + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece460896f -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896f + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece460896f + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece6688128.yml b/.github/workflows/kem_mceliece6688128.yml new file mode 100644 index 00000000..16826baa --- /dev/null +++ b/.github/workflows/kem_mceliece6688128.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6688128/**' + - '.github/workflows/kem_mceliece6688128.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6688128/**' + - '.github/workflows/kem_mceliece6688128.yml' + - '*' + +name: Test mceliece6688128 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece6688128 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece6688128f.yml b/.github/workflows/kem_mceliece6688128f.yml new file mode 100644 index 00000000..1f033bd4 --- /dev/null +++ b/.github/workflows/kem_mceliece6688128f.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6688128f/**' + - '.github/workflows/kem_mceliece6688128f.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6688128f/**' + - '.github/workflows/kem_mceliece6688128f.yml' + - '*' + +name: Test mceliece6688128f + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128f + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece6688128f -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128f + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece6688128f + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece6960119.yml b/.github/workflows/kem_mceliece6960119.yml new file mode 100644 index 00000000..38a0d31f --- /dev/null +++ b/.github/workflows/kem_mceliece6960119.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6960119/**' + - '.github/workflows/kem_mceliece6960119.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6960119/**' + - '.github/workflows/kem_mceliece6960119.yml' + - '*' + +name: Test mceliece6960119 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece6960119 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece6960119f.yml b/.github/workflows/kem_mceliece6960119f.yml new file mode 100644 index 00000000..02d94df9 --- /dev/null +++ b/.github/workflows/kem_mceliece6960119f.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6960119f/**' + - '.github/workflows/kem_mceliece6960119f.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece6960119f/**' + - '.github/workflows/kem_mceliece6960119f.yml' + - '*' + +name: Test mceliece6960119f + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119f + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece6960119f -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119f + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece6960119f + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece8192128.yml b/.github/workflows/kem_mceliece8192128.yml new file mode 100644 index 00000000..eca9057f --- /dev/null +++ b/.github/workflows/kem_mceliece8192128.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece8192128/**' + - '.github/workflows/kem_mceliece8192128.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece8192128/**' + - '.github/workflows/kem_mceliece8192128.yml' + - '*' + +name: Test mceliece8192128 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece8192128 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_mceliece8192128f.yml b/.github/workflows/kem_mceliece8192128f.yml new file mode 100644 index 00000000..ef97fb3b --- /dev/null +++ b/.github/workflows/kem_mceliece8192128f.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece8192128f/**' + - '.github/workflows/kem_mceliece8192128f.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/mceliece8192128f/**' + - '.github/workflows/kem_mceliece8192128f.yml' + - '*' + +name: Test mceliece8192128f + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128f + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=mceliece8192128f -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128f + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: mceliece8192128f + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntruhps2048509.yml b/.github/workflows/kem_ntruhps2048509.yml new file mode 100644 index 00000000..ae952668 --- /dev/null +++ b/.github/workflows/kem_ntruhps2048509.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps2048509/**' + - '.github/workflows/kem_ntruhps2048509.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps2048509/**' + - '.github/workflows/kem_ntruhps2048509.yml' + - '*' + +name: Test ntruhps2048509 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048509 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntruhps2048509 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048509 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048509 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntruhps2048677.yml b/.github/workflows/kem_ntruhps2048677.yml new file mode 100644 index 00000000..e5700434 --- /dev/null +++ b/.github/workflows/kem_ntruhps2048677.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps2048677/**' + - '.github/workflows/kem_ntruhps2048677.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps2048677/**' + - '.github/workflows/kem_ntruhps2048677.yml' + - '*' + +name: Test ntruhps2048677 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048677 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntruhps2048677 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048677 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntruhps2048677 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntruhps4096821.yml b/.github/workflows/kem_ntruhps4096821.yml new file mode 100644 index 00000000..44b79b27 --- /dev/null +++ b/.github/workflows/kem_ntruhps4096821.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps4096821/**' + - '.github/workflows/kem_ntruhps4096821.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhps4096821/**' + - '.github/workflows/kem_ntruhps4096821.yml' + - '*' + +name: Test ntruhps4096821 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntruhps4096821 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntruhps4096821 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntruhps4096821 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntruhps4096821 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntruhrss701.yml b/.github/workflows/kem_ntruhrss701.yml new file mode 100644 index 00000000..79a7ed18 --- /dev/null +++ b/.github/workflows/kem_ntruhrss701.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhrss701/**' + - '.github/workflows/kem_ntruhrss701.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntruhrss701/**' + - '.github/workflows/kem_ntruhrss701.yml' + - '*' + +name: Test ntruhrss701 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntruhrss701 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntruhrss701 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntruhrss701 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntruhrss701 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntrulpr653.yml b/.github/workflows/kem_ntrulpr653.yml new file mode 100644 index 00000000..2a621342 --- /dev/null +++ b/.github/workflows/kem_ntrulpr653.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr653/**' + - '.github/workflows/kem_ntrulpr653.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr653/**' + - '.github/workflows/kem_ntrulpr653.yml' + - '*' + +name: Test ntrulpr653 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr653 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntrulpr653 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr653 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr653 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntrulpr761.yml b/.github/workflows/kem_ntrulpr761.yml new file mode 100644 index 00000000..a5f3ab24 --- /dev/null +++ b/.github/workflows/kem_ntrulpr761.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr761/**' + - '.github/workflows/kem_ntrulpr761.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr761/**' + - '.github/workflows/kem_ntrulpr761.yml' + - '*' + +name: Test ntrulpr761 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr761 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntrulpr761 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr761 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr761 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_ntrulpr857.yml b/.github/workflows/kem_ntrulpr857.yml new file mode 100644 index 00000000..5e0e5a14 --- /dev/null +++ b/.github/workflows/kem_ntrulpr857.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr857/**' + - '.github/workflows/kem_ntrulpr857.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/ntrulpr857/**' + - '.github/workflows/kem_ntrulpr857.yml' + - '*' + +name: Test ntrulpr857 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr857 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=ntrulpr857 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr857 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: ntrulpr857 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_saber.yml b/.github/workflows/kem_saber.yml new file mode 100644 index 00000000..4c05ed83 --- /dev/null +++ b/.github/workflows/kem_saber.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/saber/**' + - '.github/workflows/kem_saber.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/saber/**' + - '.github/workflows/kem_saber.yml' + - '*' + +name: Test saber + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: saber + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=saber -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: saber + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: saber + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_sntrup653.yml b/.github/workflows/kem_sntrup653.yml new file mode 100644 index 00000000..48dc6548 --- /dev/null +++ b/.github/workflows/kem_sntrup653.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup653/**' + - '.github/workflows/kem_sntrup653.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup653/**' + - '.github/workflows/kem_sntrup653.yml' + - '*' + +name: Test sntrup653 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sntrup653 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sntrup653 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sntrup653 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sntrup653 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_sntrup761.yml b/.github/workflows/kem_sntrup761.yml new file mode 100644 index 00000000..06099544 --- /dev/null +++ b/.github/workflows/kem_sntrup761.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup761/**' + - '.github/workflows/kem_sntrup761.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup761/**' + - '.github/workflows/kem_sntrup761.yml' + - '*' + +name: Test sntrup761 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sntrup761 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sntrup761 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sntrup761 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sntrup761 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/kem_sntrup857.yml b/.github/workflows/kem_sntrup857.yml new file mode 100644 index 00000000..c43c119d --- /dev/null +++ b/.github/workflows/kem_sntrup857.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup857/**' + - '.github/workflows/kem_sntrup857.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_kem/sntrup857/**' + - '.github/workflows/kem_sntrup857.yml' + - '*' + +name: Test sntrup857 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sntrup857 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sntrup857 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sntrup857 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sntrup857 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_dilithium2.yml b/.github/workflows/sign_dilithium2.yml new file mode 100644 index 00000000..b806e11b --- /dev/null +++ b/.github/workflows/sign_dilithium2.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium2/**' + - '.github/workflows/sign_dilithium2.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium2/**' + - '.github/workflows/sign_dilithium2.yml' + - '*' + +name: Test dilithium2 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: dilithium2 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=dilithium2 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: dilithium2 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: dilithium2 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_dilithium3.yml b/.github/workflows/sign_dilithium3.yml new file mode 100644 index 00000000..5c5ed827 --- /dev/null +++ b/.github/workflows/sign_dilithium3.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium3/**' + - '.github/workflows/sign_dilithium3.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium3/**' + - '.github/workflows/sign_dilithium3.yml' + - '*' + +name: Test dilithium3 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: dilithium3 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=dilithium3 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: dilithium3 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: dilithium3 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_dilithium4.yml b/.github/workflows/sign_dilithium4.yml new file mode 100644 index 00000000..9793c4f2 --- /dev/null +++ b/.github/workflows/sign_dilithium4.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium4/**' + - '.github/workflows/sign_dilithium4.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/dilithium4/**' + - '.github/workflows/sign_dilithium4.yml' + - '*' + +name: Test dilithium4 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: dilithium4 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=dilithium4 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: dilithium4 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: dilithium4 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_falcon-1024.yml b/.github/workflows/sign_falcon-1024.yml new file mode 100644 index 00000000..c76c19a8 --- /dev/null +++ b/.github/workflows/sign_falcon-1024.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/falcon-1024/**' + - '.github/workflows/sign_falcon-1024.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/falcon-1024/**' + - '.github/workflows/sign_falcon-1024.yml' + - '*' + +name: Test falcon-1024 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: falcon-1024 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=falcon-1024 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: falcon-1024 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: falcon-1024 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_falcon-512.yml b/.github/workflows/sign_falcon-512.yml new file mode 100644 index 00000000..045b7bae --- /dev/null +++ b/.github/workflows/sign_falcon-512.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/falcon-512/**' + - '.github/workflows/sign_falcon-512.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/falcon-512/**' + - '.github/workflows/sign_falcon-512.yml' + - '*' + +name: Test falcon-512 + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: falcon-512 + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=falcon-512 -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: falcon-512 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: falcon-512 + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIIIc-classic.yml b/.github/workflows/sign_rainbowIIIc-classic.yml new file mode 100644 index 00000000..36b46dbe --- /dev/null +++ b/.github/workflows/sign_rainbowIIIc-classic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-classic/**' + - '.github/workflows/sign_rainbowIIIc-classic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-classic/**' + - '.github/workflows/sign_rainbowIIIc-classic.yml' + - '*' + +name: Test rainbowIIIc-classic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-classic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIIIc-classic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-classic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-classic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIIIc-cyclic-compressed.yml b/.github/workflows/sign_rainbowIIIc-cyclic-compressed.yml new file mode 100644 index 00000000..4508852a --- /dev/null +++ b/.github/workflows/sign_rainbowIIIc-cyclic-compressed.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-cyclic-compressed/**' + - '.github/workflows/sign_rainbowIIIc-cyclic-compressed.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-cyclic-compressed/**' + - '.github/workflows/sign_rainbowIIIc-cyclic-compressed.yml' + - '*' + +name: Test rainbowIIIc-cyclic-compressed + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic-compressed + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIIIc-cyclic-compressed -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic-compressed + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic-compressed + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIIIc-cyclic.yml b/.github/workflows/sign_rainbowIIIc-cyclic.yml new file mode 100644 index 00000000..5c77e2b4 --- /dev/null +++ b/.github/workflows/sign_rainbowIIIc-cyclic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-cyclic/**' + - '.github/workflows/sign_rainbowIIIc-cyclic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIIIc-cyclic/**' + - '.github/workflows/sign_rainbowIIIc-cyclic.yml' + - '*' + +name: Test rainbowIIIc-cyclic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIIIc-cyclic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIIIc-cyclic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIa-classic.yml b/.github/workflows/sign_rainbowIa-classic.yml new file mode 100644 index 00000000..bb20f40c --- /dev/null +++ b/.github/workflows/sign_rainbowIa-classic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-classic/**' + - '.github/workflows/sign_rainbowIa-classic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-classic/**' + - '.github/workflows/sign_rainbowIa-classic.yml' + - '*' + +name: Test rainbowIa-classic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-classic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIa-classic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-classic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-classic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIa-cyclic-compressed.yml b/.github/workflows/sign_rainbowIa-cyclic-compressed.yml new file mode 100644 index 00000000..fd965ad8 --- /dev/null +++ b/.github/workflows/sign_rainbowIa-cyclic-compressed.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-cyclic-compressed/**' + - '.github/workflows/sign_rainbowIa-cyclic-compressed.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-cyclic-compressed/**' + - '.github/workflows/sign_rainbowIa-cyclic-compressed.yml' + - '*' + +name: Test rainbowIa-cyclic-compressed + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic-compressed + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIa-cyclic-compressed -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic-compressed + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic-compressed + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowIa-cyclic.yml b/.github/workflows/sign_rainbowIa-cyclic.yml new file mode 100644 index 00000000..a1fe1c76 --- /dev/null +++ b/.github/workflows/sign_rainbowIa-cyclic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-cyclic/**' + - '.github/workflows/sign_rainbowIa-cyclic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowIa-cyclic/**' + - '.github/workflows/sign_rainbowIa-cyclic.yml' + - '*' + +name: Test rainbowIa-cyclic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowIa-cyclic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowIa-cyclic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowVc-classic.yml b/.github/workflows/sign_rainbowVc-classic.yml new file mode 100644 index 00000000..3f12fab3 --- /dev/null +++ b/.github/workflows/sign_rainbowVc-classic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-classic/**' + - '.github/workflows/sign_rainbowVc-classic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-classic/**' + - '.github/workflows/sign_rainbowVc-classic.yml' + - '*' + +name: Test rainbowVc-classic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-classic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowVc-classic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-classic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-classic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowVc-cyclic-compressed.yml b/.github/workflows/sign_rainbowVc-cyclic-compressed.yml new file mode 100644 index 00000000..f11a2e03 --- /dev/null +++ b/.github/workflows/sign_rainbowVc-cyclic-compressed.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-cyclic-compressed/**' + - '.github/workflows/sign_rainbowVc-cyclic-compressed.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-cyclic-compressed/**' + - '.github/workflows/sign_rainbowVc-cyclic-compressed.yml' + - '*' + +name: Test rainbowVc-cyclic-compressed + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic-compressed + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowVc-cyclic-compressed -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic-compressed + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic-compressed + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_rainbowVc-cyclic.yml b/.github/workflows/sign_rainbowVc-cyclic.yml new file mode 100644 index 00000000..d7979087 --- /dev/null +++ b/.github/workflows/sign_rainbowVc-cyclic.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-cyclic/**' + - '.github/workflows/sign_rainbowVc-cyclic.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/rainbowVc-cyclic/**' + - '.github/workflows/sign_rainbowVc-cyclic.yml' + - '*' + +name: Test rainbowVc-cyclic + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=rainbowVc-cyclic -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: rainbowVc-cyclic + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-128f-robust.yml b/.github/workflows/sign_sphincs-haraka-128f-robust.yml new file mode 100644 index 00000000..17485470 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-128f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128f-robust/**' + - '.github/workflows/sign_sphincs-haraka-128f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128f-robust/**' + - '.github/workflows/sign_sphincs-haraka-128f-robust.yml' + - '*' + +name: Test sphincs-haraka-128f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-128f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-128f-simple.yml b/.github/workflows/sign_sphincs-haraka-128f-simple.yml new file mode 100644 index 00000000..b1c97941 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-128f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128f-simple/**' + - '.github/workflows/sign_sphincs-haraka-128f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128f-simple/**' + - '.github/workflows/sign_sphincs-haraka-128f-simple.yml' + - '*' + +name: Test sphincs-haraka-128f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-128f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-128s-robust.yml b/.github/workflows/sign_sphincs-haraka-128s-robust.yml new file mode 100644 index 00000000..73cba9f4 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-128s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128s-robust/**' + - '.github/workflows/sign_sphincs-haraka-128s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128s-robust/**' + - '.github/workflows/sign_sphincs-haraka-128s-robust.yml' + - '*' + +name: Test sphincs-haraka-128s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-128s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-128s-simple.yml b/.github/workflows/sign_sphincs-haraka-128s-simple.yml new file mode 100644 index 00000000..0d0b7d73 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-128s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128s-simple/**' + - '.github/workflows/sign_sphincs-haraka-128s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-128s-simple/**' + - '.github/workflows/sign_sphincs-haraka-128s-simple.yml' + - '*' + +name: Test sphincs-haraka-128s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-128s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-128s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-192f-robust.yml b/.github/workflows/sign_sphincs-haraka-192f-robust.yml new file mode 100644 index 00000000..118c9e97 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-192f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192f-robust/**' + - '.github/workflows/sign_sphincs-haraka-192f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192f-robust/**' + - '.github/workflows/sign_sphincs-haraka-192f-robust.yml' + - '*' + +name: Test sphincs-haraka-192f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-192f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-192f-simple.yml b/.github/workflows/sign_sphincs-haraka-192f-simple.yml new file mode 100644 index 00000000..7ee941a9 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-192f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192f-simple/**' + - '.github/workflows/sign_sphincs-haraka-192f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192f-simple/**' + - '.github/workflows/sign_sphincs-haraka-192f-simple.yml' + - '*' + +name: Test sphincs-haraka-192f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-192f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-192s-robust.yml b/.github/workflows/sign_sphincs-haraka-192s-robust.yml new file mode 100644 index 00000000..b721e6dd --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-192s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192s-robust/**' + - '.github/workflows/sign_sphincs-haraka-192s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192s-robust/**' + - '.github/workflows/sign_sphincs-haraka-192s-robust.yml' + - '*' + +name: Test sphincs-haraka-192s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-192s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-192s-simple.yml b/.github/workflows/sign_sphincs-haraka-192s-simple.yml new file mode 100644 index 00000000..b06e4e7e --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-192s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192s-simple/**' + - '.github/workflows/sign_sphincs-haraka-192s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-192s-simple/**' + - '.github/workflows/sign_sphincs-haraka-192s-simple.yml' + - '*' + +name: Test sphincs-haraka-192s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-192s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-192s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-256f-robust.yml b/.github/workflows/sign_sphincs-haraka-256f-robust.yml new file mode 100644 index 00000000..3bba9f87 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-256f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256f-robust/**' + - '.github/workflows/sign_sphincs-haraka-256f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256f-robust/**' + - '.github/workflows/sign_sphincs-haraka-256f-robust.yml' + - '*' + +name: Test sphincs-haraka-256f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-256f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-256f-simple.yml b/.github/workflows/sign_sphincs-haraka-256f-simple.yml new file mode 100644 index 00000000..b5ddc5ec --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-256f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256f-simple/**' + - '.github/workflows/sign_sphincs-haraka-256f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256f-simple/**' + - '.github/workflows/sign_sphincs-haraka-256f-simple.yml' + - '*' + +name: Test sphincs-haraka-256f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-256f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-256s-robust.yml b/.github/workflows/sign_sphincs-haraka-256s-robust.yml new file mode 100644 index 00000000..a14456d4 --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-256s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256s-robust/**' + - '.github/workflows/sign_sphincs-haraka-256s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256s-robust/**' + - '.github/workflows/sign_sphincs-haraka-256s-robust.yml' + - '*' + +name: Test sphincs-haraka-256s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-256s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-haraka-256s-simple.yml b/.github/workflows/sign_sphincs-haraka-256s-simple.yml new file mode 100644 index 00000000..e4a83e9c --- /dev/null +++ b/.github/workflows/sign_sphincs-haraka-256s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256s-simple/**' + - '.github/workflows/sign_sphincs-haraka-256s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-haraka-256s-simple/**' + - '.github/workflows/sign_sphincs-haraka-256s-simple.yml' + - '*' + +name: Test sphincs-haraka-256s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-haraka-256s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-haraka-256s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-128f-robust.yml b/.github/workflows/sign_sphincs-sha256-128f-robust.yml new file mode 100644 index 00000000..8ef0cd6d --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-128f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128f-robust/**' + - '.github/workflows/sign_sphincs-sha256-128f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128f-robust/**' + - '.github/workflows/sign_sphincs-sha256-128f-robust.yml' + - '*' + +name: Test sphincs-sha256-128f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-128f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-128f-simple.yml b/.github/workflows/sign_sphincs-sha256-128f-simple.yml new file mode 100644 index 00000000..399d08e8 --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-128f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128f-simple/**' + - '.github/workflows/sign_sphincs-sha256-128f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128f-simple/**' + - '.github/workflows/sign_sphincs-sha256-128f-simple.yml' + - '*' + +name: Test sphincs-sha256-128f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-128f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-128s-robust.yml b/.github/workflows/sign_sphincs-sha256-128s-robust.yml new file mode 100644 index 00000000..f28cfe08 --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-128s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128s-robust/**' + - '.github/workflows/sign_sphincs-sha256-128s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128s-robust/**' + - '.github/workflows/sign_sphincs-sha256-128s-robust.yml' + - '*' + +name: Test sphincs-sha256-128s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-128s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-128s-simple.yml b/.github/workflows/sign_sphincs-sha256-128s-simple.yml new file mode 100644 index 00000000..799212de --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-128s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128s-simple/**' + - '.github/workflows/sign_sphincs-sha256-128s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-128s-simple/**' + - '.github/workflows/sign_sphincs-sha256-128s-simple.yml' + - '*' + +name: Test sphincs-sha256-128s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-128s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-128s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-192f-robust.yml b/.github/workflows/sign_sphincs-sha256-192f-robust.yml new file mode 100644 index 00000000..1e8605b7 --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-192f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192f-robust/**' + - '.github/workflows/sign_sphincs-sha256-192f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192f-robust/**' + - '.github/workflows/sign_sphincs-sha256-192f-robust.yml' + - '*' + +name: Test sphincs-sha256-192f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-192f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-192f-simple.yml b/.github/workflows/sign_sphincs-sha256-192f-simple.yml new file mode 100644 index 00000000..47010d98 --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-192f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192f-simple/**' + - '.github/workflows/sign_sphincs-sha256-192f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192f-simple/**' + - '.github/workflows/sign_sphincs-sha256-192f-simple.yml' + - '*' + +name: Test sphincs-sha256-192f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-192f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-192s-robust.yml b/.github/workflows/sign_sphincs-sha256-192s-robust.yml new file mode 100644 index 00000000..a85cae75 --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-192s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192s-robust/**' + - '.github/workflows/sign_sphincs-sha256-192s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192s-robust/**' + - '.github/workflows/sign_sphincs-sha256-192s-robust.yml' + - '*' + +name: Test sphincs-sha256-192s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-192s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-192s-simple.yml b/.github/workflows/sign_sphincs-sha256-192s-simple.yml new file mode 100644 index 00000000..91fa93cd --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-192s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192s-simple/**' + - '.github/workflows/sign_sphincs-sha256-192s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-192s-simple/**' + - '.github/workflows/sign_sphincs-sha256-192s-simple.yml' + - '*' + +name: Test sphincs-sha256-192s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-192s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-192s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-256f-robust.yml b/.github/workflows/sign_sphincs-sha256-256f-robust.yml new file mode 100644 index 00000000..980339ef --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-256f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256f-robust/**' + - '.github/workflows/sign_sphincs-sha256-256f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256f-robust/**' + - '.github/workflows/sign_sphincs-sha256-256f-robust.yml' + - '*' + +name: Test sphincs-sha256-256f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-256f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-256f-simple.yml b/.github/workflows/sign_sphincs-sha256-256f-simple.yml new file mode 100644 index 00000000..01d4cc7a --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-256f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256f-simple/**' + - '.github/workflows/sign_sphincs-sha256-256f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256f-simple/**' + - '.github/workflows/sign_sphincs-sha256-256f-simple.yml' + - '*' + +name: Test sphincs-sha256-256f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-256f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-256s-robust.yml b/.github/workflows/sign_sphincs-sha256-256s-robust.yml new file mode 100644 index 00000000..c52e903d --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-256s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256s-robust/**' + - '.github/workflows/sign_sphincs-sha256-256s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256s-robust/**' + - '.github/workflows/sign_sphincs-sha256-256s-robust.yml' + - '*' + +name: Test sphincs-sha256-256s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-256s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-sha256-256s-simple.yml b/.github/workflows/sign_sphincs-sha256-256s-simple.yml new file mode 100644 index 00000000..efa2194e --- /dev/null +++ b/.github/workflows/sign_sphincs-sha256-256s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256s-simple/**' + - '.github/workflows/sign_sphincs-sha256-256s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-sha256-256s-simple/**' + - '.github/workflows/sign_sphincs-sha256-256s-simple.yml' + - '*' + +name: Test sphincs-sha256-256s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-sha256-256s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-sha256-256s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-128f-robust.yml b/.github/workflows/sign_sphincs-shake256-128f-robust.yml new file mode 100644 index 00000000..05bdecac --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-128f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128f-robust/**' + - '.github/workflows/sign_sphincs-shake256-128f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128f-robust/**' + - '.github/workflows/sign_sphincs-shake256-128f-robust.yml' + - '*' + +name: Test sphincs-shake256-128f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-128f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-128f-simple.yml b/.github/workflows/sign_sphincs-shake256-128f-simple.yml new file mode 100644 index 00000000..0caf9650 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-128f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128f-simple/**' + - '.github/workflows/sign_sphincs-shake256-128f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128f-simple/**' + - '.github/workflows/sign_sphincs-shake256-128f-simple.yml' + - '*' + +name: Test sphincs-shake256-128f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-128f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-128s-robust.yml b/.github/workflows/sign_sphincs-shake256-128s-robust.yml new file mode 100644 index 00000000..6da602d1 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-128s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128s-robust/**' + - '.github/workflows/sign_sphincs-shake256-128s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128s-robust/**' + - '.github/workflows/sign_sphincs-shake256-128s-robust.yml' + - '*' + +name: Test sphincs-shake256-128s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-128s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-128s-simple.yml b/.github/workflows/sign_sphincs-shake256-128s-simple.yml new file mode 100644 index 00000000..52989fe3 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-128s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128s-simple/**' + - '.github/workflows/sign_sphincs-shake256-128s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-128s-simple/**' + - '.github/workflows/sign_sphincs-shake256-128s-simple.yml' + - '*' + +name: Test sphincs-shake256-128s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-128s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-128s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-192f-robust.yml b/.github/workflows/sign_sphincs-shake256-192f-robust.yml new file mode 100644 index 00000000..d3bf5361 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-192f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192f-robust/**' + - '.github/workflows/sign_sphincs-shake256-192f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192f-robust/**' + - '.github/workflows/sign_sphincs-shake256-192f-robust.yml' + - '*' + +name: Test sphincs-shake256-192f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-192f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-192f-simple.yml b/.github/workflows/sign_sphincs-shake256-192f-simple.yml new file mode 100644 index 00000000..ccaee94f --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-192f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192f-simple/**' + - '.github/workflows/sign_sphincs-shake256-192f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192f-simple/**' + - '.github/workflows/sign_sphincs-shake256-192f-simple.yml' + - '*' + +name: Test sphincs-shake256-192f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-192f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-192s-robust.yml b/.github/workflows/sign_sphincs-shake256-192s-robust.yml new file mode 100644 index 00000000..87d250cf --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-192s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192s-robust/**' + - '.github/workflows/sign_sphincs-shake256-192s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192s-robust/**' + - '.github/workflows/sign_sphincs-shake256-192s-robust.yml' + - '*' + +name: Test sphincs-shake256-192s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-192s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-192s-simple.yml b/.github/workflows/sign_sphincs-shake256-192s-simple.yml new file mode 100644 index 00000000..f4cb71c2 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-192s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192s-simple/**' + - '.github/workflows/sign_sphincs-shake256-192s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-192s-simple/**' + - '.github/workflows/sign_sphincs-shake256-192s-simple.yml' + - '*' + +name: Test sphincs-shake256-192s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-192s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-192s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-256f-robust.yml b/.github/workflows/sign_sphincs-shake256-256f-robust.yml new file mode 100644 index 00000000..d0c7305f --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-256f-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256f-robust/**' + - '.github/workflows/sign_sphincs-shake256-256f-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256f-robust/**' + - '.github/workflows/sign_sphincs-shake256-256f-robust.yml' + - '*' + +name: Test sphincs-shake256-256f-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-256f-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-256f-simple.yml b/.github/workflows/sign_sphincs-shake256-256f-simple.yml new file mode 100644 index 00000000..c20eff3b --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-256f-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256f-simple/**' + - '.github/workflows/sign_sphincs-shake256-256f-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256f-simple/**' + - '.github/workflows/sign_sphincs-shake256-256f-simple.yml' + - '*' + +name: Test sphincs-shake256-256f-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-256f-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256f-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-256s-robust.yml b/.github/workflows/sign_sphincs-shake256-256s-robust.yml new file mode 100644 index 00000000..9a16be76 --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-256s-robust.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256s-robust/**' + - '.github/workflows/sign_sphincs-shake256-256s-robust.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256s-robust/**' + - '.github/workflows/sign_sphincs-shake256-256s-robust.yml' + - '*' + +name: Test sphincs-shake256-256s-robust + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-robust + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-256s-robust -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-robust + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-robust + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/sign_sphincs-shake256-256s-simple.yml b/.github/workflows/sign_sphincs-shake256-256s-simple.yml new file mode 100644 index 00000000..cb2518ca --- /dev/null +++ b/.github/workflows/sign_sphincs-shake256-256s-simple.yml @@ -0,0 +1,184 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256s-simple/**' + - '.github/workflows/sign_sphincs-shake256-256s-simple.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_sign/sphincs-shake256-256s-simple/**' + - '.github/workflows/sign_sphincs-shake256-256s-simple.yml' + - '*' + +name: Test sphincs-shake256-256s-simple + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-simple + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES=sphincs-shake256-256s-simple -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-simple + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: sphincs-shake256-256s-simple + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + diff --git a/.github/workflows/template.yml.j2 b/.github/workflows/template.yml.j2 new file mode 100644 index 00000000..946ea7a2 --- /dev/null +++ b/.github/workflows/template.yml.j2 @@ -0,0 +1,185 @@ +on: + push: + paths: + - 'test/**' + - 'common/**' + - 'crypto_{- scheme_type -}/{- scheme_name -}/**' + - '.github/workflows/{- scheme_type -}_{- scheme_name -}.yml' + - '*' + pull_request: + paths: + - 'test/**' + - 'common/**' + - 'crypto_{- scheme_type -}/{- scheme_name -}/**' + - '.github/workflows/{- scheme_type -}_{- scheme_name -}.yml' + - '*' + +name: Test {- scheme_name -} + +jobs: + test-native: + runs-on: ubuntu-latest + container: + image: pqclean/ci-container:${{ matrix.arch }} + env: + PQCLEAN_ONLY_SCHEMES: {- scheme_name -} + CC: ccache ${{ matrix.cc }} + CCACHE_NOSTATS: 1 + CCACHE_DIR: /ccache + CCACHE_SLOPPINESS: include_file_mtime + strategy: + matrix: + arch: + - amd64 + - i386 + cc: + - gcc + - clang + steps: + - name: Cancel Previous Runs + uses: thomwiggers/cancel-workflow-action@all_but_latest + with: + all_but_latest: true + access_token: ${{ github.token }} + continue-on-error: true + if: matrix.arch == 'amd64' && matrix.cc == 'gcc' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: /ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Install python dependencies + run: | + python3 -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python3 -m pytest --verbose --numprocesses=auto + test-emulated: + needs: + - test-native + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - armhf + - unstable-ppc + cc: + - gcc + - clang + env: + CC: ${{ matrix.cc }} + steps: + - name: Register qemu-user-static + run: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: actions/checkout@v2 + with: + submodules: true + - name: Cache ccache + uses: actions/cache@v2 + env: + cache-name: cache-ccache + with: + path: ~/ccache + key: v1-${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.cc }}-${{ env.GITHUB_WORKFLOW }}-${{ matrix.arch }} + - name: Cache pip + uses: actions/cache@v2 + env: + cache-name: cache-python-pip + with: + path: ~/.cache/pip + key: v1-python-pip + - name: Run tests in container + run: | + docker run --rm -e CI -e CC -e PQCLEAN_ONLY_SCHEMES={- scheme_name -} -v $PWD:$PWD -w $PWD -v ~/ccache:/ccache pqclean/ci-container:${{ matrix.arch }} /bin/bash -c "\ + export CCACHE_NOSTATS=1 && \ + export CCACHE_DIR=/ccache && \ + export CCACHE_SLOPPINESS=include_file_mtime && \ + export CC=\"ccache $CC\" && \ + pip3 install -U -r requirements.txt && \ + cd test && \ + python3 -m pytest --verbose --numprocesses=auto" + test-windows: + needs: + - test-native + strategy: + matrix: + bits: + - 64 + - 32 + env: + PQCLEAN_ONLY_SCHEMES: {- scheme_name -} + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Setup astyle + run: | + # Setup strong crypto + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord + Set-ItemProperty -Path "HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord + Invoke-WebRequest -OutFile "test\\astyle.exe" "https://rded.nl/pqclean/AStyle.exe" + shell: powershell + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install python requirements + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars${{ matrix.bits }}.bat" + cd test + python -m pytest --verbose --numprocesses=auto + shell: cmd + test-macos: + needs: + - test-native + env: + PQCLEAN_ONLY_SCHEMES: {- scheme_name -} + CCACHE_NOSTATS: 1 + CCACHE_SLOPPINESS: include_file_mtime + # XCode version + DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer + strategy: + matrix: + compiler: + - clang # XCode (Apple LLVM/Clang) + - gcc9 # GNU (Homebrew) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install astyle + run: | + brew install astyle + - name: Set up GCC9 compiler + run: 'export PATH="/usr/local/bin:$PATH" && export CC=gcc-9' + if: matrix.compiler == 'gcc9' + - name: Setup Python + uses: actions/setup-python@main + with: + python-version: "3.x" + - name: Install Python dependencies + run: python -m pip install -U -r requirements.txt + - name: Run tests + run: | + cd test + python -m pytest --verbose --numprocesses=auto + +{# vim: set ft=yaml ts=2 sw=2 tw=0 et :#} diff --git a/.travis.yml b/.travis.yml index 9b4b0343..f2a4fdd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -106,129 +106,6 @@ matrix: services: - docker - # MacOS builds - - name: "KEMs: MacOS + Clang" - os: osx - osx_image: xcode11.3 - compiler: clang - before_install: - - pip3 install -r requirements.txt - before_script: - - export CCACHE_NOSTATS=1 - - export CCACHE_SLOPPINESS=include_file_mtime - - export PATH="/usr/local/opt/ccache/libexec:$PATH" - - export COMMIT=$(git rev-parse HEAD) - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch --unshallow - - git checkout $TRAVIS_BRANCH - - git reset --hard $COMMIT - script: - # Use travis-wait to allow slower tests to run - - "cd test && travis_wait 60 python3 -m pytest --numprocesses=auto" - env: - PQCLEAN_ONLY_TYPES: kem - PQCLEAN_ONLY_DIFF: 1 - 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 - addons: - homebrew: - update: true - packages: - - astyle - - ccache - - name: "KEMs: MacOS + GCC9" - os: osx - osx_image: xcode11.3 - compiler: gcc - addons: - homebrew: - update: true - packages: - - astyle - - ccache - - gcc@9 - env: - PQCLEAN_ONLY_TYPES: kem - PQCLEAN_ONLY_DIFF: 1 - 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 - before_install: - - export CCACHE_NOSTATS=1 - - export CCACHE_SLOPPINESS=include_file_mtime - - export COMMIT=$(git rev-parse HEAD) - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch --unshallow - - git checkout $TRAVIS_BRANCH - - git reset --hard $COMMIT - - pip3 install -r requirements.txt - - brew link gcc - - export PATH="/usr/local/bin:$PATH" - - export CC="ccache gcc" - - ln -s /usr/local/bin/gcc-9 /usr/local/bin/gcc - - gcc --version - script: - # Use travis-wait to allow slower tests to run - - "cd test && travis_wait 60 python3 -m pytest --numprocesses=auto" - - name: "SIGs on MacOS + Clang" - os: osx - osx_image: xcode11.3 - compiler: clang - before_install: - - pip3 install -r requirements.txt - before_script: - - export CCACHE_NOSTATS=1 - - export CCACHE_SLOPPINESS=include_file_mtime - - export COMMIT=$(git rev-parse HEAD) - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch --unshallow - - git checkout $TRAVIS_BRANCH - - git reset --hard $COMMIT - - export PATH="/usr/local/opt/ccache/libexec:$PATH" - script: - # Use travis-wait to allow slower tests to run - - "cd test && travis_wait 60 python3 -m pytest --numprocesses=auto" - env: - PQCLEAN_ONLY_TYPES: sign - PQCLEAN_ONLY_DIFF: 1 - 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 - addons: - homebrew: - update: true - packages: - - astyle - - ccache - - name: "SIGs on MacOS + GCC9" - os: osx - osx_image: xcode11.3 - compiler: gcc - addons: - homebrew: - update: true - packages: - - astyle - - ccache - - gcc@9 - env: - PQCLEAN_ONLY_TYPES: sign - PQCLEAN_ONLY_DIFF: 1 - 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 - before_install: - - export CCACHE_NOSTATS=1 - - export CCACHE_SLOPPINESS=include_file_mtime - - export COMMIT=$(git rev-parse HEAD) - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch --unshallow - - git checkout $TRAVIS_BRANCH - - git reset --hard $COMMIT - - pip3 install -r requirements.txt - - brew link gcc - - export PATH="/usr/local/bin:$PATH" - - export CC="ccache gcc" - - ln -s /usr/local/bin/gcc-9 /usr/local/bin/gcc - - gcc --version - script: - # Use travis-wait to allow slower tests to run - - "cd test && travis_wait 60 python3 -m pytest --numprocesses=auto" - - cache: directories: - $HOME/Library/Caches/pip diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a337e67a..9eb7f75d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,8 @@ See the section [API](#API) below. 7. Commit everything and push it to your fork. +8. Generate a Github workflow by running ``.github/workflows/generate_workflows.py``. + 8. Open a pull request on our Github repository and process the feedback given to you by the CI environment. The pull request will also set up a checklist for you and us to follow. Feel free to ask us questions via the pull request. ### Generating implementations diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5e0cad97..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: 1.0.{build} - -image: Visual Studio 2017 - -build: - verbosity: minimal - -shallow_clone: false - -environment: - PQCLEAN_ONLY_DIFF: 1 - 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 - matrix: - - BITS: 64 - PQCLEAN_ONLY_TYPES: kem - - BITS: 32 - PQCLEAN_ONLY_TYPES: kem - - BITS: 64 - PQCLEAN_ONLY_TYPES: sign - - BITS: 32 - PQCLEAN_ONLY_TYPES: sign - -init: - - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%BITS%.bat" - # Download AStyle 3.1: first enable strong crypto in Invoke-WebRequest - - ps: Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319" -Name 'SchUseStrongCrypto' -Value '1' -Type DWord - - ps: Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319" -Name "SchUseStrongCrypto" -Value '1' -Type DWord - # Add Python to PATH - - set PATH="C:\\Python37";"C:\\Python37\Scripts";%PATH% - -build_script: - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch --all - - sh: | - COMMIT=$(git rev-parse HEAD) - git checkout $APPVEYOR_REPO_BRANCH - git reset --hard $COMMIT - - git diff --name-only origin/master - - python -m pip install -r requirements.txt - - cd test - # Download Astyle to local folder because putting it in PATH doesn't work - - ps: Invoke-WebRequest -OutFile "astyle.exe" "https://rded.nl/pqclean/AStyle.exe" - # Run tests - - python -m pytest --verbose --numprocesses=auto --junitxml=results.xml - -on_finish: - - ps: | - Try { - $wc = New-Object 'System.Net.WebClient' - $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\results.xml)) - } Catch { - Write-Warning "$($error[0])" - } diff --git a/crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c index 4b689e8b..29669d9f 100644 --- a/crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-128f-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256128FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c index d68e58f1..0ee0c434 100644 --- a/crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-128f-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256128FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c index 215e13b0..28f4fda8 100644 --- a/crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-128s-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256128SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c index e3c286c2..485a7d7e 100644 --- a/crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-128s-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256128SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c index 23ea1fab..ab2e7329 100644 --- a/crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-192f-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256192FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c index 6c112147..5a0e5c59 100644 --- a/crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-192f-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c index 36c99db5..dd33b6fb 100644 --- a/crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-192s-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256192SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c index fc1926b2..90429644 100644 --- a/crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-192s-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256192SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c index 83fe79e1..fe3cb4d7 100644 --- a/crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-256f-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256256FROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c index 7444a9e1..72cbf7ad 100644 --- a/crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-256f-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256256FSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c index 35b4c496..02fd73ce 100644 --- a/crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-256s-robust/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256256SROBUST_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c b/crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c index dfdc77de..a1bd5d95 100644 --- a/crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c +++ b/crypto_sign/sphincs-sha256-256s-simple/avx2/sha256avx.c @@ -62,11 +62,11 @@ void PQCLEAN_SPHINCSSHA256256SSIMPLE_AVX2_sha256_update8x(sha256ctxx8 *ctx, const unsigned char *d6, const unsigned char *d7, unsigned long long len) { - unsigned long long i = 0; - unsigned long long bytes_to_copy; + size_t i = 0; + size_t bytes_to_copy; while (i < len) { - bytes_to_copy = len - i; + bytes_to_copy = (size_t)len - i; if (bytes_to_copy > 64) { bytes_to_copy = 64; } diff --git a/crypto_sign/sphincs-shake256-128f-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-128f-robust/avx2/Makefile.Microsoft_nmake index a36cc7d2..0c125655 100644 --- a/crypto_sign/sphincs-shake256-128f-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-128f-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-128f-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-128f-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-128f-robust/avx2/fips202x4.c index 370a8b13..ed4fe624 100644 --- a/crypto_sign/sphincs-shake256-128f-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-128f-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256128FROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256128FROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-128f-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-128f-simple/avx2/Makefile.Microsoft_nmake index 9ab50df7..dd27016b 100644 --- a/crypto_sign/sphincs-shake256-128f-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-128f-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-128f-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-128f-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-128f-simple/avx2/fips202x4.c index 3366519f..3f1a5e0b 100644 --- a/crypto_sign/sphincs-shake256-128f-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-128f-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256128FSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256128FSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-128s-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-128s-robust/avx2/Makefile.Microsoft_nmake index de29200a..ff36d1f9 100644 --- a/crypto_sign/sphincs-shake256-128s-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-128s-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-128s-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** -$(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) +$(KECCAK4X): $(KECCAK4XDIR)/*.c $(KECCAK4XDIR)/*.h $(KECCAK4XDIR)/*.macros + cd $(KECCAK4XDIR) && $(MAKE) /$(MAKEFLAGS) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-128s-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-128s-robust/avx2/fips202x4.c index 11382cd6..b23ebc63 100644 --- a/crypto_sign/sphincs-shake256-128s-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-128s-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256128SROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256128SROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-128s-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-128s-simple/avx2/Makefile.Microsoft_nmake index d8b51035..a887d7a1 100644 --- a/crypto_sign/sphincs-shake256-128s-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-128s-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-128s-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-128s-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-128s-simple/avx2/fips202x4.c index 26d2ec50..58f98b3f 100644 --- a/crypto_sign/sphincs-shake256-128s-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-128s-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256128SSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256128SSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-192f-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-192f-robust/avx2/Makefile.Microsoft_nmake index 258fc8e6..4b4e5134 100644 --- a/crypto_sign/sphincs-shake256-192f-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-192f-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-192f-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-192f-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-192f-robust/avx2/fips202x4.c index 73ef97b7..31388004 100644 --- a/crypto_sign/sphincs-shake256-192f-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-192f-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256192FROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256192FROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-192f-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-192f-simple/avx2/Makefile.Microsoft_nmake index c5f44eb1..2b992f30 100644 --- a/crypto_sign/sphincs-shake256-192f-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-192f-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-192f-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-192f-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-192f-simple/avx2/fips202x4.c index 7997b3e2..01dbf7da 100644 --- a/crypto_sign/sphincs-shake256-192f-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-192f-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256192FSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256192FSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-192s-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-192s-robust/avx2/Makefile.Microsoft_nmake index 9bfe65d1..fdc95802 100644 --- a/crypto_sign/sphincs-shake256-192s-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-192s-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-192s-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-192s-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-192s-robust/avx2/fips202x4.c index f0d3fac2..8f33cfaf 100644 --- a/crypto_sign/sphincs-shake256-192s-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-192s-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256192SROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256192SROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-192s-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-192s-simple/avx2/Makefile.Microsoft_nmake index 920ee157..2dd3cad1 100644 --- a/crypto_sign/sphincs-shake256-192s-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-192s-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-192s-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-192s-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-192s-simple/avx2/fips202x4.c index d11aeb84..b34d28c6 100644 --- a/crypto_sign/sphincs-shake256-192s-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-192s-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256192SSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-256f-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-256f-robust/avx2/Makefile.Microsoft_nmake index b7faf194..1e3e7283 100644 --- a/crypto_sign/sphincs-shake256-256f-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-256f-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-256f-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-256f-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-256f-robust/avx2/fips202x4.c index 418ca171..e1a01a9c 100644 --- a/crypto_sign/sphincs-shake256-256f-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-256f-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256256FROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256256FROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-256f-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-256f-simple/avx2/Makefile.Microsoft_nmake index f9cad31e..ca4d7574 100644 --- a/crypto_sign/sphincs-shake256-256f-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-256f-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-256f-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-256f-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-256f-simple/avx2/fips202x4.c index aacf2fee..3cfeadcf 100644 --- a/crypto_sign/sphincs-shake256-256f-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-256f-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256256FSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256256FSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-256s-robust/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-256s-robust/avx2/Makefile.Microsoft_nmake index 463ba30d..f8d7b1db 100644 --- a/crypto_sign/sphincs-shake256-256s-robust/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-256s-robust/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-256s-robust_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_robust.obj hash_shake256x4.obj thash_shake256_robustx4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-256s-robust/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-256s-robust/avx2/fips202x4.c index 18a57d2e..06847569 100644 --- a/crypto_sign/sphincs-shake256-256s-robust/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-256s-robust/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256256SROBUST_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256256SROBUST_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/crypto_sign/sphincs-shake256-256s-simple/avx2/Makefile.Microsoft_nmake b/crypto_sign/sphincs-shake256-256s-simple/avx2/Makefile.Microsoft_nmake index 21567035..1aeed608 100644 --- a/crypto_sign/sphincs-shake256-256s-simple/avx2/Makefile.Microsoft_nmake +++ b/crypto_sign/sphincs-shake256-256s-simple/avx2/Makefile.Microsoft_nmake @@ -5,7 +5,7 @@ LIBRARY=libsphincs-shake256-256s-simple_avx2.lib OBJECTS=address.obj wots.obj utils.obj utilsx4.obj fips202x4.obj fors.obj sign.obj hash_shake256.obj thash_shake256_simple.obj hash_shake256x4.obj thash_shake256_simplex4.obj KECCAK4XDIR=..\..\..\common\keccak4x -KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o +KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.obj KECCAK4X=$(KECCAK4XDIR)\$(KECCAK4XOBJ) CFLAGS=/nologo /arch:AVX2 /O2 /I ..\..\..\common /W4 /WX @@ -15,12 +15,13 @@ all: $(LIBRARY) # Make sure objects are recompiled if headers change. $(OBJECTS): *.h -$(LIBRARY): $(OBJECTS) $(KECCAKX4) +$(LIBRARY): $(OBJECTS) $(KECCAK4X) LIB.EXE /NOLOGO /WX /OUT:$@ $** $(KECCAK4X): - cd $(KECCAK4XDIR) && $(MAKE) $(KECCAK4XOBJ) + cd $(KECCAK4XDIR) && $(MAKE) /f Makefile.Microsoft_nmake $(KECCAK4XOBJ) clean: - -DEL $(OBJECTS) - -DEL $(LIBRARY) + -DEL $(OBJECTS) + -DEL $(LIBRARY) + -DEL $(KECCAK4X) diff --git a/crypto_sign/sphincs-shake256-256s-simple/avx2/fips202x4.c b/crypto_sign/sphincs-shake256-256s-simple/avx2/fips202x4.c index 7cba29ef..18061a79 100644 --- a/crypto_sign/sphincs-shake256-256s-simple/avx2/fips202x4.c +++ b/crypto_sign/sphincs-shake256-256s-simple/avx2/fips202x4.c @@ -36,7 +36,7 @@ static void keccak_absorb4x(__m256i *s, const unsigned char *m1, const unsigned char *m2, const unsigned char *m3, - unsigned long long int mlen, + size_t mlen, unsigned char p) { unsigned char t0[200] = {0}; unsigned char t1[200] = {0}; @@ -138,7 +138,7 @@ void PQCLEAN_SPHINCSSHAKE256256SSIMPLE_AVX2_shake128x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE128_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE128_RATE, s, SHAKE128_RATE); @@ -183,7 +183,7 @@ void PQCLEAN_SPHINCSSHAKE256256SSIMPLE_AVX2_shake256x4(unsigned char *out0, } /* absorb 4 message of identical length in parallel */ - keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, inlen, 0x1F); + keccak_absorb4x(s, SHAKE256_RATE, in0, in1, in2, in3, (size_t)inlen, 0x1F); /* Squeeze output */ keccak_squeezeblocks4x(out0, out1, out2, out3, outlen / SHAKE256_RATE, s, SHAKE256_RATE); diff --git a/requirements.txt b/requirements.txt index c27304a2..89bec97e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ pytest pytest-xdist pycparser py-cpuinfo +jinja2 diff --git a/test/test_makefile_dependencies.py b/test/test_makefile_dependencies.py index f6f89dce..8d64b821 100644 --- a/test/test_makefile_dependencies.py +++ b/test/test_makefile_dependencies.py @@ -62,13 +62,18 @@ def check_makefile_dependencies(implementation, impl_path, file): sfiles = glob.glob(os.path.join(impl_path, '*.[sS]')) hfiles = glob.glob(os.path.join(impl_path, '*.h')) incfiles = glob.glob(os.path.join(impl_path, '*.inc')) - ofiles = glob.glob( - os.path.join(impl_path, - '*.o' if os.name != 'nt' else '*.obj')) - # handle dependency o-files + o_ext = '*.o' if os.name != 'nt' else '*.obj' + ofiles = glob.glob(os.path.join(impl_path, o_ext)) + + # handle dependency files: these also need to be set correctly commondir = os.path.join(impl_path, '..', '..', '..', 'common') - ofiles += glob.glob(os.path.join(commondir, '*.o')) - ofiles += glob.glob(os.path.join(commondir, '**', '*.o')) + cfiles += glob.glob(os.path.join(commondir, '*.c')) + cfiles += glob.glob(os.path.join(commondir, '**', '*.c')) + hfiles += glob.glob(os.path.join(commondir, '*.h')) + hfiles += glob.glob(os.path.join(commondir, '**', '*.h')) + incfiles.append(os.path.join(commondir, 'keccak4x', 'KeccakP-1600-unrolling.macros')) + ofiles += glob.glob(os.path.join(commondir, o_ext)) + ofiles += glob.glob(os.path.join(commondir, '**', o_ext)) libfile = os.path.join(impl_path, implementation.libname()) diff --git a/test/test_workflows.py b/test/test_workflows.py new file mode 100644 index 00000000..9f873d18 --- /dev/null +++ b/test/test_workflows.py @@ -0,0 +1,14 @@ +from pathlib import Path + +import helpers + +@helpers.skip_windows() +def test_workflows_up_to_date(): + scriptdir = str(Path("..") / ".github" / "workflows") + helpers.run_subprocess(["python3", "generate_workflows.py", "test"], + working_dir=scriptdir) + +if __name__ == "__main__": + import pytest + import sys + pytest.main(sys.argv)