-
Notifications
You must be signed in to change notification settings - Fork 4
92 lines (75 loc) · 2.76 KB
/
ci.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: BisqApps
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Project Build & Test
strategy:
matrix:
os: [ubuntu-latest]
# os: [ubuntu-latest, macos-14, macos-latest]
# platform: [androidNode, androidClient, iosClient]
# TODO build fails on macos - might be an issue with the Pods compiled in MacOS 15 pushed to the repo (support for XCode 15 is still under dev for KMP)
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17 (Azul Zulu)
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
# Cache Gradle dependencies
- name: Cache Gradle dependencies
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
working-directory: ./bisqapps
run: |
chmod +x gradlew
# Android setup
- name: Set up Android SDK
uses: android-actions/setup-android@v2
with:
api-level: 33
build-tools: 33.0.0
# MacOS setup
# needed for macos terminal build to not hang doing linkDebugFrameworkxxxxArm64 related tasks
- name: Set up Xcode
if: startsWith(matrix.os, 'macos')
run: |
sudo xcode-select -s /Applications/Xcode_14.3.app
xcodebuild -version
# sudo xcode-select -s /Applications/Xcode_15.0.app
# TODO: restore androidNode once dependant bisq2 jars get published in a public maven repo
- name: Build project
working-directory: ./bisqapps
run: ./gradlew clean build -x androidNode:build --info
- name: Run all project tests
working-directory: ./bisqapps
run: ./gradlew test -x androidNode:test
- name: Run androidClient Tests
working-directory: ./bisqapps
run: ./gradlew androidClient:testDebugUnitTest androidClient:connectedDebugAndroidTest
# TODO: restore androidNode once dependant bisq2 jars get published in a public maven repo
# - name: Run androidNode Tests
# working-directory: ./bisqapps
# run: ./gradlew androidNode:testDebugUnitTest androidNode:connectedDebugAndroidTest
# TODO ios specific and run on emulator if needed
- name: Run iOS Tests
working-directory: ./bisqapps
if: startsWith(matrix.os, 'macos')
run: ./gradlew shared:presentation:iosSimulatorArm64Test