-
Notifications
You must be signed in to change notification settings - Fork 67
70 lines (60 loc) · 2.21 KB
/
update-baseline-profiles.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "Update Baseline Profiles"
on:
workflow_dispatch:
# Always run on PRs if this file was modified
pull_request:
paths:
- '.github/workflows/update-baseline-profiles.yml'
- 'gradle/libs.versions.toml'
concurrency:
group: 'ci-${{ github.event.merge_group.head_ref || github.head_ref }}-${{ github.workflow }}'
cancel-in-progress: true
jobs:
update-baseline-profiles:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: 'true'
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Update SDK
run: |
echo "Accepting SDK licenses"
yes | "${ANDROID_HOME}"/cmdline-tools/latest/bin/sdkmanager --licenses || true
echo "Installing emulator image"
"${ANDROID_HOME}"/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-33;google_apis;x86_64"
- name: Generate baseline profiles
run: ./scripts/update-baseline-profiles.sh
- name: Upload build reports
uses: actions/upload-artifact@v4
with:
name: reports
path: |
**/build/reports/**
**/generated/baselineProfiles/**
- name: Create Pull Request
if: github.event_name == 'workflow_dispatch'
id: createpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SLACKHQ_MBR_GITHUB_TOKEN }}
commit-message: 'Update baseline profiles'
committer: OSS-Bot <[email protected]>
author: OSS-Bot <[email protected]>
title: 'Update baseline profiles'
body: 'Updates baseline profiles'
reviewers: ${{ github.actor }}
branch-suffix: timestamp
branch: bot/update-baseline-profiles