job-1-build-windows.sh 2.2 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. export PATH=/c/Builds:/usr/bin:/bin:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
  20. tarball=$(ls -tr starpu*.tar.gz | tail -1)
  21. if test -z "$tarball" ; then
  22. echo Tarball not available
  23. exit 2
  24. fi
  25. basename=$(basename $tarball .tar.gz)
  26. test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
  27. tar xfz $tarball
  28. touch --date="last hour" $(find $basename)
  29. version=$(echo $basename | cut -d- -f2)
  30. winball=starpu-win32-build-${version}
  31. export STARPU_HOME=$PWD
  32. rm -rf ${basename}/build
  33. mkdir ${basename}/build
  34. cd ${basename}/build
  35. #export HWLOC=/c/StarPU/hwloc-win32-build-1.11.0
  36. prefix=${PWD}/../../${winball}
  37. rm -rf $prefix
  38. #--with-hwloc=${HWLOC}
  39. options="--without-hwloc --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads"
  40. day=$(date +%u)
  41. if test $day -le 5
  42. then
  43. ../configure --prefix=$prefix $options --disable-build-examples
  44. else
  45. ../configure --prefix=$prefix $options
  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)