From 1064a2494052d3f210979127f77706aa81845bdf Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Mon, 7 Dec 2020 04:28:54 +0700 Subject: [PATCH 1/3] Make gradle GA run cross-platform --- .github/workflows/gradle.yml | 103 +++++++++++++++++++++++++++++++---- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index adc74adfe..d66d68ad5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,17 +1,98 @@ name: Gradle build -on: [push] +on: [ push ] jobs: - build: - - runs-on: ubuntu-latest + build-ubuntu: + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Build with Gradle - run: ./gradlew build + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Install Chrome + run: | + sudo apt install -y libappindicator1 fonts-liberation + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i google-chrome*.deb + - name: Cache gradle + uses: actions/cache@v2 + with: + path: | + **/.gradle + **/build + key: gradle_6_6_1 + restore-keys: gradle_6_6_1 + + - name: Cache konan + uses: actions/cache@v2 + with: + path: | + ~/.konan/dependencies + ~/.konan/kotlin-native-prebuilt-linux-1.4.20 + key: ${{ runner.os }}-konan-1.4.20 + restore-keys: ${{ runner.os }}-konan-1.4.20 + - name: Build with Gradle + run: ./gradlew -Dorg.gradle.daemon=false --build-cache build + + build-osx: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache gradle + uses: actions/cache@v2 + with: + path: | + **/.gradle + **/build + key: gradle_6_6_1 + restore-keys: gradle_6_6_1 + + - name: Cache konan + uses: actions/cache@v2 + with: + path: | + ~/.konan/dependencies + ~/.konan/kotlin-native-prebuilt-macos-1.4.20 + key: ${{ runner.os }}-konan-1.4.20 + restore-keys: ${{ runner.os }}-konan-1.4.20 + - name: Build with Gradle + run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build + + build-windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Add msys to path + run: SETX PATH "%PATH%;C:\msys64\mingw64\bin" + - name: Cache gradle + uses: actions/cache@v2 + with: + path: | + **/.gradle + **/build + key: gradle_6_6_1 + restore-keys: gradle_6_6_1 + + - name: Cache konan + uses: actions/cache@v2 + with: + path: | + ~/.konan/dependencies + ~/.konan/kotlin-native-prebuilt-mingw-1.4.20 + key: ${{ runner.os }}-konan-1.4.20 + restore-keys: ${{ runner.os }}-konan-1.4.20 + - name: Build with Gradle + run: ./gradlew --build-cache build From 8603149d4b6b045f46c4a06f6dc58389cac1f722 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Mon, 7 Dec 2020 14:01:46 +0700 Subject: [PATCH 2/3] Update gradle.yml --- .github/workflows/gradle.yml | 45 +++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d66d68ad5..cb1952bc8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,19 +21,20 @@ jobs: uses: actions/cache@v2 with: path: | - **/.gradle - **/build - key: gradle_6_6_1 - restore-keys: gradle_6_6_1 + .gradle + build + ~/.gradle + key: gradle + restore-keys: gradle - name: Cache konan uses: actions/cache@v2 with: path: | ~/.konan/dependencies - ~/.konan/kotlin-native-prebuilt-linux-1.4.20 - key: ${{ runner.os }}-konan-1.4.20 - restore-keys: ${{ runner.os }}-konan-1.4.20 + ~/.konan/kotlin-native-prebuilt-linux-* + key: ${{ runner.os }}-konan + restore-keys: ${{ runner.os }}-konan - name: Build with Gradle run: ./gradlew -Dorg.gradle.daemon=false --build-cache build @@ -50,19 +51,20 @@ jobs: uses: actions/cache@v2 with: path: | - **/.gradle - **/build - key: gradle_6_6_1 - restore-keys: gradle_6_6_1 + .gradle + build + ~/.gradle + key: gradle + restore-keys: gradle - name: Cache konan uses: actions/cache@v2 with: path: | ~/.konan/dependencies - ~/.konan/kotlin-native-prebuilt-macos-1.4.20 - key: ${{ runner.os }}-konan-1.4.20 - restore-keys: ${{ runner.os }}-konan-1.4.20 + ~/.konan/kotlin-native-prebuilt-macos-* + key: ${{ runner.os }}-konan + restore-keys: ${{ runner.os }}-konan - name: Build with Gradle run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build @@ -81,18 +83,19 @@ jobs: uses: actions/cache@v2 with: path: | - **/.gradle - **/build - key: gradle_6_6_1 - restore-keys: gradle_6_6_1 + .gradle + build + ~/.gradle + key: {{ runner.os }}-gradle + restore-keys: {{ runner.os }}-gradle - name: Cache konan uses: actions/cache@v2 with: path: | ~/.konan/dependencies - ~/.konan/kotlin-native-prebuilt-mingw-1.4.20 - key: ${{ runner.os }}-konan-1.4.20 - restore-keys: ${{ runner.os }}-konan-1.4.20 + ~/.konan/kotlin-native-prebuilt-mingw-* + key: ${{ runner.os }}-konan + restore-keys: ${{ runner.os }}-konan - name: Build with Gradle run: ./gradlew --build-cache build From 6d96bba101b068b773c68e4853a72e9012b5168a Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 8 Dec 2020 16:35:30 +0700 Subject: [PATCH 3/3] Fix variable name --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index cb1952bc8..467a867bc 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -86,8 +86,8 @@ jobs: .gradle build ~/.gradle - key: {{ runner.os }}-gradle - restore-keys: {{ runner.os }}-gradle + key: ${{ runner.os }}-gradle + restore-keys: ${{ runner.os }}-gradle - name: Cache konan uses: actions/cache@v2