Skip to content

Commit

Permalink
Catapult: Add CI for gradle-generatebp
Browse files Browse the repository at this point in the history
Change-Id: I84e71bce8a91a51dae766b110163db57e6c6d7d0
  • Loading branch information
luk1337 authored and luca020400 committed Jan 1, 2025
1 parent f5833cb commit cae943b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: build

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Build
uses: ./.github/workflows/build
21 changes: 21 additions & 0 deletions .github/workflows/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build

runs:
using: composite

steps:
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'

- name: Generate Android.bp
shell: bash
run: |
./gradlew app:generateBp
if [[ ! -z $(git status -s) ]]; then
git status
exit -1
fi
30 changes: 30 additions & 0 deletions .github/workflows/gerrit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: gerrit checks

on:
workflow_dispatch:
inputs:
ref:
type: string
gerrit-ref:
type: string
change:
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: lineageos-infra/fetch-gerrit-change@main
with:
gerrit-ref: ${{ inputs.gerrit-ref }}
ref: ${{ inputs.ref }}

- name: Build
uses: ./.github/workflows/build

- uses: lineageos-infra/gerrit-vote@main
if: always()
with:
auth: ${{ secrets.GERRIT_VOTE_CREDS }}
change: ${{ inputs.change }}
ref: ${{ inputs.ref }}

0 comments on commit cae943b

Please sign in to comment.