Skip to content

Commit

Permalink
added new CI (GitHub Actions)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmokeev committed Aug 3, 2021
1 parent 543a4b7 commit 6747f10
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main-ubuntuAndMacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Android CI on Ubuntu and MacOS

on: [push]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Update CMake version
run: echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" --channel=3

- name: Update ndk-version
run: echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager --install "ndk;22.1.7171670"

- name: Build with Gradle
run: ./gradlew build

- name: Run unit tests
run: ./gradlew test

- name: Run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 21
target: default
arch: x86
ndk: 22.1.7171670
cmake: 3.18.1
script: ./gradlew connectedCheck
34 changes: 34 additions & 0 deletions .github/workflows/main-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Android CI on Windows

on: [push]

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Get specific version CMake, v3.18.1
run: sdkmanager "cmake;3.18.1"

- name: Update ndk-version
uses: nttld/setup-ndk@v1
with:
ndk-version: r22b

- name: Build with Gradle
run: .\gradlew.bat --no-daemon build

- name: Run unit tests
run: .\gradlew.bat --no-daemon test

0 comments on commit 6747f10

Please sign in to comment.