diff --git a/.ci/bootstrap.sh b/.ci/bootstrap.sh index 4b0188904..27a876abd 100755 --- a/.ci/bootstrap.sh +++ b/.ci/bootstrap.sh @@ -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 diff --git a/.ci/compile.sh b/.ci/compile.sh new file mode 100755 index 000000000..9687f7a9a --- /dev/null +++ b/.ci/compile.sh @@ -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 diff --git a/.ci/update-source.sh b/.ci/update-source.sh new file mode 100755 index 000000000..5b2a64aa7 --- /dev/null +++ b/.ci/update-source.sh @@ -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_* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb80ca1ac..051a48428 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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