Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 038422da authored by LuK1337's avatar LuK1337 Committed by Georg Veichtlbauer
Browse files

ExactCalculator: Add GitHub Actions



Co-authored-by: default avatarLuca Stefani <luca.stefani.ge1@gmail.com>
Co-authored-by: default avatarSebastiano Barezzi <seba@sebaubuntu.dev>
Co-authored-by: default avatarTom Powell <tom@powell.io>
Change-Id: I425de19a19a300bc7939a5f8b46f93f4d83f1a2b
parent ab1bb82b
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
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
+29 −0
Original line number Diff line number Diff line
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 generateBp
        if [[ ! -z $(git status -s) ]]; then
          git status
          exit -1
        fi

    - uses: actions/upload-artifact@v3
      with:
        name: ExactCalculator-debug.apk
        path: build/outputs/apk/debug/ExactCalculator-debug.apk
+30 −0
Original line number Diff line number Diff line
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 }}