-
Notifications
You must be signed in to change notification settings - Fork 203
143 lines (141 loc) · 4.34 KB
/
ci.yml
File metadata and controls
143 lines (141 loc) · 4.34 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
on:
push:
branches: [master, beta, ci2]
pull_request:
branches: [master, beta]
workflow_dispatch:
jobs:
cancel_previous:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.12.1
with:
workflow_id: ${{ github.event.workflow.id }}
build-and-test:
needs: cancel_previous
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
- name: Nix GC (pre-build)
run: |
nix-collect-garbage -d || true
du -sh /nix/store || true
- name: build
run: devbox run build
run-e2e-ios:
if: false
runs-on: ['macos-15' ]
env:
YARN_ENABLE_HARDENED_MODE: 0
XCODE_VERSION: '26.1.1'
strategy:
matrix:
include:
- name: ios-min
ios-device: "iPhone 14"
ios-runtime: "18.5"
- name: ios-latest
ios-device: "iPhone 17"
ios-runtime: "26.1"
steps:
- uses: actions/checkout@v4
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.1.1'
- name: CocoaPods cache
uses: actions/cache@v4
with:
path: |
~/Library/Caches/CocoaPods
key: cocoapods-${{ runner.os }}-${{ env.XCODE_VERSION }}-${{ hashFiles('examples/E2E/ios/Podfile.lock') }}
restore-keys: |
cocoapods-${{ runner.os }}-${{ env.XCODE_VERSION }}-
cocoapods-${{ runner.os }}-
- name: DerivedData cache
uses: actions/cache@v4
with:
path: |
~/Library/Developer/Xcode/DerivedData
key: derived-${{ runner.os }}-${{ env.XCODE_VERSION }}-${{ hashFiles('examples/E2E/ios/Podfile.lock') }}
restore-keys: |
derived-${{ runner.os }}-${{ env.XCODE_VERSION }}-
derived-${{ runner.os }}-
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
# --omit-nix-env is important to use the macos system c toolchain instead of the nix toolchain
- name: iOS E2E Tests
env:
DETOX_IOS_DEVICE: ${{ matrix.ios-device }}
run: |
set -euo pipefail
devbox shell --omit-nix-env --command "devbox run test-ios"
run-e2e-android:
if: false
continue-on-error: true
runs-on: 'ubuntu-22.04'
strategy:
matrix:
include:
- name: android-min
avd-name: pixel_API21_x86_64
start-script: start-android-minsdk
- name: android-latest
avd-name: medium_phone_API33_x86_64
start-script: start-android-latest
steps:
- uses: actions/checkout@v4
- name: Yarn cache
uses: actions/cache@v4
with:
path: |
~/.cache/yarn
.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'true'
- name: Nix GC (pre-build)
run: |
nix-collect-garbage -d || true
du -sh /nix/store || true
- name: Disk space (start)
run: |
df -h
df -h /nix/store || true
- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.avd-name }}
- name: Android E2E Tests
env:
DETOX_AVD: ${{ matrix.avd-name }}
run: devbox run test-android