Glimpse: Add gerrit checks support
Co-authored-by: Tom Powell <tom@powell.io> Change-Id: I2f8fb86069e6f95417f653eb025ab9731ed80092
This commit is contained in:
parent
2b425aad63
commit
b9ed3475dc
|
@ -10,24 +10,5 @@ jobs:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup JDK 17
|
- name: Build
|
||||||
uses: actions/setup-java@v3
|
uses: ./.github/workflows/build
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
|
|
||||||
- name: Generate Android.bp
|
|
||||||
run: |
|
|
||||||
./gradlew app:generateBp
|
|
||||||
if [[ ! -z $(git status -s) ]]; then
|
|
||||||
git status
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: app-debug.apk
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: build
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'zulu'
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
|
shell: bash
|
||||||
|
run: ./gradlew assembleDebug
|
||||||
|
|
||||||
|
- name: Generate Android.bp
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
./gradlew app:generateBp
|
||||||
|
if [[ ! -z $(git status -s) ]]; then
|
||||||
|
git status
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: app-debug.apk
|
||||||
|
path: app/build/outputs/apk/debug/app-debug.apk
|
|
@ -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 }}
|
Loading…
Reference in New Issue