Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-secp256k1.sh
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/bin/bash | |||||
set -eu | |||||
TOPLEVEL=`git rev-parse --show-toplevel` | |||||
if [[ -z "${TOPLEVEL}" ]]; then | |||||
echo "No .git directory found, assuming pwd" | |||||
TOPLEVEL=`pwd -P` | |||||
deadalnix: Why? | |||||
jasonbcoxAuthorUnsubmitted Done Inline ActionsDunno. This was just copied from build.sh jasonbcox: Dunno. This was just copied from build.sh | |||||
jasonbcoxAuthorUnsubmitted Done Inline Actions@schancel What situation is the codebase not part of a git repo? I don't see the branch being hit otherwise. jasonbcox: @schancel What situation is the codebase not part of a git repo? I don't see the branch being… | |||||
jasonbcoxAuthorUnsubmitted Done Inline ActionsShammah @jasonbcox answer to your question is when the git repo is stripped in transfer. (E.g. when rsyncing it to a remote machine to build, or server side checkout (vs agent checkout)) Or if you download a zip of the source Jason Cox so for running locally, right? I dont think teamcity would ever have hit this path Shammah If agent checkout is turned off it will. It checks out the code on the master node and only transfers the source to the build environment. Without ssh keys or the git metadata. jasonbcox: ```
Shammah
@jasonbcox answer to your question is when the git repo is stripped in transfer. (E. | |||||
fi | |||||
SECP_DIR="${TOPLEVEL}/src/secp256k1" | |||||
# FIXME: Figure out how to make out-of-tree builds work with the java tests | |||||
#BUILD_DIR="${SECP_DIR}/build" | |||||
#mkdir -p ${BUILD_DIR} | |||||
## Generate necessary autoconf files | |||||
cd ${SECP_DIR} | |||||
./autogen.sh | |||||
#cd ${BUILD_DIR} | |||||
## Determine the number of build threads | |||||
THREADS=$(nproc || sysctl -n hw.ncpu) | |||||
./configure --enable-jni --enable-experimental --enable-module-ecdh | |||||
mkdir -p "${SECP_DIR}/src/java/guava" | |||||
wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O ../src/java/guava/guava-18.0.jar | |||||
# Run build | |||||
make -j ${THREADS} | |||||
# Run Java tests | |||||
make check-java | |||||
Why?