job-1-build-windows.sh 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. export PATH=/usr/bin:$PATH
  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 PATH=/c/Builds:c:/msys64/mingw64/bin:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
  36. #export HWLOC=/c/StarPU/hwloc-win32-build-1.11.0
  37. prefix=${PWD}/../../${winball}
  38. rm -rf $prefix
  39. day=$(date +%u)
  40. if test $day -le 5
  41. then
  42. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  43. ../configure --prefix=$prefix --without-hwloc --disable-build-examples --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  44. else
  45. # ../configure --prefix=$prefix --with-hwloc=${HWLOC} --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  46. ../configure --prefix=$prefix --without-hwloc --enable-quick-check --enable-debug --enable-verbose --enable-native-winthreads
  47. fi
  48. make
  49. CHECK=${PWD}/check_$$
  50. touch ${CHECK}
  51. if test "$1" == "-exec"
  52. then
  53. (make -k check || true) > ${CHECK} 2>&1
  54. cat ${CHECK}
  55. make showcheck
  56. fi
  57. fail=$(grep FAIL ${CHECK} | grep -v XFAIL || true)
  58. if test -z "$fail"
  59. then
  60. make install
  61. cd ../../
  62. cp /c/MinGW/bin/pthread*dll ${winball}/bin
  63. cp /c/MinGW/bin/libgcc*dll ${winball}/bin
  64. # cp ${HWLOC}/bin/*dll ${winball}/bin
  65. zip -r ${winball}.zip ${winball}
  66. rm -rf starpu_install
  67. mv ${winball} starpu_install
  68. fi
  69. PATH=$oldPATH
  70. echo $fail
  71. exit $(grep FAIL ${CHECK} | grep -v XFAIL | wc -l)