summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2019-02-24 21:21:26 +0100
committerMartin Matuska <martin@matuska.org>2019-02-25 13:11:48 +0100
commit353a8f1eeda698abed4e217b6fc4a81f10d440b3 (patch)
treef445890e2718e926c7ad83fc93f5932f9fd8e2d9 /build
parent3f51e7f1acae9b944cc0c2f5720f16c19eb72f81 (diff)
downloadlibarchive-353a8f1eeda698abed4e217b6fc4a81f10d440b3.tar.gz
Add MS Visual Studio and MinGW tests via Travis CI
Make MS Visual Studio complain less in test_read_format_rar5.c
Diffstat (limited to 'build')
-rwxr-xr-xbuild/ci/travis_ci.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/build/ci/travis_ci.sh b/build/ci/travis_ci.sh
new file mode 100755
index 00000000..2373a5e2
--- /dev/null
+++ b/build/ci/travis_ci.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+UNAME=`uname`
+CURDIR=`pwd`
+SRCDIR="${SRCDIR:-`pwd`}"
+if [ -z "${BUILDDIR}" ]; then
+ BUILDDIR="${CURDIR}/build_ci/${BS}"
+fi
+mkdir -p "${BUILDDIR}"
+cd "${BUILDDIR}"
+case "$UNAME" in
+ MSYS*)
+ if [ "${BS}" = "msbuild" ]; then
+ set -x
+ export PATH=${PATH}:"/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
+ cmake -G "Visual Studio 15 2017" -D CMAKE_BUILD_TYPE="Release" "${SRCDIR}"
+ MSBuild.exe libarchive.sln //t:ALL_BUILD
+ MSBuild.exe libarchive.sln //t:RUN_ALL_TESTS
+ set +x
+ elif [ "${BS}" = "mingw" ]; then
+ set -x
+ cmake -G "MSYS Makefiles" -D CMAKE_C_COMPILER="${CC}" -D CMAKE_MAKE_PROGRAM="mingw32-make" -D CMAKE_BUILD_TYPE="Release" "${SRCDIR}"
+ mingw32-make
+ mingw32-make test
+ set +x
+ else
+ echo "Unknown or unspecified build type: ${BS}"
+ exit 1
+ fi
+ ;;
+esac