forked from modelica-3rdparty/Buildings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
160 lines (147 loc) · 8.78 KB
/
.travis.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
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
os: Linux
dist: focal
language: python
python:
- "3.8"
branches:
only:
- master
- /^maint_.*$/
- release
cache:
pip: true
directories:
- .git/lfs
notifications:
email: false
git:
depth: 10
lfs_skip_smudge: true
services:
- docker
- xvfb
env:
global:
- BUILDINGSPY_VERSION=BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c
- OMC_VERSION=ubuntu-2004-omc:1.20.0_dev-314-g3033f43-1
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.40
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64
- ENERGYPLUS_VERSION=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
- MODELICA_JSON_VERSION=6d950c3592fa021aa914ba4ff34a67cbb69962c6
- MODELICA_JSON_HOME=${TRAVIS_BUILD_DIR}/modelica-json
jobs:
- TEST_ARG="make test-cdl-conformance"
- TEST_ARG="make test-energyplus-validations test-dymola-spawn-spaces test-openmodelica-spawn-spaces" #target test-optimica-spawn-fmu removed as it requires a local installation of OCT
- TEST_ARG="make test-bestest"
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.BESTEST\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.BESTEST\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.BESTEST\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.{Initialization,LBNL_71T,TestConditionalConstructions}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.{Initialization,LBNL_71T,TestConditionalConstructions}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.Detailed.Validation.{Initialization,LBNL_71T,TestConditionalConstructions}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.Detailed.FLEXLAB\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.Detailed.FLEXLAB\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.Detailed.FLEXLAB\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Applications,Experimental}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Applications,Experimental}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Applications,Experimental}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Examples,FMI}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Examples,FMI}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Examples,FMI}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.FixedResistances\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.FixedResistances\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.FixedResistances\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Interfaces}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Interfaces}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Interfaces}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Electrical\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Electrical\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Electrical\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Airflow,BoundaryConditions,Controls}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Airflow,BoundaryConditions,Controls}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Airflow,BoundaryConditions,Controls}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.HeatTransfer\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.HeatTransfer\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.HeatTransfer\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Obsolete,Occupants,Media}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Obsolete,Occupants,Media}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Obsolete,Occupants,Media}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Utilities\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Utilities\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Utilities\""
before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* || "$TEST_ARG" == *spawn-portability* ]]; then
docker pull "$DOCKER_USERNAME"/${DYMOLA_VERSION};
cp Buildings/Resources/Scripts/travis/dymola/dymola $HOME/bin/;
fi;
- if [[ "$TEST_ARG" == *test-optimica* ]]; then
docker pull "$DOCKER_USERNAME"/${OPTIMICA_VERSION};
cp Buildings/Resources/Scripts/travis/optimica/jm_ipython.sh $HOME/bin/jm_ipython.sh;
fi;
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.6.0/${ENERGYPLUS_VERSION}.tar.gz;
tar xzf ${ENERGYPLUS_VERSION}.tar.gz;
rm ${ENERGYPLUS_VERSION}.tar.gz;
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_VERSION}";
fi;
- if [[ "$TEST_ARG" == *test-cdl-conformance* ]]; then
wget --no-verbose https://github.com/lbl-srg/modelica-json/archive/${MODELICA_JSON_VERSION}.tar.gz;
tar xzf ${MODELICA_JSON_VERSION}.tar.gz;
rm ${MODELICA_JSON_VERSION}.tar.gz;
mv modelica-json-${MODELICA_JSON_VERSION} ${MODELICA_JSON_HOME};
cd ${MODELICA_JSON_HOME};
make install-node-packages;
make compile;
cd -;
echo "Installed modelica-json in ${MODELICA_JSON_HOME}";
fi;
- if [[ "$TEST_ARG" == *test-openmodelica* ]]; then
docker pull "$DOCKER_USERNAME"/${OMC_VERSION};
cp Buildings/Resources/Scripts/travis/omc/omc $HOME/bin/omc;
fi;
# Install dependencies
# For sphinx, we need to install specific package versions, otherwise
# the html output may have small formatting differences which causes
# the test to fail
install:
- git lfs pull
- pip3 install --upgrade pip wheel
- pip3 install --only-binary=numpy,scipy,matplotlib numpy==1.21.4 scipy==1.7.3 matplotlib==3.5.1
- pip3 install git+https://github.com/lbl-srg/${BUILDINGSPY_VERSION}
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
export PATH=${PATH}:${TRAVIS_BUILD_DIR}/${ENERGYPLUS_VERSION};
pip3 install pandas==1.3.5;
fi;
- if [[ "$TEST_ARG" == *EnergyPlus_9_6_0* ]] || [[ "$TEST_ARG" == *Buildings.{Applications,Experimental}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then
echo "Installing Spawn binaries";
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only;
fi;
# Execute tests
script:
- (cd Buildings/Resources/Scripts/travis && travis_wait 90 $TEST_ARG)
after_failure:
- |
for ff in `find Buildings -maxdepth 1 -name '*.log'`; do
echo "*** Content of $ff"
cat $ff
echo "*** End of $ff"
done