-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.gitlab-ci.yml
105 lines (98 loc) · 2.17 KB
/
.gitlab-ci.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
stages:
- lint
- build_packages
- test_packages
- mirror
code_lint:
stage: lint
image: registry.gitlab.com/opencv-ai/model-benchmark/lint:py375
script:
- cd $CI_PROJECT_DIR
- python3.7 -V
- echo ${CI_COMMIT_SHA}
- SKIP=prettier pre-commit run -a
artifacts:
paths:
- "*"
exclude:
- .cache
expire_in: 1 day
when: on_failure
interruptible: true
except:
- main
- develop
tags:
- lint
build_packages:
stage: build_packages
image: registry.gitlab.com/opencv-ai/model-benchmark/cpu:0.3
script:
- ./ci/build_packages.sh
artifacts:
paths:
- "wheel_packages/"
expose_as: "wheel_packages"
expire_in: 1 week
when: always
tags:
- build
test_models_gen2_develop_commit:
variables:
PYTHONPATH: $CI_PROJECT_DIR
stage: test_packages
before_script:
- cd $CI_PROJECT_DIR
script:
- ./ci/test_package.sh
tags:
- oak
except:
- schedules
test_models_gen2_develop_latest:
extends: test_models_gen2_develop_commit
variables:
LATEST_DEPTHAI: "true"
allow_failure: true
test_models_gen2_develop_commit_schedule:
variables:
PYTHONPATH: $CI_PROJECT_DIR
stage: test_packages
before_script:
- cd $CI_PROJECT_DIR
script:
- ci/test_package.sh
tags:
- oak
only:
- schedules
test_models_gen2_develop_latest_schedule:
extends: test_models_gen2_develop_commit_schedule
variables:
LATEST_DEPTHAI: "true"
allow_failure: true
mirror_main:
stage: mirror
image: registry.gitlab.com/opencv-ai/oak-model-samples/mirror-cd
variables:
GIT_CHECKOUT: "false"
GIT_STRATEGY: "clone"
before_script:
- mkdir -m 700 -p ~/.ssh
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- eval `ssh-agent -s`
- chmod 600 ${GITHUB_SYNC_KEY}
- ssh-add -k ${GITHUB_SYNC_KEY}
script:
- git fetch origin ${CI_BUILD_REF_NAME}
- git checkout ${CI_BUILD_REF_NAME}
- git lfs fetch --all
- git remote set-url origin [email protected]:opencv-ai/oak-model-samples.git
- git lfs push --all origin ${CI_BUILD_REF_NAME}
- git push -u origin ${CI_BUILD_REF_NAME}
tags:
- build
only:
- main
except:
- schedules