Skip to content

Commit

Permalink
Build a local eisop/checker-framework for CI (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Jul 26, 2024
1 parent 89e055f commit 746e34b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
with:
repository: jspecify/jspecify
path: jspecify
- name: Check out eisop/checker-framework
uses: actions/checkout@v4
with:
repository: eisop/checker-framework
path: checker-framework
- name: Set up Java
uses: actions/setup-java@v4
with:
Expand All @@ -27,7 +32,7 @@ jobs:
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
- name: Build and Test
run: ./gradlew build conformanceTests demoTest --include-build ../jspecify
run: ./gradlew build conformanceTests demoTest --include-build ../jspecify --include-build ../checker-framework
env:
SHALLOW: 1
JSPECIFY_CONFORMANCE_TEST_MODE: details
Expand All @@ -39,7 +44,7 @@ jobs:
working-directory: jspecify
- name: Run Samples Tests
if: always()
run: ./gradlew jspecifySamplesTest --include-build ../jspecify
run: ./gradlew jspecifySamplesTest --include-build ../jspecify --include-build ../checker-framework

publish-snapshot:
name: Publish Conformance Test Framework Snapshot
Expand Down
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins {
id 'com.diffplug.spotless' version '6.25.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'net.ltgt.errorprone' version '3.0.1'
// To show task list as a tree, run: ./gradlew <taskname> taskTree
id 'com.dorongold.task-tree' version '4.0.0'
}

// Nexus Publish plugin requires a group/version at the root project.
Expand Down Expand Up @@ -98,7 +100,7 @@ dependencies {
// If built with `--include-build path/to/checker-framework` then
// assemble checker-framework when assembling the reference checker.
if (checkerFramework != null) {
assemble.dependsOn(checkerFramework.task(":assembleForJavac"))
compileJava.dependsOn(checkerFramework.task(":checker:assembleForJavac"))
}

// If built with `--include-build path/to/jspecify` then
Expand Down Expand Up @@ -133,7 +135,7 @@ tasks.withType(JavaCompile).configureEach {

tasks.register('includeJSpecifyJDK') {
group = 'Build'
shouldRunAfter 'compileJava'
dependsOn 'compileJava'

def srcDir = "${jspecifyJdkHome}/src"
// This directory needs to be stored at the top-level of the resulting .jar file.
Expand Down

0 comments on commit 746e34b

Please sign in to comment.