Setting GCL as the default LISP for RPMs
[maxima.git] / crosscompile-windows / nightlybuild.sh
blobe922d8d0846029b8b7187b460124d3ed0ca450b0
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Compilation-script for nightly builds.
5 # Should be copied to a private location (~/bin), so that
6 # git changes to that script can be reviewed before.
8 # Expects the Maxima git checkout in ~/maxima-code
10 # Calling from a cronjob does not work (don't know why),
11 # so call it from a screen session (which you can detach)
12 # and do everything in a loop.
15 buildinformation () {
16 echo "Build information"
17 echo "-----------------"
18 echo
19 echo "Operating system: "
20 lsb_release -d
21 echo -n "Maxima GIT Version: "
22 git describe
23 echo -n "Wxmaxima GIT Version: "
24 git -C wxmaxima/wxmaxima-git-prefix/src/wxmaxima-git describe
25 echo -n "Build date and time (UTC): "
26 date --utc
27 echo
28 echo
31 # Should be called as buildprocess win32 or buildprocess win64
32 buildprocess () {
33 rm -rf -- *
34 echo "$1 build log:"
35 if [ "$1" == "win64" ]
36 then
37 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES -DBUILD_64BIT=YES ..
38 else
39 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES -DBUILD_64BIT=NO ..
41 make
42 make package
43 echo
44 echo
45 buildinformation
46 cp maxima-current-*.exe ~
49 # sleep until a given time
50 sleepuntil () {
51 sleep $(( (24*60*60 + $(date -d "$1" +%s) - $(date +%s) ) % (24*60*60) ))
54 # do everything in English:
55 LANG=C
56 export LANG
58 CMAKE=/usr/bin/cmake
60 test -x $CMAKE || exit
62 cd ~/maxima-code/crosscompile-windows/build || exit
64 while true; do
66 rm -f ~/maxima-*-win32.exe ~/maxima-*-win64.exe ~/buildlog-win32 ~/buildlog-win64
67 git pull
69 buildprocess "win32" 2>&1 | tee ~/buildlog-win32
70 buildprocess "win64" 2>&1 | tee ~/buildlog-win64
72 for i in ~/maxima-current-win32.exe ~/maxima-current-win64.exe ~/buildlog-win32 ~/buildlog-win64 ; do
73 test -r $i && scp -i ~/.ssh/maximakopierkey $i maxima@ns3.dautermann.at:/var/www/wolfgang.dautermann.at/maxima/nightlybuild/
74 done
75 sleepuntil 23:00
76 done