From 99e6aee472cd333208a24c64fe4fee13d8821452 Mon Sep 17 00:00:00 2001 From: nillerusr <42746659+nillerusr@users.noreply.github.com> Date: Tue, 26 Jul 2022 00:15:02 +0300 Subject: [PATCH] add github workflow (#78) --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++ scripts/build-android-armv7a.sh | 9 ++++++++ scripts/build-ubuntu-amd64.sh | 8 +++++++ scripts/build-ubuntu-i386.sh | 9 ++++++++ scripts/deploy.sh | 9 ++++++++ 5 files changed, 72 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100755 scripts/build-android-armv7a.sh create mode 100755 scripts/build-ubuntu-amd64.sh create mode 100755 scripts/build-ubuntu-i386.sh create mode 100755 scripts/deploy.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..fbfa0202 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build tests + +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" + +jobs: + build-linux-32: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Build linux-i386 + run: | + scripts/build-ubuntu-i386.sh + + build-linux-64: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Build linux-amd64 + run: | + scripts/build-ubuntu-amd64.sh + + build-android-armv7a: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Build android-armv7a + run: | + scripts/build-android-armv7a.sh diff --git a/scripts/build-android-armv7a.sh b/scripts/build-android-armv7a.sh new file mode 100755 index 00000000..4c7201ff --- /dev/null +++ b/scripts/build-android-armv7a.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git submodule init && git submodule update +wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -o /dev/null +unzip android-ndk-r10e-linux-x86_64.zip +export ANDROID_NDK_HOME=$PWD/android-ndk-r10e/ +export NDK_HOME=$PWD/android-ndk-r10e/ +./waf configure -T debug --android=armeabi-v7a-hard,4.9,21 --togles --disable-warns && +./waf build diff --git a/scripts/build-ubuntu-amd64.sh b/scripts/build-ubuntu-amd64.sh new file mode 100755 index 00000000..0d4bfa22 --- /dev/null +++ b/scripts/build-ubuntu-amd64.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +git submodule init && git submodule update +sudo apt-get update +sudo apt-get install -f -y libopenal-dev g++-multilib gcc-multilib libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev + +./waf configure -T debug --64bits --disable-warns && +./waf build diff --git a/scripts/build-ubuntu-i386.sh b/scripts/build-ubuntu-i386.sh new file mode 100755 index 00000000..68a1740d --- /dev/null +++ b/scripts/build-ubuntu-i386.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git submodule init && git submodule update +sudo dpkg --add-architecture i386 +sudo apt-get update +sudo apt-get install -f -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386 + +PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns && +./waf build diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 00000000..3c3e2f1b --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git submodule init && git submodule update +sudo dpkg --add-architecture i386 +sudo apt-get update +sudo apt-get install -f -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386 + +PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug +./waf build --target=engine