/
config.yml
94 lines (88 loc) · 2.9 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
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# use the same build image as we use for metabuildbot
- image: buildbot/metabbotcfg
working_directory: ~/repo
environment:
# Needed to ignore specific warns, otherwise, it'll warn a generic message
SQLALCHEMY_WARN_20: 1
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- 37-dependencies-{{ checksum "requirements-ci.txt" }}-{{ checksum "requirements-cidocs.txt" }}
# fallback to using the latest cache if no exact match is found
- 37-dependencies-
- run:
name: install dependencies
command: |
env
python3.8 -m venv .venv
. .venv/bin/activate
pip install -U pip setuptools wheel
pip install -r requirements-ci.txt
pip install -r requirements-cidocs.txt
pip install pyinstaller
- save_cache:
paths:
- .venv
key: 3-dependencies-{{ checksum "requirements-ci.txt" }}-{{ checksum "requirements-cidocs.txt" }}
- run:
name: run tests
command: |
. .venv/bin/activate
make docs-release
make tarballs
# Note that installing www/react-base depends on frontend_deps target being built, which is
# a dependency of the tarballs target.
pip install -e www/react-base
pyinstaller pyinstaller/buildbot-worker.spec
# we test the new generated binary with the global virtualenv
SANDBOXED_WORKER_PATH=`pwd`/dist/buildbot-worker trial --reporter=text --rterrors buildbot.test.integration.interop
- persist_to_workspace:
root: dist
paths: .
- store_artifacts:
path: master/docs/_build/html/
destination: docs
- store_artifacts:
path: dist
destination: dist
# publish pipeline that is run on tags
publish:
docker:
# image that can push to github
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: dist
- run:
name: upload binaries to github release
command: |
env
# rename the buildbot-worker pyinstaller binary
mv dist/buildbot-worker dist/buildbot-worker-linux-amd64-$CIRCLE_TAG.bin
# upload the github release binary
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG dist/
workflows:
version: 2
build-deploy:
jobs:
- build:
filters:
tags:
only: /v.*/
- publish:
requires: [build]
filters:
tags:
only: /v.*/
branches:
ignore: /.*/