More OS support (#3915)

This commit is contained in:
ebbit1q 2020-03-20 20:32:12 +01:00 committed by GitHub
parent 9cec0852bb
commit e8d5715f7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 292 additions and 22 deletions

View file

@ -68,6 +68,10 @@ set -e
mkdir -p build
cd build
if ! [[ $CORE_AMOUNT ]]; then
CORE_AMOUNT="2" # travis machines have 2 cores
fi
# Add cmake flags
if [[ $MAKE_SERVER ]]; then
flags+=" -DWITH_SERVER=1"
@ -92,7 +96,7 @@ fi
# Compile
cmake --version
cmake .. $flags
make -j2
make -j"$CORE_AMOUNT"
if [[ $MAKE_TEST ]]; then
make test
@ -105,9 +109,9 @@ fi
if [[ $MAKE_PACKAGE ]]; then
make package
if [[ $PACKAGE_NAME ]]; then
found=$(find . -maxdepth 1 -type f -name "Cockatrice-*.*" -print -quit)
path=${found%/*}
file=${found##*/}
found="$(find . -maxdepth 1 -type f -name "Cockatrice-*.*" -print -quit)"
path="${found%/*}"
file="${found##*/}"
if [[ ! $file ]]; then
echo "could not find package" >&2
exit 1