mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-06-28 10:05:45 +01:00
f989ad4014
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
62 lines
2.1 KiB
YAML
62 lines
2.1 KiB
YAML
name: Android CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- '8.**'
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest-8-cores
|
|
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
# gh api repos/actions/checkout/commits/v6 --jq '.sha'
|
|
with:
|
|
submodules: true
|
|
lfs: true
|
|
|
|
- name: set up JDK 17
|
|
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
|
|
# gh api repos/actions/setup-java/commits/v5 --jq '.sha'
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
|
|
# gh api repos/gradle/actions/commits/v6 --jq '.sha'
|
|
|
|
- name: Set up Gradle
|
|
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
|
|
# gh api repos/gradle/actions/commits/v6 --jq '.sha'
|
|
with:
|
|
# Only 8.** branch builds write to the cache; everything else (PRs, etc.) reads only.
|
|
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/8.') }}
|
|
# Required to persist the Gradle configuration cache across runs.
|
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
|
|
|
# Pull requests run the fast custom linter (ci); pushes to main / 8.x branches run the full
|
|
# Android lint (qa).
|
|
- name: Build with Gradle
|
|
env:
|
|
SIGNAL_BUILD_CACHE_URL: ${{ secrets.SIGNAL_BUILD_CACHE_URL }}
|
|
SIGNAL_BUILD_CACHE_USER: ${{ secrets.SIGNAL_BUILD_CACHE_USER }}
|
|
SIGNAL_BUILD_CACHE_PASSWORD: ${{ secrets.SIGNAL_BUILD_CACHE_PASSWORD }}
|
|
SIGNAL_BUILD_CACHE_PUSH: ${{ startsWith(github.ref, 'refs/heads/8.') }}
|
|
run: ./gradlew ${{ github.event_name == 'pull_request' && 'ci' || 'qa' }}
|
|
|
|
- name: Archive reports for failed build
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
# gh api repos/actions/upload-artifact/commits/v7 --jq '.sha'
|
|
with:
|
|
name: reports
|
|
path: '*/build/reports'
|