-
Notifications
You must be signed in to change notification settings - Fork 2
/
semaphore.yml
74 lines (68 loc) · 2.77 KB
/
semaphore.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
# Use the latest stable version of Semaphore 2.0 YML syntax:
version: v1.0
# Name your pipeline. If you choose to connect multiple pipelines with
# promotions, the pipeline name will help you differentiate between
# them. For example, you might have a build phase and a delivery phase.
# For more information on promotions, see:
# https://docs.semaphoreci.com/article/67-deploying-with-promotions
name: Tallest Towers
# The agent defines the environment in which your CI runs. It is a combination
# of a machine type and an operating system image. For a project built with
# Xcode you must use one of the Apple machine types, coupled with a macOS image
# running either Xcode 10 or Xcode 11.
# See https://docs.semaphoreci.com/article/20-machine-types
# https://docs.semaphoreci.com/article/161-macos-mojave-xcode-10-image and
# https://docs.semaphoreci.com/article/162-macos-mojave-xcode-11-image
agent:
machine:
type: a1-standard-4
os_image: macos-mojave-xcode11
# Blocks are the heart of a pipeline and are executed sequentially. Each block
# has a task that defines one or more parallel jobs. Jobs define commands that
# should be executed by the pipeline.
# See https://docs.semaphoreci.com/article/62-concepts
blocks:
- name: Run tests
task:
# Set environment variables that your project requires.
# See https://docs.semaphoreci.com/article/66-environment-variables-and-secrets
env_vars:
- name: LANG
value: en_US.UTF-8
prologue:
commands:
# Download source code from GitHub.
- checkout
# Restore dependencies from cache. This command will not fail in
# case of a cache miss. In case of a cache hit, bundle install will
# complete in about a second.
# See https://docs.semaphoreci.com/article/68-caching-dependencies
- cache restore
- bundle install --path vendor/bundle
- cache store
jobs:
- name: Test
commands:
# Select an Xcode version.
# See https://docs.semaphoreci.com/article/161-macos-mojave-xcode-10-image and
# https://docs.semaphoreci.com/article/162-macos-mojave-xcode-11-image
- bundle exec xcversion select 11.1
# Run tests of iOS and Mac app on a simulator or connected device.
# See https://docs.fastlane.tools/actions/scan/
- bundle exec fastlane test
- name: Build app
task:
env_vars:
- name: LANG
value: en_US.UTF-8
prologue:
commands:
- checkout
- cache restore
- bundle install --path vendor/bundle
- cache store
jobs:
- name: Build
commands:
- bundle exec xcversion select 11.1
- bundle exec fastlane build