Skip to content

Commit 7c818ae

Browse files
committed
travis: fix build on windows
1 parent c186c95 commit 7c818ae

2 files changed

Lines changed: 51 additions & 19 deletions

File tree

.travis.yml

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: node_js
22
node_js:
33
- "node"
44
- "14"
5-
- "13"
65
- "12"
76

87
env:
@@ -30,6 +29,35 @@ addons:
3029

3130
osx_image: xcode8
3231

32+
# before_install:
33+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
34+
# wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.gz -O /tmp/hdf5-1.10.5.tar.gz;
35+
# tar -zxvf /tmp/hdf5-1.10.5.tar.gz;
36+
# cd `pwd`/hdf5-1.10.5;
37+
# ./configure --prefix=`pwd`/dist --enable-shared=yes --enable-static=no --enable-parallel=no --enable-hl --enable-build-mode=production --without-szlib;
38+
# make -j2 2>&1 &> hdf5_screen.txt;
39+
# make install;
40+
# cd ..;
41+
# export HDF5_HOME_MAC=`pwd`/hdf5-1.10.5/dist;
42+
# elif [[ "$TRAVIS_OS_NAME" == "windows" ]] ; then
43+
# /c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/Common7/Tools/VsDevCmd.bat;
44+
# which cmake;
45+
# cmake --version;
46+
# wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/bin/hdf5-1.12.0-Std-win10_64-vs15.zip -O /tmp/hdf5-1.12.0-Std-win10_64-vs15.zip;
47+
# unzip -q /tmp/hdf5-1.12.0-Std-win10_64-vs15.zip;
48+
# ls ./hdf;
49+
# mkdir -p `pwd`/hdf5-1.12.0/dist;
50+
# cd hdf;
51+
# echo `pwd`;
52+
# readlink -f HDF5-1.12.0-win64.msi;
53+
# ls -lastr `pwd`/HDF5-1.12.0-win64.msi;
54+
# msiexec //i `pwd`/HDF5-1.12.0-win64.msi //quiet TARGETDIR=`pwd`/../hdf5-1.12.0/dist //qb;
55+
# cd ..;
56+
# which h5dump;
57+
# ls `pwd`/hdf5-1.12.0/dist;
58+
# export HDF5_HOME_WIN=`pwd`/hdf5-1.12.0/dist;
59+
# fi
60+
3361
before_install:
3462
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
3563
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.gz -O /tmp/hdf5-1.10.5.tar.gz;
@@ -41,37 +69,38 @@ before_install:
4169
cd ..;
4270
export HDF5_HOME_MAC=`pwd`/hdf5-1.10.5/dist;
4371
elif [[ "$TRAVIS_OS_NAME" == "windows" ]] ; then
44-
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/Common7/Tools/VsDevCmd.bat;
45-
which cmake;
46-
cmake --version;
47-
wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/bin/hdf5-1.12.0-Std-win10_64-vs15.zip -O /tmp/hdf5-1.12.0-Std-win10_64-vs15.zip;
48-
unzip -q /tmp/hdf5-1.12.0-Std-win10_64-vs15.zip;
49-
ls ./hdf;
50-
mkdir -p `pwd`/hdf5-1.12.0/dist;
51-
cd hdf;
52-
echo `pwd`;
53-
readlink -f HDF5-1.12.0-win64.msi;
54-
ls -lastr `pwd`/HDF5-1.12.0-win64.msi;
55-
msiexec //i `pwd`/HDF5-1.12.0-win64.msi //quiet TARGETDIR=`pwd`/../hdf5-1.12.0/dist //qb;
56-
cd ..;
57-
which h5dump;
58-
ls `pwd`/hdf5-1.12.0/dist;
59-
export HDF5_HOME_WIN=`pwd`/hdf5-1.12.0/dist;
72+
wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/bin/hdf5-1.10.5-Std-win10_64-vs15.zip -O hdf5-1.10.5-Std-win10_64-vs15.zip ;
73+
unzip -q hdf5-1.10.5-Std-win10_64-vs15.zip ;
74+
powershell "Start-Process msiexec.exe -Wait -ArgumentList '/I C:\\Users\\travis\\build\\HDF-NI\\hdf5.node\\hdf\\HDF5-1.10.5-win64.msi /quiet'" ;
6075
fi
6176

77+
# install:
78+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
79+
# echo ${HDF5_HOME};
80+
# npm install --longlong_type=LONGLONG53BITS --hdf5_home_mac=${HDF5_HOME_MAC};
81+
# elif [[ "$TRAVIS_OS_NAME" == "windows" ]] ; then
82+
# echo "Windoes compiler?";
83+
# npm install --longlong_type=LONGLONG53BITS --hdf5_home_win=${HDF5_HOME_WIN};
84+
# else
85+
# export HDF5_HOME_LINUX=/usr/lib/x86_64-linux-gnu/hdf5/serial;
86+
# eval "${GCC_VERSION}" ;
87+
# npm install --longlong_type=LONGLONG53BITS --hdf5_home_linux=${HDF5_HOME_LINUX};
88+
# fi
89+
6290
install:
6391
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
6492
echo ${HDF5_HOME};
6593
npm install --longlong_type=LONGLONG53BITS --hdf5_home_mac=${HDF5_HOME_MAC};
6694
elif [[ "$TRAVIS_OS_NAME" == "windows" ]] ; then
6795
echo "Windoes compiler?";
68-
npm install --longlong_type=LONGLONG53BITS --hdf5_home_win=${HDF5_HOME_WIN};
96+
npm install --longlong_type=LONGLONG53BITS;
6997
else
7098
export HDF5_HOME_LINUX=/usr/lib/x86_64-linux-gnu/hdf5/serial;
7199
eval "${GCC_VERSION}" ;
72100
npm install --longlong_type=LONGLONG53BITS --hdf5_home_linux=${HDF5_HOME_LINUX};
73101
fi
74102

103+
75104
before-scripte:
76105
- export PATH=`pwd`/node_modules/.bin:${PATH}
77106
- export LD_LIBRARY_PATH=`pwd`/hdf5-1.10.2/dist/lib:${LD_LIBRARY_PATH}
@@ -83,4 +112,7 @@ script:
83112
- export DYLD_LIBRARY_PATH=`pwd`/hdf5-1.10.2/dist/lib:${DYLD_LIBRARY_PATH}
84113
- echo ${PATH}
85114
- ls `pwd`/node_modules/.bin
115+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]] ; then
116+
eval $(powershell -NonInteractive -Command 'write("export PATH=`"" + ([Environment]::GetEnvironmentVariable("PATH","Machine") + ";" + [Environment]::GetEnvironmentVariable("PATH","User")).replace("\","/").replace("C:","/c").replace(";",":") + ":`$PATH`"")');
117+
fi
86118
- mocha --harmony --require should

binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"variables": {
33
"hdf5_home_linux%": "/usr/local",
4-
"hdf5_home_win%": "C:/Software/hdf5",
4+
"hdf5_home_win%": "C:/Program Files/HDF_Group/HDF5/1.10.5",
55
"hdf5_home_mac%": "/usr/local",
66
"link_type%": "shared",
77
"debug_mode%": "",

0 commit comments

Comments
 (0)