forked from reimagined/resolve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
51 lines (49 loc) · 2.69 KB
/
.gitlab-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
stages:
- install
- after_install
shopping-list-advanced (macOS) (failure):
stage: after_install
tags:
- macos
when: on_failure
script:
- "curl \"https://api.github.com/repos/reimagined/resolve/statuses/${CI_COMMIT_SHA}?access_token=${GITHUB_RESOLVE_STATUSES_ACCESS_TOKEN}\" -H \"Content-Type: application/json\" -X POST -d \"{\\\"state\\\": \\\"failure\\\", \\\"description\\\": \\\"Shopping List Advanced - macOS\\\", \\\"context\\\": \\\"GitLab\\\", \\\"target_url\\\": \\\"${CI_PIPELINE_URL}\\\"}\""
shopping-list-advanced (macOS):
stage: install
tags:
- macos
before_script:
- rm -rf /Users/resolve/resolve
- git clone git@172.22.7.16:github-mirror/resolve.git /Users/resolve/resolve
- cd /Users/resolve/resolve
- git reset --hard $CI_COMMIT_SHA
- yarn
script:
- "curl \"https://api.github.com/repos/reimagined/resolve/statuses/${CI_COMMIT_SHA}?access_token=${GITHUB_RESOLVE_STATUSES_ACCESS_TOKEN}\" -H \"Content-Type: application/json\" -X POST -d \"{\\\"state\\\": \\\"pending\\\", \\\"description\\\": \\\"Shopping List Advanced - macOS\\\", \\\"context\\\": \\\"GitLab\\\", \\\"target_url\\\": \\\"${CI_PIPELINE_URL}\\\"}\""
- cd /Users/resolve/resolve/examples/shopping-list-advanced
- yarn build
- cd /Users/resolve/resolve/examples/shopping-list-advanced/native
- watchman watch-del-all
- watchman shutdown-server
- sleep 1
- npx exp build:ios --type simulator
- sleep 1
- npx exp build:status | grep IPA | tail -1 | sed s/'^.*http'/'http'/g | xargs wget
- sleep 1
- ls -1 | grep simulator.tar.gz | xargs tar xvf
- sleep 1
- xcrun simctl boot 770A5B6B-ECD7-46A7-B5AB-CF694B3E2328 || echo 'boot'
- sleep 1
- ls -1d */ | grep .app | xargs xcrun simctl install 770A5B6B-ECD7-46A7-B5AB-CF694B3E2328
- sleep 1
- xcrun simctl launch 770A5B6B-ECD7-46A7-B5AB-CF694B3E2328 com.resolve.shoppinglistadvanced
- sleep 1
- xcrun simctl terminate 770A5B6B-ECD7-46A7-B5AB-CF694B3E2328 com.resolve.shoppinglistadvanced
- sleep 1
- "curl \"https://api.github.com/repos/reimagined/resolve/statuses/${CI_COMMIT_SHA}?access_token=${GITHUB_RESOLVE_STATUSES_ACCESS_TOKEN}\" -H \"Content-Type: application/json\" -X POST -d \"{\\\"state\\\": \\\"success\\\", \\\"description\\\": \\\"Shopping List Advanced - macOS\\\", \\\"context\\\": \\\"GitLab\\\", \\\"target_url\\\": \\\"${CI_PIPELINE_URL}\\\"}\""
after_script:
- cd /Users/resolve/resolve/examples/shopping-list-advanced/native
- ls -1 | grep simulator.tar.gz | xargs unlink
- xcrun simctl uninstall 770A5B6B-ECD7-46A7-B5AB-CF694B3E2328 com.resolve.shoppinglistadvanced
- ls -1d */ | grep .app | xargs rm -rf
- rm -rf /Users/resolve/resolve