-
-
Notifications
You must be signed in to change notification settings - Fork 915
/
Copy pathconfig.yml
146 lines (130 loc) · 3.11 KB
/
config.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: iodide/pyodide-env:0.3.1
jobs:
build:
<<: *defaults
steps:
- checkout
- run:
name: lint
command: |
make lint
- restore_cache:
keys:
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v14-
- run:
name: build
no_output_timeout: 1200
command: |
ccache -z
make
ccache -s
- run:
name: check-size
command: ls -lh build/
- save_cache:
paths:
- ./emsdk/emsdk
- ~/.ccache
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}-v14-{{ .BuildNum }}
- persist_to_workspace:
root: .
paths:
- ./build
- ./cpython/build/3.7.0/host
- store_artifacts:
path: /home/circleci/repo/build/
test-firefox:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: test
command: |
pytest test pyodide_build -v -k firefox
test-chrome:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: test
command: |
pytest test pyodide_build -v -k chrome
test-python:
<<: *defaults
steps:
- checkout
- run:
name: deps
command: |
sudo pip install pytest-cov
- run:
name: test
command: |
pytest test pyodide_build -v -k 'not (chrome or firefox)' --cov=pyodide_build --cov=pyodide
benchmark:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: benchmark
command: |
python benchmark/benchmark.py cpython/build/3.7.0/host/bin/python3 build/benchmarks.json
- store_artifacts:
path: /home/circleci/repo/build/benchmarks.json
deploy:
docker:
- image: cibuilds/github:0.10
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Deploy Github Releases
command: |
pushd build
tar cjf ../pyodide-build-${CIRCLE_TAG}.tar.bz2 *
popd
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -delete "${CIRCLE_TAG}" ./pyodide-build-${CIRCLE_TAG}.tar.bz2
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- test-chrome:
requires:
- build
- test-firefox:
requires:
- build
filters:
tags:
only: /.*/
- test-python:
filters:
tags:
only: /.*/
- benchmark:
requires:
- build
- deploy:
requires:
- test-firefox
- test-python
filters:
branches:
ignore: /.*/
tags:
only: /^\d+\.\d+\.\d+$/