Add travis config
Also fixes some tidy issues Not sure why my local clang-tidy doesn't complain
Bu işleme şunda yer alıyor:
ebeveyn
e32b091ead
işleme
4d0082fa43
@ -1,5 +1,5 @@
|
||||
---
|
||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,clang-diagnostic-*,clang-analyzer-*,*,-hicpp-signed-bitwise,-llvm-header-guard,-hicpp-function-*,-readability-function-size'
|
||||
Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size'
|
||||
WarningsAsErrors: '*'
|
||||
HeaderFilterRegex: '.*'
|
||||
AnalyzeTemporaryDtors: false
|
||||
|
33
.travis.yml
33
.travis.yml
@ -1,11 +1,32 @@
|
||||
language: c
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
dist: xenial
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- MAKETARGET="test-all tidy-all check-format"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- MAKETARGET=test-all
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env:
|
||||
- MAKETARGET=test-all
|
||||
- os: osx
|
||||
osx_image: xcode9
|
||||
env:
|
||||
- MATRIX_EVAL="brew upgrade && brew install gcc && CC=gcc-8 && CXX=g++-8"
|
||||
- MAKETARGET=test-all
|
||||
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
|
||||
script:
|
||||
- make test-all
|
||||
- make tidy-all
|
||||
- make check-format
|
||||
- make ${MAKETARGET}
|
||||
|
||||
|
||||
# vim: set ft=yaml ts=2 sw=2 tw=0 et :
|
||||
|
19
Makefile
19
Makefile
@ -1,7 +1,7 @@
|
||||
# This -Wall was supported by the European Commission through the ERC Starting Grant 805031 (EPOQUE)
|
||||
CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99 $(EXTRAFLAGS)
|
||||
|
||||
ALL_SCHEMES=$(filter-out crypto_%/test.c, $(wildcard crypto_*/*))
|
||||
ALL_SCHEMES=$(filter-out crypto_%.c, $(wildcard crypto_*/*))
|
||||
|
||||
default: help
|
||||
|
||||
@ -63,7 +63,6 @@ check-format:
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
$(eval undefine .TIDY_FIX)
|
||||
$(MAKE) do-tidy
|
||||
|
||||
do-tidy: require_scheme
|
||||
@ -81,10 +80,11 @@ apply-tidy:
|
||||
# The below should be outlined with ts=8
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "make test-all Run all tests"
|
||||
@echo "make functest SCHEME=scheme Build functional tests for SCHEME"
|
||||
@echo "make functest-all Build functional tests for all schemes"
|
||||
@echo "make run-functest SCHEME=scheme Run functional tests for SCHEME"
|
||||
@echo "make run-functest-all Run all functests"
|
||||
@echo "make testvectors SCHEME=scheme Build testvector generator for SCHEME"
|
||||
@echo "make clean Clean up the bin/ folder"
|
||||
@echo "make format Automatically formats all the source code"
|
||||
@echo "make tidy SCHEME=scheme Runs the clang-tidy linter against SCHEME"
|
||||
@ -94,23 +94,26 @@ help:
|
||||
@echo "make help Displays this message"
|
||||
|
||||
.PHONY: functest-all
|
||||
build-functests: $(foreach skeme,$(ALL_SCHEMES),bin/functest_$(subst /,_,$(skeme)))
|
||||
functest-all:
|
||||
@for scheme in $(ALL_SCHEMES); do \
|
||||
$(MAKE) functest SCHEME=$$scheme || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: run-functest-all
|
||||
run-functest-all: build-functests
|
||||
run-functest-all: functest-all
|
||||
@for functest in bin/functest_* ; do \
|
||||
echo ./$$functest ; \
|
||||
./$$functest ; \
|
||||
./$$functest || exit 1 ;\
|
||||
done
|
||||
@echo Tests completed
|
||||
|
||||
.PHONY: test-all
|
||||
test-all: run-functests
|
||||
test-all: run-functest-all
|
||||
|
||||
.PHONY: tidy-all
|
||||
tidy-all:
|
||||
@for scheme in $(ALL_SCHEMES); do \
|
||||
$(MAKE) tidy SCHEME=$$scheme; \
|
||||
$(MAKE) tidy SCHEME=$$scheme || exit 1 ; \
|
||||
done
|
||||
|
||||
.PHONY: apply-tidy-all
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef SHA2_H
|
||||
#define SHA2_H
|
||||
|
||||
int sha384(unsigned char *output, const unsigned char *input,
|
||||
int sha384(unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen);
|
||||
int sha512(unsigned char *output, const unsigned char *input,
|
||||
int sha512(unsigned char *out, const unsigned char *in,
|
||||
unsigned long long inlen);
|
||||
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void ntt(uint16_t *poly);
|
||||
void ntt(uint16_t *p);
|
||||
void invntt(uint16_t *a);
|
||||
|
||||
#endif
|
||||
|
@ -18,7 +18,7 @@ void polyvecl_ntt(polyvecl *v);
|
||||
void polyvecl_pointwise_acc_invmontgomery(poly *w, const polyvecl *u,
|
||||
const polyvecl *v);
|
||||
|
||||
int polyvecl_chknorm(const polyvecl *v, uint32_t B);
|
||||
int polyvecl_chknorm(const polyvecl *v, uint32_t bound);
|
||||
|
||||
/* Vectors of polynomials of length K */
|
||||
typedef struct {
|
||||
@ -36,7 +36,7 @@ void polyveck_shiftl(polyveck *v, unsigned int k);
|
||||
void polyveck_ntt(polyveck *v);
|
||||
void polyveck_invntt_montgomery(polyveck *v);
|
||||
|
||||
int polyveck_chknorm(const polyveck *v, uint32_t B);
|
||||
int polyveck_chknorm(const polyveck *v, uint32_t bound);
|
||||
|
||||
void polyveck_power2round(polyveck *v1, polyveck *v0, const polyveck *v);
|
||||
void polyveck_decompose(polyveck *v1, polyveck *v0, const polyveck *v);
|
||||
|
@ -11,7 +11,7 @@ void challenge(poly *c, const unsigned char mu[CRHBYTES], const polyveck *w1);
|
||||
int crypto_sign_keypair(unsigned char *pk, unsigned char *sk);
|
||||
|
||||
int crypto_sign(unsigned char *sm, unsigned long long *smlen,
|
||||
const unsigned char *msg, unsigned long long len,
|
||||
const unsigned char *m, unsigned long long mlen,
|
||||
const unsigned char *sk);
|
||||
|
||||
int crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle