-
Notifications
You must be signed in to change notification settings - Fork 58
77 lines (75 loc) · 2.53 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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