/
config.yml
152 lines (148 loc) · 5.21 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
147
148
149
150
151
152
version: 2
jobs:
build-linux:
working_directory: ~/please
docker:
- image: thoughtmachine/please_ubuntu:20190107
environment:
PLZ_ARGS: "-p --profile ci -o buildconfig.ci:true"
steps:
- checkout
- restore_cache:
key: bootstrap-linux-main-{{ checksum "bootstrap.sh" }}
- restore_cache:
key: go-linux-main-{{ checksum "third_party/go/BUILD" }}
- restore_cache:
key: python-linux-main-{{ checksum "third_party/python/BUILD" }}
- run:
name: Bootstrap & Build
command: ./bootstrap.sh --exclude no_circleci --test_results_file plz-out/results/please/test_results.xml
- store_test_results:
path: plz-out/results
- run:
name: Lint
command: plz-out/bin/src/please lint
- run:
name: Package
command: ./plz-out/bin/src/please build //package:all //tools/misc:gen_release --exclude asc -p
- persist_to_workspace:
root: plz-out/pkg
paths:
- linux_amd64/please_*.tar.*
- gen_release.pex
- release_signer
- store_artifacts:
path: plz-out/log
- save_cache:
key: bootstrap-linux-main-{{ checksum "bootstrap.sh" }}
paths: [ ".bootstrap" ]
- save_cache:
key: go-linux-main-{{ checksum "third_party/go/BUILD" }}
paths: [ ".plz-cache/third_party/go" ]
- save_cache:
key: python-linux-main-{{ checksum "third_party/python/BUILD" }}
paths: [ ".plz-cache/third_party/python" ]
build-linux-alt:
working_directory: ~/please
docker:
- image: thoughtmachine/please_ubuntu_alt:20190107
environment:
PLZ_ARGS: "-p --profile ci"
PLZ_COVER: "cover"
steps:
- checkout
- restore_cache:
key: bootstrap-linux-alt-{{ checksum "bootstrap.sh" }}
- restore_cache:
key: go-linux-alt-{{ checksum "third_party/go/BUILD" }}
- restore_cache:
key: python-linux-alt-{{ checksum "third_party/python/BUILD" }}
- run:
name: Bootstrap & Build
command: ./bootstrap.sh --exclude no_circleci --test_results_file plz-out/results/please/test_results.xml
- store_test_results:
path: plz-out/results
- store_artifacts:
path: plz-out/log
- save_cache:
key: bootstrap-linux-alt-{{ checksum "bootstrap.sh" }}
paths: [ ".bootstrap" ]
- save_cache:
key: go-linux-alt-{{ checksum "third_party/go/BUILD" }}
paths: [ ".plz-cache/third_party/go" ]
- save_cache:
key: python-linux-alt-{{ checksum "third_party/python/BUILD" }}
paths: [ ".plz-cache/third_party/python" ]
build-darwin:
macos:
xcode: "9.0"
environment:
PLZ_ARGS: "-p --profile ci --exclude pip"
HOMEBREW_LOGS: "~/homebrew-logs"
HOMEBREW_TEMP: "~/homebrew-temp"
steps:
- checkout
- restore_cache:
key: bootstrap-darwin-go111-{{ checksum "bootstrap.sh" }}
- restore_cache:
key: go-darwin-go111-{{ checksum "third_party/go/BUILD" }}
- restore_cache:
key: python-darwin-py370-{{ checksum "third_party/python/BUILD" }}
- restore_cache:
key: homebrew-v1
- run:
name: Install deps
command: brew install go nasm pkg-config && brew upgrade python
- run:
name: Bootstrap & Build
command: ./bootstrap.sh --exclude no_circleci --test_results_file plz-out/results/please/test_results.xml
- store_test_results:
path: plz-out/results
- store_artifacts:
path: plz-out/log
- run:
name: Package
command: ./plz-out/bin/src/please build //package:all --exclude asc --exclude deb -p
- persist_to_workspace:
root: plz-out/pkg
paths:
- darwin_amd64/please_*.tar.*
- store_artifacts:
path: /tmp/artifacts
- save_cache:
key: homebrew-v1
paths: [ "/usr/local/Homebrew" ]
- save_cache:
key: bootstrap-darwin-go111-{{ checksum "bootstrap.sh" }}
paths: [ ".bootstrap" ]
- save_cache:
key: go-darwin-go111-{{ checksum "third_party/go/BUILD" }}
paths: [ ".plz-cache/third_party/go" ]
- save_cache:
key: python-darwin-py370-{{ checksum "third_party/python/BUILD" }}
paths: [ ".plz-cache/third_party/python" ]
release:
docker:
- image: thoughtmachine/please_ubuntu:latest
steps:
- attach_workspace:
at: /tmp/workspace
- run: /tmp/workspace/gen_release.pex --github_token $GITHUB_TOKEN --signer /tmp/workspace/release_signer /tmp/workspace/linux_amd64/* /tmp/workspace/darwin_amd64/*
workflows:
version: 2
build-all:
jobs:
- build-linux
- build-linux-alt
- build-darwin:
requires:
- build-linux
- build-linux-alt
- release:
requires:
- build-linux
- build-linux-alt
- build-darwin
filters:
branches:
only: master