-
Notifications
You must be signed in to change notification settings - Fork 122
/
.gitlab-ci.yml
48 lines (46 loc) · 1.51 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
.build_template: &build_template
tags:
- docker
- linux_x86
except:
- tags # Don't run CI for release-tags
script:
- python3 -m venv venv
- source venv/bin/activate
- pip install --upgrade pip
- pip install -e .[cu118] --extra-index-url https://download.pytorch.org/whl/cu118 --prefer-binary
- bonito --version # Minimal test that bonito has been built correctly
- python -m unittest discover
build_bonito:
stage: build
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:${PYTHON_VERSION}
variables:
PYTHON_VERSION: "3.10"
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11"]
<<: *build_template
sre-test:
image: ${TRIGGER_IMAGE}
stage: test
when: manual
dependencies: []
variables:
GIT_STRATEGY: none
script:
- echo ${CI_COMMIT_TITLE}
- |
curl -i --header "Content-Type: application/json" \
--request POST \
--data '{
"key": "'${MLHUB_TRIGGER_KEY}'",
"job_name": "Bonito SRE: '${CI_COMMIT_REF_NAME}' - '"$CI_COMMIT_TITLE"' ",
"script_parameters": {
"bonito_version":"'${CI_COMMIT_SHA}'",
"sre_output":"'${SRE_OUTPUT_ROOT}'/'${CI_COMMIT_SHA}'/",
"validation_set_path":"'${SRE_OUTPUT_ROOT}'/validation_sets",
"validation_data_type":"prom"
}
}' \
${MLHUB_TRIGGER_URL}