job-1-build-windows.sh 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2013-2021 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. touch --date="last hour" $(find $basename)
  28. version=$(echo $basename | cut -d- -f2)
  29. winball=starpu-win32-build-${version}
  30. export STARPU_HOME=$PWD
  31. rm -rf ${basename}/build
  32. mkdir ${basename}/build
  33. cd ${basename}/build
  34. 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
  35. #export HWLOC=/c/StarPU/hwloc-win32-build-1.11.0
  36. prefix=${PWD}/../../${winball}
  37. rm -rf $prefix
  38. day=$(date +%u)
  39. if test $day -le 5
  40. then
  41. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  42. ../configure --prefix=$prefix --without-hwloc --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  43. else
  44. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  45. ../configure --prefix=$prefix --without-hwloc --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  46. fi
  47. make
  48. CHECK=${PWD}/check_$$
  49. touch ${CHECK}
  50. if test "$1" == "-exec"
  51. then
  52. (make -k check || true) > ${CHECK} 2>&1
  53. cat ${CHECK}
  54. make showcheck
  55. fi
  56. fail=$(grep FAIL ${CHECK} | grep -v XFAIL || true)
  57. if test -z "$fail"
  58. then
  59. make install
  60. cd ../../
  61. cp /c/MinGW/bin/pthread*dll ${winball}/bin
  62. cp /c/MinGW/bin/libgcc*dll ${winball}/bin
  63. # cp ${HWLOC}/bin/*dll ${winball}/bin
  64. zip -r ${winball}.zip ${winball}
  65. rm -rf starpu_install
  66. mv ${winball} starpu_install
  67. fi
  68. PATH=$oldPATH
  69. echo $fail
  70. exit $(grep FAIL ${CHECK} | grep -v XFAIL | wc -l)