Skip to content

Commit 1f3fded

Browse files
committed
Etar: Add GitHub actions build workflow
Change-Id: I13b49a7690184250223d48ec9742446939ca8e83
1 parent f82dced commit 1f3fded

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: build
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: true
14+
15+
- name: Build
16+
uses: ./.github/workflows/build

.github/workflows/build/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: build
2+
3+
runs:
4+
using: composite
5+
6+
steps:
7+
- name: Setup JDK 17
8+
uses: actions/setup-java@v4
9+
with:
10+
distribution: 'zulu'
11+
java-version: 17
12+
cache: 'gradle'
13+
14+
- name: Generate Android.bp
15+
shell: bash
16+
run: |
17+
./gradlew app:generateBp
18+
if [[ ! -z $(git status -s) ]]; then
19+
git status
20+
exit -1
21+
fi

.github/workflows/gerrit.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: gerrit checks
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
type: string
8+
gerrit-ref:
9+
type: string
10+
change:
11+
type: string
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: lineageos-infra/fetch-gerrit-change@main
18+
with:
19+
gerrit-ref: ${{ inputs.gerrit-ref }}
20+
ref: ${{ inputs.ref }}
21+
22+
- name: Build
23+
uses: ./.github/workflows/build
24+
25+
- uses: lineageos-infra/gerrit-vote@main
26+
if: always()
27+
with:
28+
auth: ${{ secrets.GERRIT_VOTE_CREDS }}
29+
change: ${{ inputs.change }}
30+
ref: ${{ inputs.ref }}

0 commit comments

Comments
 (0)