Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build latest Caffeine on CI #1111

Merged
merged 7 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading