Skip to content

Commit aed6390

Browse files
author
Brian J. Cardiff
authored
Move osx ci from Travis to Circle (#333)
* CI: refactor circle ci, include osx. drop travis osx * CI: Cache brew
1 parent 9552fb2 commit aed6390

File tree

2 files changed

+50
-18
lines changed

2 files changed

+50
-18
lines changed

.circleci/config.yml

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,70 @@
1-
version: 2
1+
version: 2.1
22

3-
dry:
4-
prepare: &prepare
5-
command: |
6-
crystal --version
7-
git config --global user.email "[email protected]"
8-
git config --global user.name "Your Name"
9-
git config --global column.ui always
3+
orbs:
4+
crystal: manastech/[email protected]
105

11-
steps: &steps
12-
- run: *prepare
13-
- checkout
14-
- run: shards install
15-
- run: make
16-
- run: make test
17-
- run: crystal tool format --check
6+
commands:
7+
shards-make-test:
8+
steps:
9+
- run:
10+
name: git config
11+
command: |
12+
git config --global user.email "[email protected]"
13+
git config --global user.name "Your Name"
14+
git config --global column.ui always
15+
- crystal/version
16+
- checkout
17+
- crystal/shards-install
18+
- run: make
19+
- run: make test
20+
- crystal/format-check
21+
22+
with-brew-cache:
23+
parameters:
24+
steps:
25+
type: steps
26+
steps:
27+
- restore_cache:
28+
keys:
29+
- brew-cache-v1-{{ .Branch }}
30+
- brew-cache-v1-
31+
- steps: <<parameters.steps>>
32+
- save_cache:
33+
key: brew-cache-v1-{{ .Branch }}-{{ epoch }}
34+
paths:
35+
- /usr/local/Homebrew
36+
- ~/Library/Caches/Homebrew
1837

1938
jobs:
2039
test:
2140
docker:
2241
- image: crystallang/crystal:latest
23-
steps: *steps
42+
steps:
43+
- shards-make-test
44+
45+
test-on-osx:
46+
macos:
47+
xcode: 11.1.0 # latest mojave
48+
steps:
49+
- with-brew-cache:
50+
steps:
51+
- run:
52+
name: Install Crystal
53+
command: brew install crystal
54+
- shards-make-test
2455

2556
test-on-nightly:
2657
docker:
2758
- image: crystallang/crystal:nightly
28-
steps: *steps
59+
steps:
60+
- shards-make-test
2961

3062
workflows:
3163
version: 2
3264
ci:
3365
jobs:
3466
- test
67+
- test-on-osx
3568
nightly:
3669
triggers:
3770
- schedule:

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: crystal
22

33
os:
44
- linux
5-
- osx
65

76
before_script: |
87
make

0 commit comments

Comments
 (0)