-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (51 loc) · 1.52 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
name: build
on:
push:
branches:
- master
pull_request:
types: [ opened, labeled, unlabeled, synchronize ]
jobs:
jvm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
api-level:
- 23
- 31
java-version:
- 11
- 17
steps:
- name: Checkout Project
uses: actions/[email protected]
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel
- name: Configure JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Run Build
run: bazel build //... --disk_cache=$HOME/.cache/bazel_disk_cache --show_progress_rate_limit=5 --test_output=errors
- name: Run Tests
uses: reactivecircus/[email protected]
if: matrix.api-level == '23'
continue-on-error: true
with:
api-level: ${{ matrix.api-level }}
script: bazel test //... --disk_cache=$HOME/.cache/bazel_disk_cache --show_progress_rate_limit=5 --test_output=errors
env:
API_LEVEL: ${{ matrix.api-level }}
- name: Upload Artifacts
uses: actions/[email protected]
if: always()
with:
name: android-bazel-java-app-template-${{ github.workflow }}-${{ github.run_id }}
path: |
bazel-bin//src/main/template_app.apk
if-no-files-found: warn