-
-
Notifications
You must be signed in to change notification settings - Fork 3
131 lines (128 loc) · 4.44 KB
/
actions.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: build dist
on:
push:
pull_request:
jobs:
linux-build:
name: build on linux
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: apt update
run: |
sudo apt-get update
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
# ONLY FOR NEW RELEASE TAGS
- name: setup gpg necessities
if: startsWith(github.ref, 'refs/tags/')
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > $WORKSPACE/'$SIGNING_SECRET_KEY_RING_FILE'"
env:
WORKSPACE: ${{ github.workspace }}
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
# ONLY FOR NEW RELEASE TAGS
- name: rewrite publish-pom.gradle to require signing
if: startsWith(github.ref, 'refs/tags/')
run: |
sed -i "s/signing {}/signing { sign(publishing.publications) }/" publish-pom.gradle
- name: cache AVD
uses: actions/cache@v3
env:
cache-name: cache-avd
with:
path: /home/runner/.android/gradle/avd
key: ${{ runner.os }}-gradle-avd
- name: cache gradle caches
uses: actions/cache@v3
env:
cache-name: cache-gradle-caches
with:
path: /home/runner/.gradle/caches/
key: ${{ runner.os }}-gradle-caches
- name: apt install
run: |
echo y | sudo apt-get install doxygen libxml2-dev libgrpc++-dev libgrpc-dev libprotobuf-dev protobuf-compiler protobuf-compiler-grpc graphviz cmake ninja-build
# ONLY FOR NON-RELEASES
- name: build
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: ./gradlew build dokkaHtml publishToMavenLocal
# ONLY FOR NEW RELEASE TAGS
- name: publish
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew --warning-mode all publish dokkaHtml
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ format('{0}/{1}', github.workspace, secrets.SIGNING_SECRET_KEY_RING_FILE) }}
- name: run instrumented tests (disabled)
if: false
# > Gradle was not able to complete device setup for: dev30_google_x86_Pixel_5
# > The emulator failed to open the managed device to generate the snapshot.
# also https://github.com/actions/virtual-environments/issues/183
run:
./gradlew testDevice1DebugAndroidTest || exit 1
./gradlew testDevice2DebugAndroidTest || exit 1
- name: upload artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: aap-core-apps-and-libs
path: |
./*/build/outputs/aar/*.aar
samples/*/build/outputs/apk/debug/*.apk
# Create release, only for release tags
- name: Create Release
uses: ncipollo/release-action@v1.12.0
if: success() && startsWith(github.ref, 'refs/tags/')
with:
artifacts: ./*/build/outputs/aar/*.aar,samples/*/build/outputs/apk/debug/*.apk
# Update API reference, only for release tags
- name: deploy to GitHub Pages
if: ${{ success() && startsWith(github.ref, 'refs/tags/') }}
uses: JamesIves/github-pages-deploy-action@4.1.2
with:
branch: gh-pages
folder: androidaudioplugin/build/dokka/html
osx-build:
name: build on osx
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: cache AVD
uses: actions/cache@v3
env:
cache-name: cache-avd
with:
path: /Users/runner/.android/gradle/avd
key: ${{ runner.os }}-gradle-avd
- name: cache gradle caches
uses: actions/cache@v3
env:
cache-name: cache-gradle-caches
with:
path: /Users/runner/.gradle/caches/
key: ${{ runner.os }}-gradle-caches
- name: install deps
run: |
brew tap grpc/grpc && brew install doxygen libxml2 ninja graphviz openssl grpc
- name: build
run: ./gradlew build dokkaHtml publishToMavenLocal
env:
ANDROID_SDK_ROOT: /Users/runner/Library/Android/sdk