Skip to content

Update build.gradle #1109

Update build.gradle

Update build.gradle #1109

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
jobs:
build:
strategy:
matrix:
os: [ macOS-latest, ubuntu-latest ]
runs-on: ${{matrix.os}}
name: Build on ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libgtk-3-dev nodejs chromium-browser
- name: Select Xcode version
if: matrix.os == 'macOS-latest'
uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98
with:
xcode-version: '14.2.0'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/version-2.0' }}
arguments: |
build
publishAllFilteredToMavenLocal
-Ptarget=all_linux_hosted
- name: Build macOS
if: matrix.os == 'macOS-latest'
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/version-2.0' }}
arguments: |
:reaktive-annotations:build
:utils:build
:reaktive-testing:build
:reaktive:build
:coroutines-interop:build
:sample-mpp-module:build
publishAllFilteredToMavenLocal
-Ptarget=all_macos_hosted
# Do not invoke from Gradle, it creates circular dependency (Gradle invokes XCode invokes Gradle).
- name: Build iOS app
if: matrix.os == 'macOS-latest'
working-directory: sample-ios-app
run: >
xcodebuild
-project sample-ios-app.xcodeproj
-scheme "sample-ios-app"
-sdk "iphonesimulator"
-arch "x86_64"
- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip
- name: Upload the build report
if: failure()
uses: actions/upload-artifact@master
with:
name: error-report
path: build-reports.zip