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 steps:
33 - checkout
34
35 - run:
36 command: xcodebuild test -workspace Example/StretchKit.xcworkspace -scheme StretchKit -destination 'platform=iOS Simulator,name=iPhone XR,OS=12.0'
37 working_directory: bindings/swift
38
39 js:
40 docker:
41 - image: circleci/rust:1-node-browsers
42
43 steps:
44 - checkout
45
46 - restore_cache:
47 key: js-target-cache
48
49 - run: rustc --version; cargo --version; rustup --version
50 - run: rustup component add rustfmt
51 - run: rustup component add clippy
52 - run: cargo install wasm-pack
53 - run:
54 command: cargo fmt -- --check
55 working_directory: bindings/js
56 - run:
57 command: wasm-pack test --node
58 working_directory: bindings/js
59 - run:
60 command: cargo clippy
61 working_directory: bindings/js
62
63 - save_cache:
64 key: js-target-cache
65 paths:
66 - ~/.cargo
67 - ./target
68
69 android:
70 docker:
71 - image: rust:1
72
73 steps:
74 - checkout
75
76 - restore_cache:
77 key: target-cache
78
79 - run: rustc --version; cargo --version; rustup --version
80 - run: rustup component add rustfmt
81 - run: rustup component add clippy
82 - run:
83 command: cargo fmt -- --check
84 working_directory: bindings/kotlin/stretch/src/main/rust
85 - run:
86 command: cargo test
87 working_directory: bindings/kotlin/stretch/src/main/rust
88 - run:
89 command: cargo clippy
90 working_directory: bindings/kotlin/stretch/src/main/rust
91
92 - save_cache:
93 key: target-cache
94 paths:
95 - ~/.cargo
96 - ./target
97
98 docs:
99 docker:
100 - image: circleci/node:9.11.2
101
102 steps:
103 - checkout
104
105 - restore_cache:
106 name: Restore Yarn Package Cache
107 key: yarn-packages-{{ checksum "docs/yarn.lock" }}
108
109 - run:
110 command: yarn install
111 working_directory: docs
112 - run:
113 command: ./node_modules/.bin/gatsby build
114 working_directory: docs
115
116 - save_cache:
117 name: Save Yarn Package Cache
118 key: yarn-packages-{{ checksum "docs/yarn.lock" }}
119 paths:
120 - ~/.cache/yarn
121
122workflows:
123 version: 2
124 test_all:
125 jobs:
126 - core
127 - ios
128 - js
129 - android
130 - docs
131