chore: Clean up debugging logs from push workflow #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Free disk space to avoid running into "No space left on device" errors | |
# when downloading multiple versions of IntelliJ for plugin verification | |
- name: Maximize Build Space | |
uses: jlumbroso/[email protected] | |
with: | |
tool-cache: true | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- 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 |