Skip to content

Android CMake - Cross compiling Linux #870

Android CMake - Cross compiling Linux

Android CMake - Cross compiling Linux #870

Workflow file for this run

name: build-android
on:
push:
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'
env:
TARGET: "android"
NO_FORCE: 1
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
USE_ARTIFACT: true
DISABLE_WORKFLOW: "false"
jobs:
pre-check:
runs-on: ubuntu-latest
outputs:
workflow_disabled: ${{ steps.check-disabled.outputs.disabled }}
steps:
- name: Check if Workflow is disabled
id: check-disabled
shell: bash
run: |
if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then
echo "disabled=true" >> $GITHUB_ENV
echo "::set-output name=disabled::true"
else
echo "::set-output name=disabled::false"
fi
build-android-platforms:
if: needs.pre-check.outputs.workflow_disabled != 'true'
needs: pre-check
runs-on: ubuntu-latest
strategy:
matrix:
ARCH: [armv7, arm64, x86_64]
SDK: ["35.0.0"]
NDK: ["27.2.12479018"] #"26.3.11579264",
env:
ARCH: ${{ matrix.ARCH }}
SDK: ${{ matrix.SDK }}
NDK: ${{ matrix.NDK }}
NDK_ROOT: ${{ matrix.NDK }}
steps:
- uses: actions/[email protected]
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RELEASE=nightly" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "RELEASE=latest" >> $GITHUB_ENV
else
echo "RELEASE=latest" >> $GITHUB_ENV
fi
- name: Scripts Setup
run: ./scripts/$TARGET/setup.sh
- name: Scripts Calc Formula Android - ${{ matrix.ARCH }}
run: ./scripts/calculate_formulas.sh
- name: Scripts Install
run: ./scripts/$TARGET/install.sh
- name: build
run: ./scripts/build.sh
env:
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
ARCH: ${{ matrix.ARCH }}
NDK: ${{ matrix.NDK }}
- name: List output directory
run: ls -lah out/
- name: Generate Summary
run: |
chmod +x ./scripts/summary.sh
./scripts/summary.sh
- name: Package
if: (github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding'))
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/package.sh
env:
BUNDLE: ${{ matrix.bundle }}
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
- name: Update Release emscripten
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: softprops/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: out/openFrameworksLibs_${{ env.release }}_android_${{ matrix.cfg.arch }}.zip