Skip to content

Commit

Permalink
Build latest Caffeine on CI (#1111)
Browse files Browse the repository at this point in the history
Fixes #1110 

We can see how this goes for some time before making it a required job.
  • Loading branch information
msridhar authored Dec 23, 2024
1 parent f2bafb2 commit 728bf77
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/caffeine-use-snapshot.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// An init script to override Caffeine's build configuration to use a snapshot version of NullAway
allprojects {
repositories {
mavenCentral()
mavenLocal()
gradlePluginPortal()
}
}

gradle.projectsLoaded {
rootProject.allprojects {
configurations.all {
resolutionStrategy {
eachDependency {
if (requested.group == "com.uber.nullaway") {
useVersion("+")
}
}
cacheChangingModulesFor(0, "seconds")
}
}
}
}
27 changes: 27 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,30 @@ jobs:
if: matrix.java == '17'
- name: Check that Git tree is clean after build and test
run: ./.buildscript/check_git_clean.sh
caffeine-gradle-task:
name: "Build Caffeine with snapshot"
runs-on: ubuntu-latest

steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: 'Set up JDKs'
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish to Maven Local
env:
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: 'false'
run: ./gradlew publishToMavenLocal
- name: Create a temporary directory for Caffeine
run: mkdir -p /tmp/caffeine
- name: Clone Caffeine repository
run: git clone --depth 1 https://github.com/ben-manes/caffeine.git /tmp/caffeine
- name: Run caffeine build
run: |
cp .github/workflows/caffeine-use-snapshot.gradle.kts /tmp/caffeine
cd /tmp/caffeine
./gradlew --init-script caffeine-use-snapshot.gradle.kts build -x test -x javadoc

0 comments on commit 728bf77

Please sign in to comment.