Skip to content

Commit

Permalink
Split CI into smaller jobs; add module flags (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewShf authored Aug 1, 2022
1 parent a577875 commit 0f3b85a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
Empty file modified .ci-build-without-test.sh
100644 → 100755
Empty file.
Empty file modified .ci-build.sh
100644 → 100755
Empty file.
40 changes: 37 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ on:
jobs:
build:
strategy:
max-parallel: 1
matrix:
jdk: [ 8, 11, 17 ]
jdk: [ 11, 8, 17 ]
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.0
with:
access_token: ${{ github.token }}
- name: Pull Request Checkout
uses: actions/checkout@v2
with:
Expand All @@ -28,5 +33,34 @@ jobs:
with:
java-version: ${{matrix.jdk}}
distribution: 'temurin'
- name: Build and test
run: ./.ci-build.sh
- name: Build
id: build
run: ./.ci-build-without-test.sh

- name: PICO Typecheck Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityTypecheckTest

- name: PICO Typecheck AllSystems Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityTypecheckBaseAllSystemsTest

- name: PICO Typecheck Extended Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityTypecheckExtendedTest

- name: PICO Glacier TypeCheck Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityTypecheckGlacierTest

- name: PICO Inference Initial Typecheck Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityInferenceInitialTypecheckTest

- name: PICO Inference Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityInferenceTest

- name: PICO ReIm Inference Test
if: ${{ steps.build.outcome == 'success' }}
run: ./gradlew ImmutabilityReImInferenceTest
20 changes: 18 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@ plugins {
apply plugin: 'java'

ext {
assert JavaVersion.current() == JavaVersion.VERSION_1_8: "Set JAVA_HOME to JDK 8. Current version is ${JavaVersion.current()}"
isJava8 = JavaVersion.current() == JavaVersion.VERSION_1_8
jsr308 = file(new File("..")).absolutePath
cfPath = "${jsr308}/checker-framework"
cfiPath = "${jsr308}/checker-framework-inference"
afu = "${jsr308}/annotation-tools/annotation-file-utilities"
picoPath = "${jsr308}/immutability"
compilerArgsForRunningCF = [
// Keep in sync with checker-framework/build.gradle.
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
]
}

println '==================================='
Expand Down Expand Up @@ -96,7 +108,11 @@ afterEvaluate {

environment "external_checker_classpath", "${picoPath}/build/classes/java/main:${picoPath}/build/resources/main"

jvmArgs "-Xbootclasspath/p:${cfiPath}/dist/javac.jar"
if (isJava8) {
jvmArgs "-Xbootclasspath/p:${cfiPath}/dist/javac.jar"
} else {
jvmArgs += compilerArgsForRunningCF
}

testLogging {
// Always run the tests
Expand Down

0 comments on commit 0f3b85a

Please sign in to comment.