Android CI based on GitHub Image (#712)

This commit is contained in:
Bart Louwers
2023-01-26 19:40:49 +01:00
committed by GitHub
parent f7fa009f08
commit 85e33f88b1
22 changed files with 27 additions and 200 deletions

View File

@@ -28,14 +28,11 @@ concurrency:
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
working-directory: platform/android
container:
image: ghcr.io/maplibre/android-ndk-r21b
env:
LIBSYSCONFCPUS: 8
JOBS: 8
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
@@ -47,14 +44,6 @@ jobs:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Android SDK for accepting tool licenses
uses: android-actions/setup-android@v2
- name: Cache node modules
uses: actions/cache@v3
env:
@@ -71,6 +60,9 @@ jobs:
run: npm install --ignore-scripts
working-directory: platform/android
- name: Install ccache
run: sudo apt-get install -y ccache
- name: Prepare ccache
run: ccache --clear

View File

@@ -25,17 +25,11 @@ on:
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
working-directory: platform/android
container:
image: ghcr.io/maplibre/android-ndk-r21b
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
env:
LIBSYSCONFCPUS: 8
JOBS: 8
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
@@ -47,14 +41,6 @@ jobs:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Android SDK for accepting tool licenses
uses: android-actions/setup-android@v2
- name: Cache node modules
uses: actions/cache@v3
env:
@@ -70,6 +56,9 @@ jobs:
- name: npm install
run: npm install --ignore-scripts
- name: Install ccache
run: sudo apt-get install -y ccache
- name: Prepare ccache
run: ccache --clear

View File

@@ -1,29 +0,0 @@
name: android-base-docker-image
on:
workflow_dispatch
jobs:
push_to_registry:
name: Docker image android-base
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push android-base image
uses: docker/build-push-action@v3
with:
file: ./platform/android/docker/android-base
context: ./platform/android/docker
tags: ghcr.io/maplibre/android-base:latest
push: true

View File

@@ -1,29 +0,0 @@
name: android-ndk-r21b-docker-image
on:
workflow_dispatch
jobs:
push_to_registry:
name: Docker image android-ndk-r21b
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push android-ndk-r21b image
uses: docker/build-push-action@v3
with:
file: ./platform/android/docker/android-ndk-r21b
context: ./platform/android/docker
tags: ghcr.io/maplibre/android-ndk-r21b:latest
push: true

View File

@@ -5,14 +5,11 @@ on:
jobs:
build:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-22.04
defaults:
run:
working-directory: platform/android
container:
image: ghcr.io/maplibre/android-ndk-r21b
env:
LIBSYSCONFCPUS: 8
JOBS: 8
BUILDTYPE: Release
IS_LOCAL_DEVELOPMENT: false
@@ -44,6 +41,9 @@ jobs:
run: npm install --ignore-scripts
working-directory: platform/android
- name: Install ccache
run: sudo apt-get install -y ccache
- name: Prepare ccache
run: ccache --clear