summaryrefslogtreecommitdiff
path: root/appveyor_build.sh
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-03-26 15:40:23 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-03-26 15:40:23 -0700
commit8f7f8560a7ff3db832748bef576bbfd5af527fcf (patch)
tree653662e21194438f36033e097573b2a78c665e76 /appveyor_build.sh
parentc66f39f9ba8e2cd5b6ee89e853fcf8570046d715 (diff)
downloadlibusb-8f7f8560a7ff3db832748bef576bbfd5af527fcf.tar.gz
appveyor: Increase build coverage to all VS solutions
Using the 'for' construct allows the specification of a more complex build matrix. This additionally simplifies the builds using MinGW and Cygwin because the build script can be unified and does not require checking for the 'Release' configuration. This change also extends the MinGW builds to cover both 32-bit and 64-bit builds using GCC versions 6.3.0 and 8.1.0, respectively. The Cygwin builds were similarly extended to include 64-bit build coverage. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'appveyor_build.sh')
-rw-r--r--appveyor_build.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/appveyor_build.sh b/appveyor_build.sh
new file mode 100644
index 0000000..7e6bed7
--- /dev/null
+++ b/appveyor_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -eu
+
+buildsys="${1}-${Platform}"
+
+if [ "${buildsys}" == "MinGW-Win32" ]; then
+ export PATH="/c/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin:${PATH}"
+elif [ "${buildsys}" == "MinGW-x64" ]; then
+ export PATH="/c/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin:${PATH}"
+fi
+
+set -x
+
+builddir="build-${buildsys}"
+installdir="${PWD}/libusb-${buildsys}"
+
+cd libusb
+./bootstrap.sh
+mkdir "${builddir}"
+cd "${builddir}"
+../configure --prefix="${installdir}" --enable-examples-build --enable-tests-build
+make -j4
+make install