-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
executable file
·58 lines (57 loc) · 1.46 KB
/
circle.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
version: 2
jobs:
linux:
docker:
- image: swift:4.2
- image: redis:3.2
- image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: test
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: "password"
steps:
- run: apt-get update
- run: apt-get install -yq libssl-dev
- run: apt-get install -yq libmysqlclient-dev
- run: apt-get install -yq mysql-client
- run: sleep 5
- run: mysql -h 127.0.0.1 -ppassword -e "set global max_connections = 1000;"
- checkout
- restore_cache:
keys:
- v3-spm-deps-{{ checksum "Package.resolved" }}
- run:
name: Copy Resolved Package
command: cp Package.resolved res
- run:
name: Compile Code
no_output_timeout: 1800
command: |
swift build
- run:
name: Run unit tests
no_output_timeout: 1800
command: |
swift test
- run:
name: Restoring Resolved Package
command: mv res Package.resolved
- save_cache:
key: v3-spm-deps-{{ checksum "Package.resolved" }}
paths:
- .build
linux-release:
docker:
- image: swift:4.2
steps:
- checkout
- run:
name: Compile code with optimizations
command: swift build -c release
workflows:
version: 2
tests:
jobs:
- linux
- linux-release