-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
128 lines (123 loc) · 4.11 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
variables:
CONTAINER_REG:
value: registry.gams.com/devel
description: "URL to the container registry"
apigenerate:
stage: build
tags: [linux]
image:
name: $CONTAINER_REG/gdx/leg/builder-gdx:latest
entrypoint: [ "" ]
script:
- echo "This job generates api files for wrp library on leg"
- python3 src/mkapi.py --apidef `pwd`/tests/wrptestapi.yaml --outputpath tests/wrptest/
artifacts:
name: apiwrptest
expire_in: 2 hours
paths: [ tests/wrptest/* ]
test-leg:
stage: test
when: on_success
dependencies: [apigenerate]
tags: [linux]
image:
name: $CONTAINER_REG/machines/leg/builder-full:latest
entrypoint: [""]
script:
- echo "Preaparing environment for python on leg"
- source /etc/profile.d/legbuilder.sh
- eval "$($MINICONDA shell.bash hook)"
- conda create -y -n wrptest-env-3.8 python=3.8
- conda activate wrptest-env-3.8
- conda install -y -c conda-forge swig=4.2.1
- echo "Building tests for apigenerated files on leg"
- export GSYS=leg
- export GCIA=lex
- cd tests
- make
- echo "This job test apigenerated files on leg"
- OSTYPE=linux ./apiwrappertest.sh
artifacts:
name: wrptest-leg
expire_in: 2 hours
paths: [ tests/wrptest/* ]
test-wei:
stage: test
when: on_success
tags: [windows]
dependencies: [apigenerate]
image:
name: $CONTAINER_REG/machines/wei/builder-full:latest
script:
- echo "Building tests for apigenerated files on wei"
- conda create -y -n wrptest-env-3.8 python=3.8
- conda env list
- conda activate wrptest-env-3.8
- $env:Path = "C:\Miniconda\envs\wrptest-env-3.8;C:\Miniconda\envs\wrptest-env-3.8\Scripts;" + $env:Path
- python --version
- which python
- python -m pip install --force-reinstall -v "swig==4.2.1"
- which swig
- cp tests/* tests/wrptest/
- cp include/gamsglobals.* tests/wrptest/
- cp include/gclgms.h tests/wrptest/
- $env:GSYS = "wei"
- $env:GCIA = "wex"
- cd tests
- make
- cd wrptest
- csc.exe /out:testercs.exe /platform:x64 testercs.cs c_wrpcs.cs gamsglobals.cs
- vbc.exe /out:testervbnet.exe /platform:x64 testervbnet.vb c_wrpvbnet.vb gamsglobals.vb
- echo "This job test apigenerated files on wei"
- $env:Path = "C:\builds\devel\apigenerator\tests\wrptest;" + $env:Path
- $env:OSTYPE = "windows"
- cd ..
- sh apiwrappertest.sh
artifacts:
name: wrptest-wei
expire_in: 2 hours
paths: [ tests/wrptest/* ]
test-deg:
stage: test
when: on_success
dependencies: [apigenerate]
tags: [macos]
script:
- echo "Preaparing environment for python on deg"
- eval "$($MINICONDA shell.bash hook)"
- conda create -y -n wrptest-env-3.8 python=3.8
- conda activate wrptest-env-3.8
- conda install -y -c conda-forge swig=4.2.1
- echo "Building tests for apigenerated files on deg"
- export GSYS=deg
- export GCIA=dex
- cd tests
- make
- echo "This job test apigenerated files on deg"
- OSTYPE=macos ./apiwrappertest.sh
artifacts:
name: wrptest-deg
expire_in: 2 hours
paths: [ tests/wrptest/* ]
test-dac:
stage: test
when: on_success
dependencies: [apigenerate]
tags: [macos-arm64]
script:
- echo "Preaparing environment for python on dac"
- eval "$($MINICONDA shell.bash hook)"
- conda create -y -n wrptest-env-3.8 python=3.8
- conda activate wrptest-env-3.8
- conda install -y -c conda-forge swig=4.2.1
- echo "Building tests for apigenerated files on dac"
- export GSYS=dac
- export GCIA=dax
- cd tests
- make
- echo "This job test apigenerated files on dac"
- OSTYPE=macos ./apiwrappertest.sh
artifacts:
name: wrptest-dac
expire_in: 2 hours
paths: [ tests/wrptest/* ]