1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-01 09:10:37 +00:00

MacOS build

This commit is contained in:
Luke Ceddia 2020-01-06 18:36:05 +11:00
parent 214ad7d089
commit 5200bcb23e
2 changed files with 29 additions and 41 deletions

View file

@ -1,25 +1,38 @@
#!/bin/bash
OS=$1
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
cd internal/c/$1/os/$OS
echo -n "Building $2..."
if [[ $OS == "osx" ]]; then
./setup_build.command
else
./setup_build.sh
fi
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/core" "FreeGLUT"
if [[ $OS == "lnx" ]]; then
com_build "parts/core" "FreeGLUT"
fi
cp -r internal/source/* internal/temp/
cd internal/c
echo -n "Bootstrapping QB64..."
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 [[ $OS == "osx" ]]; then
g++ -w qbx.cpp libqb/os/osx/libqb_setup.o parts/video/font/ttf/os/osx/src.o -framework GLUT -framework OpenGL -framework Cocoa -lcurses -o ../../qb64_bootstrap
else
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
fi
if [ $? -ne 0 ]; then
echo "QB64 bootstrap failed"
exit 1

View file

@ -1,40 +1,15 @@
on:
push:
branches:
- development
- githubactions
jobs:
build:
runs-on: ubuntu-latest
macos-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt update && sudo apt install libglu1-mesa-dev libncurses-dev
- name: Bootstrap compiler
run: .ci/bootstrap.sh
run: .ci/bootstrap.sh osx
- name: Compile
run: .ci/compile.sh
- name: Update source
if: github.event_name == 'push'
run: .ci/update-source.sh
- name: Push to repository
if: github.event_name == 'push'
uses: ad-m/github-push-action@19caa5c351f47734055690f7d01aaaef2f9114d5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: githubactions
- name: Set deployment SSH key
if: github.event_name == 'push'
uses: shimataro/ssh-key-action@v1
with:
private-key: ${{ secrets.SSH_KEY }}
public-key: ${{ secrets.SSH_KEY_PUBLIC }}
known-hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtmlTks7NPQHwvQiW+P2P8voWXfwYD+EuU39ERiaVw5g/lG/6pU1SKdrRBg2AtaPToPgK/nQyaid3sO2aWO00ixiKB3JPJoVp3nRY8YFi/AtVtVot/xh6+39fjP59tMCnMCbXTKjyMWL0kkwzd+OT8wryRZ/EgjK3vk9UGYzxKSr8G/KKV3GBDrJOdpHT2gNUcDFg6HSMvM860ZOF8n6jKRwp7MM0SpptufuQDgj/LhHcqQtFOqkhW9HXNmZR7IPchb5tsUubbPdSLu043B0ir2x5sCkK9V+inZExPg7KwIZ0yRsSv5esgLaBdyf1UToU3LU4ZM1hWjcJsp2fCBRkhw=="
config: |
Host remote-server
HostName qb64.org
User m6rosupy1q2t
- name: Package and deploy
if: github.event_name == 'push'
run: .ci/deploy.sh