From 7310d7cf726813beab9f20323d37cef8da62cc0b Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 16 Jun 2018 13:18:57 +0500 Subject: [PATCH] initial travis-ci support --- .ci/build-check.sh | 11 +++++++++++ .ci/build-openssl.sh | 23 +++++++++++++++++++++++ .travis.yml | 25 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100755 .ci/build-check.sh create mode 100755 .ci/build-openssl.sh create mode 100644 .travis.yml diff --git a/.ci/build-check.sh b/.ci/build-check.sh new file mode 100755 index 0000000..e60045c --- /dev/null +++ b/.ci/build-check.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -eux + +cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib +make + +cp ./bin/gost.so ${PREFIX}/lib/engines-1.1 + +export LD_LIBRARY_PATH=${PREFIX}/lib + +${PREFIX}/bin/openssl ciphers |grep GOST diff --git a/.ci/build-openssl.sh b/.ci/build-openssl.sh new file mode 100755 index 0000000..1e3064f --- /dev/null +++ b/.ci/build-openssl.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -eux + +git clone -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git + +cd openssl +./config shared --prefix=${PREFIX} --openssldir=${PREFIX} +make all install_sw + +cat <> ${PREFIX}/openssl.cnf +openssl_conf = openssl_def + +[openssl_def] +engines = engine_section + +[engine_section] +gost = gost_section + +[gost_section] +default_algorithms = ALL +engine_id = gost +CRYPT_PARAMS = id-Gost28147-89-CryptoPro-A-ParamSet +EOF diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0c412ca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +sudo: required +dist: trusty + +os: linux + +language: c + +env: + global: + - PREFIX="${HOME}/opt" + +matrix: + include: + - env: OPENSSL_BRANCH=OpenSSL_1_1_0-stable + os: linux + compiler: gcc +# - env: OPENSSL_BRANCH=OpenSSL_1_0_2-stable +# os: linux +# compiler: gcc + +before_script: + - .ci/build-openssl.sh > build.log 2>&1 || (cat build.log && exit 1) + +script: + - .ci/build-check.sh -- 2.39.5