-
Notifications
You must be signed in to change notification settings - Fork 1.2k
266 lines (265 loc) · 14.4 KB
/
ci.yml
File metadata and controls
266 lines (265 loc) · 14.4 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
name: CI workflow
on:
push:
branches:
- master
pull_request_target:
jobs:
unittests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2
- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.0.0
with:
auto-update-conda: true
python-version: 3.7
- name: sanity-check
shell: bash -l {0}
run: |
conda env create -n gluon_cv_lint -f ./tests/pylint.yml
conda env update -n gluon-cv-lint -f ./tests/pylint.yml --prune
conda activate gluon-cv-lint
conda list
make clean
make pylint
- name: unit-test
shell: bash -l {0}
run: |
conda env create -n gluon_cv_py3_test -f tests/py3_mxnet_ci.yml
conda env update -n gluon_cv_py3_test -f tests/py3_mxnet_ci.yml --prune
conda activate gluon_cv_py3_test
conda list
export CUDA_VISIBLE_DEVICES=0
export KMP_DUPLICATE_LIB_OK=TRUE
make clean
pip install --upgrade --force-reinstall --no-deps .
env
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
export MPLBACKEND=Agg
export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
export TINY_COCO=~/.mxnet/datasets/tiny_coco
export TINY_MOTORBIKE=~/.mxnet/datasets/tiny_motorbike
mkdir -p $TINY_COCO/annotations
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/sub_val.zip --output sub_val.zip
unzip -q sub_val.zip -d $TINY_COCO
mv $TINY_COCO/sub_val $TINY_COCO/val2017
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/mini_coco/instances_val2017_tiny.json --output instances_val2017_tiny.json
mv instances_val2017_tiny.json $TINY_COCO/annotations
curl -s https://gluoncv-ci.s3-us-west-2.amazonaws.com/tiny_motorbike.zip --output tiny_motorbike.zip
unzip -q tiny_motorbike.zip -d $TINY_MOTORBIKE
nosetests --with-timer --timer-ok 5 --timer-warning 20 -x --with-coverage --cover-package gluoncv -v tests/unittests
model_zoo_mxnet:
needs: unittests
runs-on: ubuntu-latest
steps:
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2
- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Install dependencies
run: |
pip install --upgrade --force-reinstall --no-deps .
pip install boto3
- name: Test model_zoo_mxnet on AWS Batch(For push)
shell: bash -l {0}
if: ${{ github.event_name == 'push' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-ModelZooMxnet-${{ github.ref }} \
--source-ref ${{ github.ref }} \
--work-dir . \
--remote https://github.com/${{ github.repository }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/model_zoo" \
--wait
- name: Test model_zoo_mxnet on AWS Batch(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-ModelZooMxnet-PR#${{ github.event.number }} \
--source-ref ${{ github.event.pull_request.head.ref }} \
--work-dir . \
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/model_zoo" \
--wait
model_zoo_torch:
needs: unittests
runs-on: ubuntu-latest
steps:
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2
- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Install dependencies
run: |
pip install --upgrade --force-reinstall --no-deps .
pip install boto3
- name: Test model_zoo_torch on AWS Batch(For push)
shell: bash -l {0}
if: ${{ github.event_name == 'push' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-ModelZooTorch-${{ github.ref }} \
--source-ref ${{ github.ref }} \
--work-dir . \
--remote https://github.com/${{ github.repository }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv/torch tests/model_zoo_torch" \
--wait
- name: Test model_zoo_torch on AWS Batch(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-ModelZooTorch-PR#${{ github.event.number }} \
--source-ref ${{ github.event.pull_request.head.ref }} \
--work-dir . \
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv/torch tests/model_zoo_torch" \
--wait
auto:
needs: unittests
runs-on: ubuntu-latest
steps:
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2
- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Install dependencies
run: |
pip install --upgrade --force-reinstall --no-deps .
pip install boto3
- name: Test model_zoo_torch on AWS Batch(For push)
shell: bash -l {0}
if: ${{ github.event_name == 'push' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-Auto-${{ github.ref }} \
--source-ref ${{ github.ref }} \
--work-dir . \
--remote https://github.com/${{ github.repository }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/auto" \
--wait
- name: Test model_zoo_torch on AWS Batch(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-Auto-PR#${{ github.event.number }} \
--source-ref ${{ github.event.pull_request.head.ref }} \
--work-dir . \
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
--command "chmod +x ./.github/workflows/gpu_test.sh && ./.github/workflows/gpu_test.sh gluoncv tests/auto" \
--wait
build-docs:
needs: [unittests, model_zoo_mxnet, model_zoo_torch, auto]
runs-on: ubuntu-latest
steps:
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2
- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.GLUONCV_DEV_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.GLUONCV_DEV_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Install dependencies
run: |
pip install --upgrade --force-reinstall --no-deps .
pip install boto3
- name: Set SHA outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Build docs on AWS Batch(For push)
shell: bash -l {0}
if: ${{ github.event_name == 'push' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-BuildDocs-${{ github.ref }} \
--source-ref ${{ github.ref }} \
--work-dir . \
--remote https://github.com/${{ github.repository }} \
--command "chmod +x ./.github/workflows/build_docs.sh && ./.github/workflows/build_docs.sh ${{ github.ref }} ${{ steps.vars.outputs.sha_short }} ${{ github.repository }} ${{ github.event.number }}" \
--wait
- name: Build docs on AWS Batch(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
echo "Start submitting job"
python ./tools/batch/submit-job.py --region us-east-1 \
--job-type p3.2x \
--name GluonCV-GPU-BuildDocs-PR#${{ github.event.number }} \
--source-ref ${{ github.event.pull_request.head.ref }} \
--work-dir . \
--remote https://github.com/${{ github.event.pull_request.head.repo.full_name }} \
--command "chmod +x ./.github/workflows/build_docs.sh && ./.github/workflows/build_docs.sh ${{ github.event.pull_request.head.ref }} ${{ steps.vars.outputs.sha_short }} ${{ github.event.pull_request.head.repo.full_name }} ${{ github.event.number }} " \
--wait
- name: Comment on PR
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: peter-evans/create-or-update-comment@v1.4.3
with:
issue-number: ${{ github.event.number }}
body: |
Job PR-${{ github.event.number }}-${{ steps.vars.outputs.sha_short }} is done.
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/PR-${{ github.event.number }}/${{ steps.vars.outputs.sha_short }}/index.html