1version: 2
2
3jobs:
4 core:
5 docker:
6 - image: rust:1
7
8 steps:
9 - checkout
10
11 - restore_cache:
12 key: target-cache
13
14 - run: rustc --version; cargo --version; rustup --version
15 - run: rustup component add rustfmt
16 - run: rustup component add clippy
17 - run: cargo fmt -- --check
18 - run: cargo test
19 - run: cargo clippy
20 - run: cargo bench
21
22 - save_cache:
23 key: target-cache
24 paths:
25 - ~/.cargo
26 - ./target
27
28 ios:
29 macos:
30 xcode: "10.0.0"
31
32 working_directory: ~/bindings/swift
33
34 steps:
35 - checkout
36 - run: xcodebuild test -workspace Example/StretchKit.xcworkspace -scheme StretchKit -destination 'platform=iOS Simulator,name=iPhone XR,OS=12.0'
37
38 js:
39 docker:
40 - image: circleci/rust:1-node-browsers
41
42 working_directory: ~/bindings/js
43
44 steps:
45 - checkout
46
47 - restore_cache:
48 key: js-target-cache
49
50 - run: rustc --version; cargo --version; rustup --version
51 - run: rustup component add rustfmt
52 - run: rustup component add clippy
53 - run: cargo install wasm-pack
54 - run: cargo fmt -- --check
55 - run: wasm-pack test --node
56 - run: cargo clippy
57
58 - save_cache:
59 key: js-target-cache
60 paths:
61 - ~/.cargo
62 - ./target
63
64 android:
65 docker:
66 - image: rust:1
67
68 working_directory: ~/bindings/kotlin/stretch/src/main/rust
69
70 steps:
71 - checkout
72
73 - restore_cache:
74 key: target-cache
75
76 - run: rustc --version; cargo --version; rustup --version
77 - run: rustup component add rustfmt
78 - run: rustup component add clippy
79 - run: cargo fmt -- --check
80 - run: cargo test
81 - run: cargo clippy
82
83 - save_cache:
84 key: target-cache
85 paths:
86 - ~/.cargo
87 - ./target
88
89 docs:
90 docker:
91 - image: circleci/node:9.11.2
92
93 working_directory: ~/docs
94
95 steps:
96 - checkout
97
98 - restore_cache:
99 name: Restore Yarn Package Cache
100 key: yarn-packages-{{ checksum "docs/yarn.lock" }}
101
102 - run: yarn install
103 - run: ./node_modules/.bin/gatsby build
104
105 - save_cache:
106 name: Save Yarn Package Cache
107 key: yarn-packages-{{ checksum "docs/yarn.lock" }}
108 paths:
109 - ~/.cache/yarn
110
111workflows:
112 version: 2
113 test_all:
114 jobs:
115 - core
116 - ios
117 - js
118 - android
119 - docs
120