Skip to content

Commit

Permalink
Check that building the JSpecify Reference Checker works (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Aug 12, 2024
1 parent ef067e1 commit d30ebee
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
matrix:
# No need to run 'cftests-junit-jdk21' on JDK 21.
script: ['typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'daikon-part1', 'daikon-part2', 'jspecify-conformance']
script: ['typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'daikon-part1', 'daikon-part2', 'jspecify-conformance', 'jspecify-reference-checker']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# jspecify-conformance only tested on JDK 21.
# jspecify-conformance and jspecify-reference-checker only tested on JDK 21.
script: ['cftests-junit', 'cftests-nonjunit', 'cftests-junit-jdk21', 'typecheck-part1', 'typecheck-part2', 'guava', 'plume-lib', 'daikon-part1', 'daikon-part2']
# JDK 21 used by sanity before
java: [{version: '8', experimental: false},
Expand Down
26 changes: 26 additions & 0 deletions checker/bin-devel/test-jspecify-reference-checker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -e
set -o verbose
set -o xtrace
export SHELLOPTS
echo "SHELLOPTS=${SHELLOPTS}"

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck disable=SC1090 # In newer shellcheck than 0.6.0, pass: "-P SCRIPTDIR" (literally)
export ORG_GRADLE_PROJECT_useJdk17Compiler=true
source "$SCRIPTDIR"/clone-related.sh
./gradlew assembleForJavac --console=plain -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.http.connectionTimeout=60000

GIT_SCRIPTS="$SCRIPTDIR/.git-scripts"
# TODO: remove uses of `main-eisop` once that becomes `main`.
"$GIT_SCRIPTS/git-clone-related" jspecify jspecify-reference-checker -b main-eisop

# Delete the eisop/jdk that was already cloned...
rm -r ../jdk
# instead clone the jspecify/jdk.
"$GIT_SCRIPTS/git-clone-related" jspecify jdk

cd ../jspecify-reference-checker
git switch main-eisop
./gradlew build conformanceTests demoTest --console=plain --include-build "$CHECKERFRAMEWORK"

0 comments on commit d30ebee

Please sign in to comment.