Fix assignment check for ibase and obase
[maxima.git] / crosscompile-windows / nightlybuild.sh
blob35c526d9c5d25726eee6b27ba8980dade0b8b9a1
1 #!/bin/bash
3 # Compilation-script for nightly builds.
4 # Should be copied to a private location (~/bin), so that
5 # git changes to that script can be reviewed before.
7 # Expects the Maxima git checkout in ~/maxima-code
9 # Calling from a cronjob does not work (don't know why),
10 # so call it from a screen session (which you can detach)
11 # and do everything in a loop.
14 buildinformation () {
15 echo "Build information"
16 echo "-----------------"
17 echo
18 echo "Operating system: "
19 lsb_release -d
20 echo -n "Maxima GIT Version: "
21 git describe
22 echo -n "Wxmaxima GIT Version: "
23 git -C wxmaxima/wxmaxima-git-prefix/src/wxmaxima-git describe
24 echo -n "Build date and time (UTC): "
25 date --utc
26 echo
27 echo
30 # Should be called as buildprocess win32 or buildprocess win64
31 buildprocess () {
32 rm -rf -- *
33 echo "$1 build log:"
34 if [ "$1" == "win64" ]
35 then
36 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES -DBUILD_64BIT=YES ..
37 else
38 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES ..
40 make
41 make package
42 echo
43 echo
44 buildinformation
45 cp maxima-*-current-*.exe ~
48 # sleep until a given time
49 sleepuntil () {
50 sleep $(( (24*60*60 + $(date -d "$1" +%s) - $(date +%s) ) % (24*60*60) ))
53 # do everything in English:
54 LANG=C
55 export LANG
57 CMAKE=/opt/cmake-3.12.2-Linux-x86_64/bin/cmake
59 test -x $CMAKE || exit
61 cd ~/maxima-code/crosscompile-windows/build || exit
63 while true; do
65 rm -f ~/maxima-*-win32.exe ~/maxima-*-win64.exe ~/buildlog-win32 ~/buildlog-win64
66 git pull
68 buildprocess "win32" 2>&1 | tee ~/buildlog-win32
69 buildprocess "win64" 2>&1 | tee ~/buildlog-win64
71 for i in ~/maxima-*-current-win32.exe ~/maxima-*-current-win64.exe ~/buildlog-win32 ~/buildlog-win64 ; do
72 test -r $i && scp -i ~/.ssh/maximakopierkey $i maxima@ns3.dautermann.at:/var/www/wolfgang.dautermann.at/maxima/nightlybuild/
73 done
74 sleepuntil 23:00
75 done