-
Notifications
You must be signed in to change notification settings - Fork 31
61 lines (53 loc) · 2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build
on:
push:
branches: [master]
jobs:
publish:
name: Build the artifacts
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.PAT_GITHUB }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.ACTIONS_ROLE }}
- name: Update Java
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install NDK & tools
# Starts from: pwd => /home/runner/work/rive/rive
# ANDROID_HOME => /usr/local/lib/android/sdk
run: |
set -x
echo "y" | sdkmanager --install 'build-tools;34.0.0' platform-tools --sdk_root=${ANDROID_SDK_ROOT}
cd ${ANDROID_HOME}
wget -q https://dl.google.com/android/repository/android-ndk-r27c-linux.zip
unzip -q android-ndk-r27c-linux.zip
echo "y" | sdkmanager --install 'cmake;3.22.1' --channel=0 --sdk_root=${ANDROID_SDK_ROOT}
- name: Installing pre-requisites
run: |
set -x
# Install some dependencies & premake5
sudo apt update && sudo apt-get -y install clang libgl1-mesa-dev libvorbis-dev libvpx-dev ninja-build python3-pip
wget -q https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz
tar -xf premake-5.0.0-beta2-linux.tar.gz
sudo mv premake5 /usr/local/bin
- name: Build Android
env:
# ANDROID_SDK_ROOT has been in the env by 'setup-android' above
# and is => /usr/local/lib/android/sdk
NDK_PATH: ${{ env.ANDROID_SDK_ROOT }}/android-ndk-r27c
run: ./gradlew kotlin:assembleRelease