1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Add compile step

This commit is contained in:
Luke Ceddia 2020-01-03 23:29:13 +11:00
parent ea407b52c1
commit 393225a1cf
4 changed files with 21 additions and 2 deletions

View file

@ -1,6 +1,5 @@
#!/bin/bash
###### Part 1: Build old QB64 ######
com_build() {
cd internal/c/$1/os/lnx
echo -n "Building $2..."
@ -20,7 +19,7 @@ com_build "parts/core" "FreeGLUT"
cp -r internal/source/* internal/temp/
cd internal/c
echo -n "Bootstrapping QB64..."
g++ $NOPIE -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lcurses -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lcurses -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
if [ $? -ne 0 ]; then
echo "QB64 bootstrap failed"
exit 1

10
.ci/compile.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
echo From git `echo $GITHUB_SHA | sed 's/\(.......\).*$/\1/'` > internal/version.txt
./qb64_bootstrap -x source/qb64.bas > /tmp/qb64-output
rm qb64_bootstrap
if [ `grep -v '^WARNING' /tmp/qb64-output | wc -l` -gt 2 ]; then
cat /tmp/qb64-output
rm /tmp/qb64-output
exit 1
fi

8
.ci/update-source.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
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_*

View file

@ -13,3 +13,5 @@ jobs:
run: sudo apt update && sudo apt install libglu1-mesa-dev libncurses-dev
- name: Bootstrap compiler
run: .ci/bootstrap.sh
- name: Compile
run: .ci/compile.sh