Skip to content

Commit

Permalink
GitHub Actions: Switch to the gradle setup action.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Mar 17, 2023
1 parent 115e29c commit 91ac222
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 40 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/build-js-ir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ jobs:
- name: Source Code Checkout
uses: actions/checkout@v3

- name: Create a Gradle Wrapper
# Use a null gradle file so that if the gradle version cannot parse this gradle
# file it will be able to run and generate the gradle wrapper.
run: touch null.gradle ; gradle -b null.gradle wrapper --gradle-version 7.5 ; rm null.gradle

- name: Gradle Version
run: ./gradlew --version
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Build for Kotlin/JS IR
run: ./gradlew jsIrJar
run: gradle jsIrJar

- name: Tar Build Artifacts
run: tar -cvf build-js-ir-artifacts.tar .
Expand All @@ -35,6 +32,11 @@ jobs:
matrix:
node: [ 14, 16, 18 ]
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -49,12 +51,17 @@ jobs:
node-version: ${{ matrix.node }}

- name: Test for Kotlin/JS IR on Node
run: ./gradlew jsIrNodeTest
run: gradle jsIrNodeTest

test-firefox:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -69,12 +76,17 @@ jobs:
firefox-version: 'latest'

- name: Test for Kotlin/JS IR on Firefox
run: ./gradlew -D js.browser=Firefox jsIrBrowserTest
run: gradle -D js.browser=Firefox jsIrBrowserTest

test-chrome:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -89,4 +101,4 @@ jobs:
chrome-version: 'latest'

- name: Test for Kotlin/JS Legacy on Chrome
run: ./gradlew -D js.browser=Chrome jsLegacyBrowserTest
run: gradle -D js.browser=Chrome jsLegacyBrowserTest
34 changes: 23 additions & 11 deletions .github/workflows/build-js-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ jobs:
- name: Source Code Checkout
uses: actions/checkout@v3

- name: Create a Gradle Wrapper
# Use a null gradle file so that if the gradle version cannot parse this gradle
# file it will be able to run and generate the gradle wrapper.
run: touch null.gradle ; gradle -b null.gradle wrapper --gradle-version 7.5 ; rm null.gradle

- name: Gradle Version
run: ./gradlew --version
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Build for Kotlin/JS Legacy
run: ./gradlew jsLegacyJar
run: gradle jsLegacyJar

- name: Tar Build Artifacts
run: tar -cvf build-js-legacy-artifacts.tar .
Expand All @@ -35,6 +32,11 @@ jobs:
matrix:
node: [ 14, 16, 18 ]
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -49,12 +51,17 @@ jobs:
node-version: ${{ matrix.node }}

- name: Test for Kotlin/JS Legacy on Node
run: ./gradlew jsLegacyNodeTest
run: gradle jsLegacyNodeTest

test-firefox:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -69,12 +76,17 @@ jobs:
firefox-version: 'latest'

- name: Test for Kotlin/JS Legacy on Firefox
run: ./gradlew -D js.browser=Firefox jsLegacyBrowserTest
run: gradle -D js.browser=Firefox jsLegacyBrowserTest

test-chrome:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -89,4 +101,4 @@ jobs:
chrome-version: 'latest'

- name: Test for Kotlin/JS Legacy on Chrome
run: ./gradlew -D js.browser=Chrome jsLegacyBrowserTest
run: gradle -D js.browser=Chrome jsLegacyBrowserTest
15 changes: 6 additions & 9 deletions .github/workflows/build-jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Create a Gradle Wrapper
# Use a null gradle file so that if the gradle version cannot parse this gradle
# file it will be able to run and generate the gradle wrapper.
run: touch null.gradle ; gradle -b null.gradle wrapper --gradle-version 7.5 ; rm null.gradle

- name: Gradle Version
run: ./gradlew --version
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Build for Kotlin/JVM
run: ./gradlew -D jvm.target=${{ matrix.java }} jvmJar
run: gradle -D jvm.target=${{ matrix.java }} jvmJar

- name: Test for Kotlin/JVM
run: ./gradlew -D jvm.target=${{ matrix.java }} jvmTest
run: gradle -D jvm.target=${{ matrix.java }} jvmTest
15 changes: 6 additions & 9 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ jobs:
- name: Source Code Checkout
uses: actions/checkout@v3

- name: Create a Gradle Wrapper
# Use a null gradle file so that if the gradle version cannot parse this gradle
# file it will be able to run and generate the gradle wrapper.
run: touch null.gradle ; gradle -b null.gradle wrapper --gradle-version 7.5 ; rm null.gradle

- name: Gradle Version
run: ./gradlew --version
- name: Setup Gradle 7.5
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5

- name: Build for Kotlin/Native
run: ./gradlew nativeMainKlibrary
run: gradle nativeMainKlibrary

- name: Test for Kotlin/Native
run: ./gradlew nativeTest
run: gradle nativeTest

0 comments on commit 91ac222

Please sign in to comment.