Rename *ll* and *ul* to ll and ul in method-radical-poly
[maxima.git] / crosscompile-windows / nightlybuild.sh
blobbc2890e8a0d657a4aa8f41d1298656b098d1a47c
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.
14 # do everything in English:
15 LANG=C.UTF-8
16 export LANG
17 # Use a recent CMake - installlers build with older versions
18 # seem to have problems when uninstalling the old version.
19 CMAKE=/opt/cmake-3.28.1-linux-x86_64/bin/cmake
20 test -x $CMAKE || exit 1
22 buildinformation () {
23 echo "Build information"
24 echo "-----------------"
25 echo
26 echo "Operating system: "
27 lsb_release -d
28 echo -n "Maxima GIT Version: "
29 git describe
30 echo -n "Wxmaxima GIT Version: "
31 git -C wxmaxima/wxmaxima-git-prefix/src/wxmaxima-git describe
32 echo -n "Build date and time (UTC): "
33 date --utc
34 echo
35 echo
38 # Should be called as buildprocess win32 or buildprocess win64
39 buildprocess () {
40 rm -rf -- *
41 echo "$1 build log:"
42 if [ "$1" == "win64" ]
43 then
44 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES -DBUILD_64BIT=YES ..
45 else
46 $CMAKE -DBUILD_CURRENT=YES -DWITH_ABCL=YES -DBUILD_64BIT=NO ..
48 make
49 make package
50 echo
51 echo
52 buildinformation
53 cp maxima-current-*.exe maxima-current-*.zip ~
56 # sleep until a given time
57 sleepuntil () {
58 sleep $(( (24*60*60 + $(date -d "$1" +%s) - $(date +%s) ) % (24*60*60) ))
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 ~/maxima-current-win32.zip ~/maxima-current-win64.zip ~/buildlog-win32 ~/buildlog-win64 ; do
73 test -r $i && scp -i ~/.ssh/maximakopierkey $i maxima@ns1.dautermann.at:/var/www/wolfgang.dautermann.at/maxima/nightlybuild/
74 done
75 sleepuntil 23:00
76 done