-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (54 loc) · 1.8 KB
/
push.yml
File metadata and controls
68 lines (54 loc) · 1.8 KB
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
name: Main
on:
push:
branches:
- main
paths-ignore:
- '*.md'
workflow_dispatch:
inputs:
reason:
description: 'Reason for manual run'
required: false
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
gradle:
runs-on:
group: ubuntu-x86-runners
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Run shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
with:
scandir: './git-hooks'
- name: Setup java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: 'zulu'
java-version: 17
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6
- name: Setup Gradle
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6
- name: Execute buildHealth for build-logic
run: './gradlew -p build-logic buildHealth -s'
- name: Execute check
run: './gradlew check -s'
- name: Execute buildHealth for main project
run: './gradlew buildHealth -s'
# Gradle caches can exceed 45GB, potentially causing "No space left on device" errors.
# Clean up caches to free disk space.
- name: Clean up Gradle caches
if: always()
run: |
echo "Disk space before cleanup:"
df -h
echo "Gradle cache size before cleanup:"
du -sh ~/.gradle/caches || true
echo "Cleaning up Gradle caches..."
rm -rf ~/.gradle/caches
echo "Disk space after cleanup:"
df -h