-
Notifications
You must be signed in to change notification settings - Fork 19
123 lines (115 loc) · 4.24 KB
/
ci.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
name: Default workflow
on:
push:
branches:
- master
pull_request:
env:
TERM: dumb
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK 11
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
- name: Lint
run: |
find "$(pwd -P)" -type f \
\( -name "*.bazel" -o -name "WORKSPACE" \) \
-not -path "*/buildsystem/*" \
-exec bazelisk run //:buildifier -- --mode=check -v {} +
bazel-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bazel build
uses: ./.github/actions/bazel
with:
bazel-command: build //...
cache-key: bazel-build
bazel-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Query targets
run: |
bazelisk query 'kind(kt_jvm_test, ...)' --output label > /tmp/targets
- name: Bazel test
uses: ./.github/actions/bazel
with:
bazel-command: test --target_pattern_file=/tmp/targets
cache-key: bazel-test
bazel-android-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bazel Android Lint
uses: ./.github/actions/bazel
with:
bazel-command: test //sample-android:sample-android-flavor1-free-debug.lint_test
cache-key: bazel-lint
grazel-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: burrunan/[email protected]
name: grazel-build
with:
debug: false
job-id: grazel-build
read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-dependencies-cache-key: |
gradle/libs.versions.toml
arguments: assembleDebug --scan
grazel-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: burrunan/[email protected]
name: grazel-test
with:
debug: false
job-id: grazel-test
read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-dependencies-cache-key: |
gradle/libs.versions.toml
arguments: test --scan
grazel-gradle-plugin-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: burrunan/[email protected]
name: grazel-gradle-plugin-test
with:
debug: false
job-id: grazel-gradle-plugin-test
build-root-directory: grazel-gradle-plugin
read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-dependencies-cache-key: |
gradle/libs.versions.toml
arguments: test --scan
migrate-to-bazel-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- uses: burrunan/[email protected]
name: migrate-to-bazel-validation
with:
debug: false
job-id: migrate-to-bazel-validation
read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-dependencies-cache-key: |
gradle/libs.versions.toml
arguments: migrateToBazel --scan