From a194c070410817c40c24fca6a8007b1b0275bea3 Mon Sep 17 00:00:00 2001 From: Federico Tomassetti Date: Wed, 6 Dec 2023 17:38:32 +0100 Subject: [PATCH] separate GitHub actions for build and test --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ .github/workflows/{check.yml => test.yml} | 6 +++--- build.gradle.kts | 8 ++++++-- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{check.yml => test.yml} (76%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..504c2718 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Basic Build + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '11', '17' ] + name: Basic Build (Java ${{ matrix.Java }}) + + steps: + - uses: actions/checkout@v1 + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: ${{ matrix.java }} + - name: Test + run: ./gradlew ciBasicBuild diff --git a/.github/workflows/check.yml b/.github/workflows/test.yml similarity index 76% rename from .github/workflows/check.yml rename to .github/workflows/test.yml index 7155a08a..20475a74 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Basic Checks +name: Test on: [push] @@ -9,7 +9,7 @@ jobs: strategy: matrix: java: [ '11', '17' ] - name: Basic Checks (Java ${{ matrix.Java }}) + name: Test (Java ${{ matrix.Java }}) steps: - uses: actions/checkout@v1 @@ -19,4 +19,4 @@ jobs: distribution: 'adopt' java-version: ${{ matrix.java }} - name: Test - run: ./gradlew ciCheck + run: ./gradlew ciTest diff --git a/build.gradle.kts b/build.gradle.kts index bfe926ac..78739ff0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,12 +41,16 @@ tasks { } tasks { - create("ciCheck") { + create("ciBasicBuild") { dependsOn(":antlr-kotlin-runtime:compileKotlinJvm") dependsOn(":antlr-kotlin-tests:compileKotlinJvm") dependsOn(":antlr-kotlin-target:compileKotlin") + } + + create("ciTest") { dependsOn(":antlr-kotlin-runtime:jvmTest") dependsOn(":antlr-kotlin-tests:jvmTest") dependsOn(":antlr-kotlin-target:test") } -} \ No newline at end of file +} +