-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtrain.yaml
70 lines (64 loc) · 2.24 KB
/
train.yaml
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
train_version: 1.0
tools:
- perl5/core/5.20
- python/core/3.10.11
- msde/traincli/prod
- msde/artifactory-eng-tools/prod
setup_venv_jenkins: &setup_venv_jenkins
- if [ -n "$TRAIN_CI" ]; then export HOME=/var/tmp/${USER} && mkdir -p ${HOME}; fi
- if [ -n "$TRAIN_CI" ]; then unset http_proxy; fi
- if [ -n "$TRAIN_CI" ]; then unset https_proxy; fi
- if [ -n "$TRAIN_CI" ]; then setup_user -cli pypi; fi
setup_venv: &setup_venv
- *setup_venv_jenkins
- python -m venv venv
- . venv/bin/activate
- python -m pip install --upgrade pip
- pip install pip-tools --quiet
- python -m pip install pip setuptools wheel morganstanley-generate-train-metadata -U
test_setup: &test_setup
- *setup_venv
- pip install .
build_types:
- build_type:
name: quick
build:
- toolchain: rhel7
- script:
command:
- make install
- train build --type pypi
- build_type:
name: release
build:
- toolchain: rhel7
- script:
command:
- make install
- train build --type pypi
- build_type:
name: "pypi"
build:
- toolchain: [rhel7, rhel8]
- script:
command:
- rm -rf artifactory_build
- mkdir -p artifactory_build/aquilon_protocols
- find protofiles/ -name \*.proto -print0 | xargs -0 -n1 /ms/dist/fsf/PROJ/protoc/3.21.6-9/bin/protoc --proto_path=protofiles/ --python_out=artifactory_build/aquilon_protocols/ --pyi_out=artifactory_build/aquilon_protocols/
- cp -a protofiles artifactory_build/aquilon_protocols/
- cp python/__init__.py artifactory_build/aquilon_protocols/
- '[ ! -z "${TRAIN_RELEASE_BUILD_NAME}" ] && echo ${TRAIN_RELEASE_BUILD_NAME} > VERSION.txt'
- *setup_venv
- rm -rf ../packages/pypi
- python -m pip install build && python -m build -o ../packages/pypi
- generate-train-metadata --library --name morganstanley-aquilon-protocols
- deactivate
test_types:
- test_type:
name: unit
default: true
test:
- script:
- make test
- *test_setup
- python -m unittest discover -v