travis win32
This commit is contained in:
+1
-1
Submodule .ci updated: 1bbf51635d...f1048da643
+1
-1
@@ -1,3 +1,3 @@
|
||||
[submodule ".ci"]
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts
|
||||
url = https://github.com/mdavidsaver/ci-scripts
|
||||
|
||||
+4
-2
@@ -17,11 +17,11 @@ addons:
|
||||
- cmake
|
||||
|
||||
install:
|
||||
- ./withenv.sh ./.ci/travis-prepare.sh
|
||||
- ./travis-libevent.sh
|
||||
- ./.ci/travis-prepare.sh
|
||||
|
||||
script:
|
||||
- ./.ci/travis-build.sh
|
||||
- ./withenv.sh ./.ci/travis-build.sh
|
||||
|
||||
# If you need to do more during install and build,
|
||||
# add a local directory to your module and do e.g.
|
||||
@@ -37,6 +37,8 @@ script:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: BASE=7.0 EPICS_HOST_ARCH=win32-x86
|
||||
os: windows
|
||||
|
||||
# Different configurations of default gcc and clang
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
set VCVARS=%1
|
||||
set PLATFORM=%2
|
||||
|
||||
call %VCVARS% %PLATFORM%
|
||||
where cl
|
||||
|
||||
set
|
||||
+12
-10
@@ -1,18 +1,20 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -e -x
|
||||
|
||||
env
|
||||
|
||||
BFLAGS=
|
||||
GFLAGS=()
|
||||
BFLAGS=()
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "windows" ]
|
||||
then
|
||||
pwd
|
||||
# C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
|
||||
find "/c/Program Files (x86)" -name vcvars*.bat
|
||||
./msenv.bat "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
ls /c/Users/travis/AppData/Local/Microsoft/WindowsApps
|
||||
|
||||
BFLAGS="$BFLAGS -G "\""Visual Studio 15 2017 x86"\"
|
||||
# C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
|
||||
find "/c/Program Files (x86)/Microsoft Visual Studio"* -name vcvars*.bat
|
||||
|
||||
GFLAGS=("${GFLAGS[@]}" "-G" "Visual Studio 15 2017")
|
||||
fi
|
||||
|
||||
perl --version
|
||||
@@ -21,16 +23,16 @@ cmake --version
|
||||
cmake --help
|
||||
|
||||
# cmake as of 3.13 knows how to involve parallel make (or whatever)
|
||||
cmake --build 2>&1|grep parallel && BFLAGS="$BFLAGS -j 2"
|
||||
cmake --build 2>&1|grep parallel && BFLAGS=("${BFLAGS[@]}" "-j" "2")
|
||||
|
||||
git clone --branch patches-2.1 https://github.com/libevent/libevent.git
|
||||
|
||||
mkdir host-libevent
|
||||
cd host-libevent
|
||||
|
||||
cmake -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_INSTALL_PREFIX:DIR=$PWD/usr ../libevent
|
||||
ls
|
||||
cmake --build . $BFLAGS --target install
|
||||
cmake "${GFLAGS[@]}" -DEVENT__DISABLE_OPENSSL=ON -DCMAKE_INSTALL_PREFIX:DIR=$PWD/usr ../libevent
|
||||
cmake --build . "${BFLAGS[@]}" --target install
|
||||
find usr
|
||||
|
||||
case "$TRAVIS_OS_NAME" in
|
||||
linux) OS_CLASS=Linux;;
|
||||
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
# I (sometimes) inject environment
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "windows" ]
|
||||
then
|
||||
# travis sets these to gcc/g++
|
||||
unset CC
|
||||
unset CXX
|
||||
export TRAVIS_COMPILER=cl
|
||||
|
||||
if [ ! -d "$HOME/tools" ]
|
||||
then
|
||||
echo "Available MSVC versions"
|
||||
find "/c/Program Files (x86)/Microsoft Visual Studio"* -name vcvars*.bat
|
||||
|
||||
# it would be soooo nice if this worked...
|
||||
# but instead "Can't locate ExtUtils/Command.pm ..."
|
||||
#choco install make
|
||||
#choco install strawberryperl
|
||||
#choco list --local-only
|
||||
|
||||
mkdir "$HOME/tools"
|
||||
|
||||
curl -fsS --retry 3 -o "$HOME/tools"/make.zip https://epics.anl.gov/download/tools/make-4.2.1-win64.zip
|
||||
curl -fsS --retry 3 -o "$HOME/tools"/perl.zip http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit.zip
|
||||
(cd "$HOME/tools" && unzip make.zip) >/dev/null
|
||||
(cd "$HOME/tools" && unzip perl.zip) >/dev/null
|
||||
|
||||
cat <<EOF > msboot.bat
|
||||
cd %1
|
||||
call relocation.pl.bat
|
||||
EOF
|
||||
./msboot.bat "$HOME/tools" >/dev/null
|
||||
fi
|
||||
|
||||
export PATH="$HOME/tools:$HOME/tools/perl/site/bin:$HOME/tools/perl/bin:$PATH"
|
||||
|
||||
type make
|
||||
make --version
|
||||
type perl
|
||||
perl --version
|
||||
|
||||
cat <<EOF > msboot.bat
|
||||
echo Before PATH=%PATH%
|
||||
where sh
|
||||
:: pick up choco installs
|
||||
::call RefreshEnv.cmd
|
||||
:: which unfortunately removes /bin
|
||||
::PATH=C:\program files\git\usr\bin;%PATH%
|
||||
|
||||
:: pull in MSVC
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
echo After PATH=%PATH%
|
||||
|
||||
where cl
|
||||
where perl
|
||||
where sh
|
||||
where make
|
||||
|
||||
sh "$@"
|
||||
EOF
|
||||
|
||||
./msboot.bat
|
||||
else
|
||||
sh "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user