1+ build : &build
2+ working_directory : /mnt/crate
3+ steps :
4+ - checkout
5+ - attach_workspace :
6+ at : " ."
7+ - restore_cache :
8+ keys :
9+ - cargo-v1-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}
10+ - run :
11+ name : Print version information
12+ command : rustc --version; cargo --version; python -V;
13+ - run :
14+ name : Build 35
15+ command : |
16+ pip install -r requirement-dev.txt && python compile.py build
17+ - run :
18+ name : Test 35
19+ command : |
20+ cp build/lib/py_sourcemap/*.so py_sourcemap/ && \
21+ nosetests
22+ - run :
23+ name : Prune the output files
24+ command : |
25+ for file in target/release/* target/release/.??*; do
26+ [ -d $file -o ! -x $file ] && rm -r $file
27+ done
28+ - persist_to_workspace :
29+ root : " ."
30+ paths :
31+ - ./*
32+
33+ deploy : &deploy
34+ docker :
35+ - image : tsub/ghr:latest
36+ working_directory : /mnt/crate
37+ steps :
38+ - attach_workspace :
39+ at : " ."
40+ - run :
41+ name : ' Deploy to Github Release'
42+ command : |
43+ export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
44+ ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
45+
146version : 2
247jobs :
348 cargo_fetch :
@@ -25,128 +70,36 @@ jobs:
2570 - /usr/local/cargo/registry
2671 - /usr/local/cargo/git
2772 build35 :
73+ << : *build
2874 docker :
2975 - image : broooooklyn/rust-python:3.5
30- working_directory : /mnt/crate
31- steps :
32- - checkout
33- - attach_workspace :
34- at : " ."
35- - restore_cache :
36- keys :
37- - cargo-v1-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}
38- - run :
39- name : Print version information
40- command : rustc --version; cargo --version
41- - run :
42- name : Build 35
43- command : |
44- python compile.py build
45- - run :
46- name : Prune the output files
47- command : |
48- for file in target/release/* target/release/.??*; do
49- [ -d $file -o ! -x $file ] && rm -r $file
50- done
51- - persist_to_workspace :
52- root : " ."
53- paths :
54- - ./*
76+
5577 build36 :
78+ << : *build
5679 docker :
5780 - image : broooooklyn/rust-python:3.6
58- working_directory : /mnt/crate
59- steps :
60- - checkout
61- - attach_workspace :
62- at : " ."
63- - restore_cache :
64- keys :
65- - cargo-v1-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}
66- - run :
67- name : Print version information
68- command : rustc --version; cargo --version
69- - run :
70- name : Build 36
71- command : |
72- python compile.py build
73- - run :
74- name : Prune the output files
75- command : |
76- for file in target/release/* target/release/.??*; do
77- [ -d $file -o ! -x $file ] && rm -r $file
78- done
79- - persist_to_workspace :
80- root : " ."
81- paths :
82- - ./*
81+
8382 build37 :
83+ << : *build
8484 docker :
8585 - image : broooooklyn/rust-python:3.7
86- working_directory : /mnt/crate
87- steps :
88- - checkout
89- - attach_workspace :
90- at : " ."
91- - restore_cache :
92- keys :
93- - cargo-v1-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}
94- - run :
95- name : Print version information
96- command : rustc --version; cargo --version
97- - run :
98- name : Build 37
99- command : |
100- python compile.py build
101- - run :
102- name : Prune the output files
103- command : |
104- for file in target/release/* target/release/.??*; do
105- [ -d $file -o ! -x $file ] && rm -r $file
106- done
107- - persist_to_workspace :
108- root : " ."
109- paths :
110- - ./*
11186
112- deploy35 :
113- docker :
114- - image : tsub/ghr:latest
115- working_directory : /mnt/crate
116- steps :
117- - attach_workspace :
118- at : " ."
119- - run :
120- name : ' Deploy to Github Release'
121- command : |
122- export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
123- ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
87+ deploy35 : *deploy
12488
125- deploy36 :
126- docker :
127- - image : tsub/ghr:latest
128- working_directory : /mnt/crate
129- steps :
130- - attach_workspace :
131- at : " ."
132- - run :
133- name : ' Deploy to Github Release'
134- command : |
135- export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
136- ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
89+ deploy36 : *deploy
90+
91+ deploy37 : *deploy
13792
138- deploy37 :
93+ pip_deploy :
13994 docker :
140- - image : tsub/ghr :latest
95+ - image : broooooklyn/rust-python :latest
14196 working_directory : /mnt/crate
14297 steps :
14398 - attach_workspace :
14499 at : " ."
145100 - run :
146101 name : ' Deploy to Github Release'
147- command : |
148- export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
149- ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
102+ command : pip install -r requirement-dev.txt && make release
150103
151104 nightly :
152105 machine : true
@@ -182,6 +135,8 @@ workflows:
182135 filters :
183136 tags :
184137 only : /.*/
138+ branches :
139+ only : master
185140 - build36 :
186141 requires :
187142 - cargo_fetch
@@ -191,6 +146,8 @@ workflows:
191146 filters :
192147 tags :
193148 only : /.*/
149+ branches :
150+ only : master
194151 - build37 :
195152 requires :
196153 - cargo_fetch
@@ -200,3 +157,15 @@ workflows:
200157 filters :
201158 tags :
202159 only : /.*/
160+ branches :
161+ only : master
162+ - pip_deploy :
163+ requires :
164+ - deploy35
165+ - deploy36
166+ - deploy37
167+ filters :
168+ tags :
169+ only : /.*/
170+ branches :
171+ only : master
0 commit comments