job-1-build-windows.sh 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2013-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. #
  17. set -e
  18. oldPATH=$PATH
  19. tarball=$(ls -tr starpu*.tar.gz | tail -1)
  20. if test -z "$tarball" ; then
  21. echo Tarball not available
  22. exit 2
  23. fi
  24. basename=$(basename $tarball .tar.gz)
  25. test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
  26. tar xfz $tarball
  27. version=$(echo $basename | cut -d- -f2)
  28. winball=starpu-win32-build-${version}
  29. export STARPU_HOME=$PWD
  30. rm -rf ${basename}/build
  31. mkdir ${basename}/build
  32. cd ${basename}/build
  33. export PATH=/c/Builds:/c/MinGW/bin/:/c/MinGW/mingw32/bin/:/c/MinGW/msys/1.0/bin:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
  34. #export HWLOC=/c/StarPU/hwloc-win32-build-1.11.0
  35. prefix=${PWD}/../../${winball}
  36. rm -rf $prefix
  37. day=$(date +%u)
  38. if test $day -le 5
  39. then
  40. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  41. ../configure --prefix=$prefix --without-hwloc --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  42. else
  43. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  44. ../configure --prefix=$prefix --without-hwloc --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  45. fi
  46. make
  47. CHECK=${PWD}/check_$$
  48. touch ${CHECK}
  49. if test "$1" == "-exec"
  50. then
  51. (make -k check || true) > ${CHECK} 2>&1
  52. cat ${CHECK}
  53. make showcheck
  54. fi
  55. fail=$(grep FAIL ${CHECK} | grep -v XFAIL || true)
  56. if test -z "$fail"
  57. then
  58. make install
  59. cd ../../
  60. cp /c/MinGW/bin/pthread*dll ${winball}/bin
  61. cp /c/MinGW/bin/libgcc*dll ${winball}/bin
  62. # cp ${HWLOC}/bin/*dll ${winball}/bin
  63. zip -r ${winball}.zip ${winball}
  64. rm -rf starpu_install
  65. mv ${winball} starpu_install
  66. fi
  67. PATH=$oldPATH
  68. echo $fail
  69. exit $(grep FAIL ${CHECK} | grep -v XFAIL | wc -l)