mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-12-03 00:02:44 -05:00
OSX testing on CircleCI alternative (#597)
* Use OpenSSL's EVP_MD_CTX_new and _free * OSX testing added (only on checkin, only on master) * Alternative way of running stuff only on recent check-ins * OR not AND * Build OSX on commit temporarily * Missing checkout * Install missing Python module on OSX * Remove macOS on Travis Co-authored-by: Michael Baentsch <57787676+baentsch@users.noreply.github.com>
This commit is contained in:
parent
6d87c34dda
commit
28f7c668f1
@ -7,13 +7,13 @@ version: 2
|
|||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Configure
|
name: Configure
|
||||||
command: autoreconf -i && ./configure --enable-silent-rules ${CONFIGURE_ARGS}
|
command: scripts/git_no_checkin_in_last_day.sh || (autoreconf -i && ./configure --enable-silent-rules ${CONFIGURE_ARGS})
|
||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: source ~/.bashrc && make -j && make check
|
command: scripts/git_no_checkin_in_last_day.sh || (source ~/.bashrc && make -j && make check)
|
||||||
- run:
|
- run:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
command: mkdir -p test-results/pytest && python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=auto
|
command: mkdir -p test-results/pytest && scripts/git_no_checkin_in_last_day.sh || (python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=auto)
|
||||||
- store_test_results: # Note that this command will fail when running CircleCI locally, that is expected behaviour
|
- store_test_results: # Note that this command will fail when running CircleCI locally, that is expected behaviour
|
||||||
path: test-results
|
path: test-results
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
@ -30,6 +30,7 @@ version: 2
|
|||||||
- run: # Skipping sig-sphincs because it exhausts memory on CircleCI
|
- run: # Skipping sig-sphincs because it exhausts memory on CircleCI
|
||||||
name: Run the tests in a container
|
name: Run the tests in a container
|
||||||
command: |
|
command: |
|
||||||
|
scripts/git_no_checkin_in_last_day.sh &&
|
||||||
docker run -e SKIP_TESTS=style --rm -v `pwd`:`pwd` -w `pwd` dstebila/liboqs:debian-buster-${ARCH}-0.1.0 /bin/bash -c "
|
docker run -e SKIP_TESTS=style --rm -v `pwd`:`pwd` -w `pwd` dstebila/liboqs:debian-buster-${ARCH}-0.1.0 /bin/bash -c "
|
||||||
uname -a &&
|
uname -a &&
|
||||||
file /bin/ls &&
|
file /bin/ls &&
|
||||||
@ -99,6 +100,39 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
IMAGE: openqsafe/ci-centos-8
|
IMAGE: openqsafe/ci-centos-8
|
||||||
SKIP_TESTS: style
|
SKIP_TESTS: style
|
||||||
|
osx:
|
||||||
|
macos:
|
||||||
|
xcode: "11.3.0"
|
||||||
|
environment:
|
||||||
|
CONFIGURE_ARGS: --without-openssl
|
||||||
|
SKIP_TESTS: style
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
command: |
|
||||||
|
scripts/git_no_checkin_in_last_day.sh || (
|
||||||
|
brew update &&
|
||||||
|
brew unlink python@2 &&
|
||||||
|
brew install autoconf automake libtool wget doxygen graphviz clang-format &&
|
||||||
|
pip3 install pytest pytest-xdist
|
||||||
|
)
|
||||||
|
- run:
|
||||||
|
name: Configure
|
||||||
|
command: scripts/git_no_checkin_in_last_day.sh || (autoreconf -i && ./configure --enable-silent-rules ${CONFIGURE_ARGS})
|
||||||
|
- run:
|
||||||
|
name: Build
|
||||||
|
command: scripts/git_no_checkin_in_last_day.sh || (make -j && make check)
|
||||||
|
- run:
|
||||||
|
name: System information
|
||||||
|
command: scripts/git_no_checkin_in_last_day.sh || (sysctl -a | grep machdep.cpu && cat src/kem/sike/Makefile && ls -l tests)
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: mkdir -p test-results/pytest && scripts/git_no_checkin_in_last_day.sh || (python3 -m pytest --verbose --junitxml=test-results/pytest/results.xml --numprocesses=auto)
|
||||||
|
- store_test_results: # Note that this command will fail when running CircleCI locally, that is expected behaviour
|
||||||
|
path: test-results
|
||||||
|
- store_artifacts:
|
||||||
|
path: test-results
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
@ -107,6 +141,7 @@ workflows:
|
|||||||
- centos-7
|
- centos-7
|
||||||
- centos-8
|
- centos-8
|
||||||
- debian-buster-amd64
|
- debian-buster-amd64
|
||||||
|
- osx
|
||||||
- ubuntu-bionic-x86_64-gcc7
|
- ubuntu-bionic-x86_64-gcc7
|
||||||
- ubuntu-bionic-x86_64-gcc7-noopenssl
|
- ubuntu-bionic-x86_64-gcc7-noopenssl
|
||||||
- ubuntu-bionic-x86_64-gcc7-noshared
|
- ubuntu-bionic-x86_64-gcc7-noshared
|
||||||
@ -121,6 +156,7 @@ workflows:
|
|||||||
jobs:
|
jobs:
|
||||||
- centos-7
|
- centos-7
|
||||||
- centos-8
|
- centos-8
|
||||||
|
- osx
|
||||||
- debian-buster-amd64
|
- debian-buster-amd64
|
||||||
- debian-buster-aarch64
|
- debian-buster-aarch64
|
||||||
- debian-buster-armhf
|
- debian-buster-armhf
|
||||||
|
|||||||
38
.travis.yml
38
.travis.yml
@ -15,41 +15,3 @@ matrix:
|
|||||||
script:
|
script:
|
||||||
- scripts/arm-cross-compile.sh
|
- scripts/arm-cross-compile.sh
|
||||||
- scripts/arm-run-tests-qemu.sh
|
- scripts/arm-run-tests-qemu.sh
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env:
|
|
||||||
- WITH_OPENSSL=1
|
|
||||||
- SKIP_TESTS=style
|
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1
|
|
||||||
before_install:
|
|
||||||
- brew install doxygen graphviz openssl@1.1
|
|
||||||
- pip3 install pytest pytest-xdist
|
|
||||||
script:
|
|
||||||
- autoreconf -i
|
|
||||||
- ./configure --enable-silent-rules
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
- ./configure --enable-silent-rules --disable-shared
|
|
||||||
- make clean
|
|
||||||
- make
|
|
||||||
- make check
|
|
||||||
- python3 -m pytest --verbose --numprocesses=auto
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
env:
|
|
||||||
- WITH_OPENSSL=0
|
|
||||||
- SKIP_TESTS=style
|
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1
|
|
||||||
before_install:
|
|
||||||
- brew install doxygen graphviz
|
|
||||||
- pip3 install pytest pytest-xdist
|
|
||||||
script:
|
|
||||||
- autoreconf -i
|
|
||||||
- ./configure --enable-silent-rules --without-openssl
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
- ./configure --enable-silent-rules --disable-shared
|
|
||||||
- make clean
|
|
||||||
- make
|
|
||||||
- make check
|
|
||||||
- python3 -m pytest --verbose --numprocesses=auto
|
|
||||||
|
|||||||
12
scripts/git_no_checkin_in_last_day.sh
Executable file
12
scripts/git_no_checkin_in_last_day.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Detects whether there has been a Git commit in the last day on this
|
||||||
|
# branch. Returns 1 if there has been a commit, 0 if there has not.
|
||||||
|
|
||||||
|
r=`git log --name-only --since="1 day ago" -n 2`
|
||||||
|
if [ "x$r" == "x" ]; then
|
||||||
|
echo "No commit in the last day. No build/test required. Exiting."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user