raylib/.github/workflows/android.yml

62 lines
1.7 KiB
YAML
Raw Normal View History

2020-08-19 15:05:13 +03:00
name: Android
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
2020-08-19 17:43:12 +03:00
strategy:
fail-fast: false
max-parallel: 1
matrix:
bits: [32, 64]
include:
- bits: 32
ARCH: "x86_64"
ARCH_NAME: "x86_64"
- bits: 64
ARCH: "ARM64"
ARCH_NAME: "arm64"
2020-08-19 15:05:13 +03:00
env:
2020-08-19 17:43:12 +03:00
RELEASE_NAME: raylib-3.1_android_${{ matrix.ARCH_NAME }}
2020-08-19 15:05:13 +03:00
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
- name: Build Library
run: |
cd src
2020-08-19 17:43:12 +03:00
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ env.ARCH }} ANDROID_NDK="C:\PROGRA~2\Android\android-sdk\ndk-bundle" RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ env.ARCH }} ANDROID_NDK="C:\PROGRA~2\Android\android-sdk\ndk-bundle" RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
2020-08-19 15:05:13 +03:00
cd ..
2020-08-19 16:47:54 +03:00
shell: cmd
2020-08-19 15:05:13 +03:00
- 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