Repository navigation
77 lines (76 loc) · 2.36 KB
/
Copy pathexample.yml
File metadata and controls
77 lines (76 loc) · 2.36 KB
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: Example apps
# Builds the example app on Android, iOS and web. Kept separate from `Build` so that
# Release (release.yml), which waits for `Build`, is not blocked by the example
# app's native toolchain.
on:
pull_request:
push:
branches:
- master
jobs:
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- uses: actions/setup-java@v6
with:
distribution: 'zulu'
java-version: 17
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build android
run: cd example && pnpm build:android
- name: Build Android Example App and Library
run: cd example/android && ./gradlew clean assembleDebug
ios:
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build ios
run: cd example && pnpm build:ios
- name: Pod install
run: cd example && pod install --project-directory=ios
# Compiles the library's native code too; `pod install` alone doesn't.
- name: Build iOS Example App and Library
run: |
xcodebuild build \
-workspace example/ios/SegmentedControlExample.xcworkspace \
-scheme SegmentedControlExample \
-configuration Debug \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath example/ios/build/DerivedData \
-quiet \
ARCHS=arm64 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Export web example
run: cd example-web && pnpm export