mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 12:40:36 +00:00
Add files for building via Travis
This commit is contained in:
parent
e9447a1049
commit
2d065c3681
31
.travis.yml
Normal file
31
.travis.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
language: cpp
|
||||||
|
install: true
|
||||||
|
script: ".travis/build.sh"
|
||||||
|
after_success: ".travis/push.sh"
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
secure: rKip7kNIauH6epfanefLLqsiOKNScBf3U8uCnyMCg2SNjMxdxwrL2CPBjZeD2JKWc9DgLZ8H8hlX4wcx+P0741myfOvn0pvtHH8pmt8e6lLvNJn6okJxYXmgmu+M7/jjQkzjVYFy0i779LL/+VKItnRpJ1vcpBOA+zgreaR0o2nBL6kBWW+9jPypcfatSqY+Oxur1C6m27rRYw1PJAA4oiVim50uzhm5AGJdOL6Xw1rrJjNe5OLdQOdU0JKVI8mkZi3XTuz8t7CViKsjfimZ59Rre6qF3vTp1x8g2cm11Ki2RJlfxBK/vicCRtHVsD33r5wtmBW8YyZvVBM0sF+lYCOUn28qCCZNtPJ8kvMMEqLxLV6nbF660k9Y6i4tVKtuhJAGrFSkcfdslp0egT09DeJyO+ZdDkad7gGsMdoRhjWHkznJ+HF1IOopy8kUp7NfmmX6wKJN79GuZ+ZI0CqSObRSCOZtGa6qggHDhYvz8MOVAhyt1OQ6kqXPilKfysV6aK4eVYw2QGCkFfnCJYq6AZBqfFDyj/+M1SfG+RnHEvfX/BZMvzRDzVR8m0S7oc9M5yIh/nTSSzdRNQq+d7Mu8vNTW+Fari2ojpe6M9roIWTIaneu5goBOM6n0TaZA8OIsZS/iRYXZ6gsocgIeKyXSLadlUOLe4bwu5jR7sB1r58=
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
irc:
|
||||||
|
channels: chat.freenode.net#qb64
|
||||||
|
skip_join: true
|
||||||
|
|
||||||
|
addons:
|
||||||
|
ssh_known_hosts: qb64.org
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- p7zip-full
|
||||||
|
|
||||||
|
before_deploy:
|
||||||
|
- openssl aes-256-cbc -K $encrypted_089141d01927_key -iv $encrypted_089141d01927_iv -in .travis/deploy_rsa.enc -out /tmp/deploy_rsa -d
|
||||||
|
- eval "$(ssh-agent -s)"
|
||||||
|
- chmod 600 /tmp/deploy_rsa
|
||||||
|
- ssh-add /tmp/deploy_rsa
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: script
|
||||||
|
skip_cleanup: true
|
||||||
|
script: .travis/deploy.sh
|
||||||
|
|
75
.travis/build.sh
Executable file
75
.travis/build.sh
Executable file
|
@ -0,0 +1,75 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
###### Part 1: Build old QB64 ######
|
||||||
|
echo "Preparing bootstrap:"
|
||||||
|
find . -type f -iname "*.sh" -exec chmod +x {} \;
|
||||||
|
find . -type f -iname "*.a" -exec rm {} \;
|
||||||
|
find . -type f -iname "*.o" -exec rm {} \;
|
||||||
|
|
||||||
|
rm internal/temp/* 2> /dev/null
|
||||||
|
|
||||||
|
com_build() {
|
||||||
|
cd internal/c/$1/os/lnx
|
||||||
|
echo -n "Building $2..."
|
||||||
|
./setup_build.sh
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "$2 build failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Done"
|
||||||
|
cd - > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
com_build "libqb" "libQB"
|
||||||
|
com_build "parts/video/font/ttf" "FreeType"
|
||||||
|
com_build "parts/user_mods" "User Additions"
|
||||||
|
com_build "parts/core" "FreeGLUT"
|
||||||
|
|
||||||
|
cp -r internal/source/* internal/temp/
|
||||||
|
cd internal/c
|
||||||
|
echo -n "Bootstrapping QB64..."
|
||||||
|
g++ -w qbx.cpp parts/user_mods/os/lnx/src.a libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "QB64 bootstrap failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Done"
|
||||||
|
cd - > /dev/null
|
||||||
|
|
||||||
|
###### Part 2: Build new QB64 from .bas sources ######
|
||||||
|
echo -n "Translating .bas source..."
|
||||||
|
echo AutoBuildMsg\$ = CHR\$\(10\) + \"From git `echo $TRAVIS_COMMIT | sed 's/\(.......\).*$/\1/'`\" >> source/global/version.bas
|
||||||
|
./qb64_bootstrap -x -z source/qb64.bas > /tmp/qb64-output
|
||||||
|
rm qb64_bootstrap
|
||||||
|
if [ `wc -l /tmp/qb64-output |awk '{print $1}'` -gt 2 ]; then
|
||||||
|
cat /tmp/qb64-output
|
||||||
|
rm /tmp/qb64-output
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
|
echo -n "Testing compile/link..."
|
||||||
|
# extract g++ line
|
||||||
|
cd internal/temp/
|
||||||
|
cpp_call=`awk '$1=="g++" {print $0}' < recompile_lnx.sh`
|
||||||
|
|
||||||
|
# run g++
|
||||||
|
cd ../c/
|
||||||
|
$cpp_call -o ../../qb64_testrun
|
||||||
|
if [ $? -ne 0 -o ! -f ../../qb64_testrun ]; then
|
||||||
|
echo "Compile/link test failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd ../../
|
||||||
|
rm qb64_testrun
|
||||||
|
echo "Done"
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then exit; fi
|
||||||
|
|
||||||
|
###### Part 3: Establish new bootstrapee ######
|
||||||
|
rm internal/source/*
|
||||||
|
mv internal/temp/* internal/source/
|
||||||
|
find . -type f -iname "*.a" -exec rm {} \;
|
||||||
|
find . -type f -iname "*.o" -exec rm {} \;
|
||||||
|
cd internal/source
|
||||||
|
rm debug_* recompile_*
|
||||||
|
|
5
.travis/common-exclusion.list
Normal file
5
.travis/common-exclusion.list
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.travis
|
||||||
|
.travis.yml
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
|
17
.travis/deploy.sh
Executable file
17
.travis/deploy.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Prepare archives
|
||||||
|
# mainversion=`awk '$1=="Version$" {split($3, A, /\"/);print A[2];}' < source/global/version.bas`
|
||||||
|
# buildnum=`awk '$1=="BuildNum$" {split($3,A, /[\"\/]/); print A[3];}' < source/global/version.bas`
|
||||||
|
TZ=UTC now=`date +"%F-%H-%M-%S"`
|
||||||
|
filebase="/tmp/qb64_${now}_`echo ${TRAVIS_COMMIT} | sed 's/\(.......\).*$/\1/'`"
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
tar --create --auto-compress --file ${filebase}_osx.tar.gz --exclude-from=qb64/.travis/common-exclusion.list --exclude-from=qb64/.travis/osx-exclusion.list qb64
|
||||||
|
tar --create --auto-compress --file ${filebase}_lnx.tar.gz --exclude-from=qb64/.travis/common-exclusion.list --exclude-from=qb64/.travis/lnx-exclusion.list qb64
|
||||||
|
7z a -xr@qb64/.travis/common-exclusion.list -xr@qb64/.travis/win-exclusion.list ${filebase}_win.7z qb64/ > /dev/null
|
||||||
|
|
||||||
|
# Send to server
|
||||||
|
scp ${filebase}_* stxaxtic@qb64.org:autobuilds/
|
||||||
|
|
||||||
|
|
BIN
.travis/deploy_rsa.enc
Normal file
BIN
.travis/deploy_rsa.enc
Normal file
Binary file not shown.
4
.travis/lnx-exclusion.list
Normal file
4
.travis/lnx-exclusion.list
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
setup_win.bat
|
||||||
|
setup_osx.command
|
||||||
|
internal/c/c_compiler
|
||||||
|
qb64_start_osx.command
|
3
.travis/osx-exclusion.list
Normal file
3
.travis/osx-exclusion.list
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
setup_win.bat
|
||||||
|
setup_lnx.sh
|
||||||
|
internal/c/c_compiler
|
12
.travis/push.sh
Executable file
12
.travis/push.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
if [ "${UPDATE_REPO}" != "yes" ]; then exit; fi
|
||||||
|
git config --global user.email "flukiluke@gmail.com"
|
||||||
|
git config --global user.name "Autobuild process"
|
||||||
|
git add --all internal/source/
|
||||||
|
git commit --message "Autobuild update [ci skip]"
|
||||||
|
git remote rm origin
|
||||||
|
git remote add origin https://${GH_TOKEN}@github.com/flukiluke/qb64.git > /dev/null 2>&1
|
||||||
|
git push origin HEAD:master > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
|
3
.travis/win-exclusion.list
Normal file
3
.travis/win-exclusion.list
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
setup_lnx.sh
|
||||||
|
setup_osx.command
|
||||||
|
qb64_start_osx.command
|
|
@ -1,7 +1,7 @@
|
||||||
DIM SHARED Version AS STRING
|
DIM SHARED Version AS STRING
|
||||||
DIM SHARED BuildNum AS STRING
|
DIM SHARED BuildNum AS STRING
|
||||||
|
DIM SHARED AutoBuildMsg AS STRING
|
||||||
Version$ = "1.1"
|
Version$ = "1.1"
|
||||||
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
||||||
'integer. If you make a change, update the date and increase the id!
|
'integer. If you make a change, update the date and increase the id!
|
||||||
BuildNum$ = "20161010/49"
|
BuildNum$ = "20161109/50"
|
||||||
|
|
||||||
|
|
|
@ -4230,7 +4230,7 @@ FUNCTION ide2 (ignore)
|
||||||
|
|
||||||
IF menu$(m, s) = "#About..." THEN
|
IF menu$(m, s) = "#About..." THEN
|
||||||
PCOPY 2, 0
|
PCOPY 2, 0
|
||||||
idemessagebox "About", "QB64 Version " + Version$ + " (" + BuildNum$ + ")"
|
idemessagebox "About", "QB64 Version " + Version$ + CHR$(10) + "Revision " + BuildNum$ + AutoBuildMsg$
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0: idewait4mous: idewait4alt
|
PCOPY 3, 0: SCREEN , , 3, 0: idewait4mous: idewait4alt
|
||||||
GOTO ideloop
|
GOTO ideloop
|
||||||
END IF
|
END IF
|
||||||
|
|
Loading…
Reference in a new issue