-
Notifications
You must be signed in to change notification settings - Fork 19
142 lines (133 loc) · 4.91 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Default workflow
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
TERM: dumb
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Lint
run: |
find "$(pwd -P)" -type f \
\( -name "*.bazel" -o -name "WORKSPACE" \) \
-not -path "*/buildsystem/*" \
-exec bazelisk run //:buildifier --config=ci -- --mode=check -v {} +
bazel-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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@v4
- 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@v4
- name: Bazel Android Lint
uses: ./.github/actions/bazel
with:
bazel-command: test //sample-android:sample-android-demo-free-debug.lint_test
cache-key: bazel-lint
grazel-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- 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@v4
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- 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@v4
- name: Install JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- 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@v4
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Install JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- 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