-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.92 KB
/
ci.yaml
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
# https://github.com/Kotlin/multiplatform-library-template/blob/main/.github/workflows/gradle.yml
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_call:
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- cmd: "./gradlew :kmp-webrtc:testDebugUnitTest"
os: macos-latest
dep: "brew update && brew install unzip"
- cmd: "./gradlew :example:androidApp:assembleDebug"
os: macos-latest
dep: "brew update && brew install unzip"
- cmd: "cd example/iosApp && xcodegen && pod install && xcodebuild -workspace iosApp.xcworkspace -scheme iosApp -sdk iphonesimulator -configuration Debug"
os: macos-latest
dep: "brew update && brew install cocoapods xcodegen unzip"
runs-on: ${{ matrix.os }}
permissions:
pull-requests: write
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: "gradle"
- uses: gradle/actions/setup-gradle@v3
- uses: suisei-cn/[email protected]
id: download_libs # Remember to give an ID if you need the output filename
name: Download libs.zip
with:
url: "https://github.com/HackWebRTC/kmp-webrtc/releases/latest/download/libs.zip"
target: ./
- name: Extract libs
run: |
unzip -o libs.zip
- if: ${{ matrix.dep }}
run: ${{ matrix.dep }}
- if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: ${{ matrix.cmd }}
- if: ${{ matrix.os != 'windows-latest' }}
run: ${{ matrix.cmd }}