forked from viamrobotics/rdk
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.85 KB
/
droid.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
62
63
64
65
66
67
68
69
70
71
name: Build for Android
on:
workflow_dispatch:
inputs:
release_type:
required: true
type: string
workflow_call:
inputs:
release_type:
required: true
type: string
secrets:
GCP_CREDENTIALS:
required: true
env:
NDK_ZIP: android-ndk-r26-linux.zip
TARGET: bin/viam-server-${{ inputs.release_type }}-android-aarch64
jobs:
droid-build:
# temporarily disabled while we port the new android build
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
- uses: actions/checkout@v3
if: github.event_name == 'pull_request_target'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- id: cache-ndk
uses: actions/cache@v3
with:
path: ${{ env.NDK_ZIP }}
key: ${{ env.NDK_ZIP }}
- name: download ndk
if: steps.cache-ndk.outputs.cache-hit != 'true'
run: wget https://dl.google.com/android/repository/${{ env.NDK_ZIP }}
- name: unzip ndk
run: unzip -d etc ${{ env.NDK_ZIP }}
- name: build
env:
BUILD_CHANNEL: ${{ inputs.release_type }}
run: make server-android
- uses: actions/upload-artifact@v4
with:
name: viam-server-android
path: ${{ env.TARGET }}
- name: Authorize GCP Upload
uses: google-github-actions/[email protected]
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- if: inputs.release_type == 'stable' || inputs.release_type == 'latest'
uses: google-github-actions/[email protected]
with:
headers: "cache-control: no-cache"
path: ${{ env.TARGET }}
destination: 'packages.viam.com/apps/viam-server/'