From 39e267c02923d0f3947607955c59287ba1ba119d Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 19 Aug 2020 14:05:13 +0200 Subject: [PATCH] Create android.yml --- .github/workflows/android.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/android.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 00000000..9ddc1608 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,51 @@ +name: Android + +on: + push: + pull_request: + release: + types: [published] + +jobs: + build: + runs-on: windows-latest + + env: + RELEASE_NAME: raylib-3.1_android + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup Environment + run: | + mkdir build + cd build + mkdir ${{ env.RELEASE_NAME }} + cd ${{ env.RELEASE_NAME }} + mkdir include + mkdir lib + cd ../.. + + # Generating static + shared library for 64bit arquitectures and API version 28 + # ANDROID_ARCH=ARM64/x86_64 + - name: Build Library + run: | + cd src + gcc -v + make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=ARM64 ANDROID_NDK=${ANDROID_HOME}/ndk RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" + make clean + make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=ARM64 ANDROID_NDK=${ANDROID_HOME}/ndk RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B + cd .. + + - name: Generate Artifacts + run: | + cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include + cd build + tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ env.RELEASE_NAME }}.tar.gz + path: ./build/${{ env.RELEASE_NAME }}.tar.gz