-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add macOS to the CI #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add macOS to the CI #750
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b6807d9
Move travis script into a standalone sh file
elichai 0c5ff90
Add macOS support to travis
elichai bc818b1
Bump travis Ubuntu from xenial(16.04) to bionic(18.04)
elichai 99bd661
Replace travis_wait with a loop printing "\a" to stdout every minute
elichai 71757da
Explictly pass SECP256K1_BENCH_ITERS to the benchmarks in travis.sh
elichai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -x | ||
|
||
if [ -n "$HOST" ] | ||
then | ||
export USE_HOST="--host=$HOST" | ||
fi | ||
if [ "$HOST" = "i686-linux-gnu" ] | ||
then | ||
export CC="$CC -m32" | ||
fi | ||
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_COMPILER" = "gcc" ] | ||
then | ||
export CC="gcc-9" | ||
fi | ||
|
||
./configure \ | ||
--enable-experimental="$EXPERIMENTAL" --enable-endomorphism="$ENDOMORPHISM" \ | ||
--with-field="$FIELD" --with-bignum="$BIGNUM" --with-asm="$ASM" --with-scalar="$SCALAR" \ | ||
--enable-ecmult-static-precomputation="$STATICPRECOMPUTATION" --with-ecmult-gen-precision="$ECMULTGENPRECISION" \ | ||
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" "$EXTRAFLAGS" "$USE_HOST" | ||
|
||
if [ -n "$BUILD" ] | ||
then | ||
make -j2 "$BUILD" | ||
fi | ||
if [ -n "$VALGRIND" ] | ||
then | ||
make -j2 | ||
# the `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (http://valgrind.org/docs/manual/manual-core.html) | ||
valgrind --error-exitcode=42 ./tests 16 | ||
valgrind --error-exitcode=42 ./exhaustive_tests | ||
fi | ||
if [ -n "$BENCH" ] | ||
then | ||
if [ -n "$VALGRIND" ] | ||
then | ||
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool | ||
EXEC='./libtool --mode=execute valgrind --error-exitcode=42' | ||
real-or-random marked this conversation as resolved.
Show resolved
Hide resolved
|
||
else | ||
EXEC= | ||
fi | ||
real-or-random marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# This limits the iterations in the benchmarks below to ITER(set in .travis.yml) iterations. | ||
export SECP256K1_BENCH_ITERS="$ITERS" | ||
{ | ||
$EXEC ./bench_ecmult | ||
$EXEC ./bench_internal | ||
$EXEC ./bench_sign | ||
$EXEC ./bench_verify | ||
} >> bench.log 2>&1 | ||
if [ "$RECOVERY" = "yes" ] | ||
then | ||
$EXEC ./bench_recover >> bench.log 2>&1 | ||
fi | ||
if [ "$ECDH" = "yes" ] | ||
then | ||
$EXEC ./bench_ecdh >> bench.log 2>&1 | ||
fi | ||
fi | ||
if [ -n "$CTIMETEST" ] | ||
then | ||
./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1 | ||
fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.