spring-boot/.github/workflows/build-pull-request.yml
Andy Wilkinson 90aae5a0b7 Use ubuntu-latest GitHub Actions runner for Linux builds
A full build requires a lot of disk space. I believe this is mostly
due to the large number of Docker images that the tests utilize. By
default, the amount of free disk space on an ubuntu-latest runner
does not meet or needs. In this commit, we work around this using
the free-disk-space action which deletes things like the Android
SDK and Haskell installations that are both large and not needed by
our builds.

Closes gh-40705
2024-05-13 12:08:15 +01:00

43 lines
1.4 KiB
YAML

name: Build Pull Request
on: pull_request
permissions:
contents: read
jobs:
build:
name: Build Pull Request
runs-on: ubuntu-latest
if: ${{ github.repository == 'spring-projects/spring-boot' }}
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
large-packages: false
docker-images: false
- name: Set Up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'liberica'
- name: Check Out
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 #v3.3.2
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
- name: Build
env:
CI: 'true'
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io'
run: ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --no-parallel --continue build
- name: Print JVM Thread Dumps When Cancelled
uses: ./.github/actions/print-jvm-thread-dumps
if: cancelled()
- name: Upload Build Reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-reports
path: '**/build/reports/'