Skip to content

Commit 7233b21

Browse files
Merge pull request #4176 from karthikeyad-pnnl/issue2180_BoilerPlant_Nov23
Issue2180 boiler plant nov23
2 parents 1a5959f + 2c427b2 commit 7233b21

7,920 files changed

Lines changed: 498866 additions & 233604 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/formatting.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# Skip if the commit message contains "ci skip"
2525
if: "!contains(github.event.head_commit.message, 'ci skip')"
2626

27-
runs-on: ubuntu-20.04
27+
runs-on: ubuntu-24.04
2828

2929
steps:
3030
# Checks-out repository under $GITHUB_WORKSPACE, so job can access it
@@ -33,14 +33,14 @@ jobs:
3333

3434
- uses: actions/setup-python@v4
3535
with:
36-
python-version: '3.8.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
36+
python-version: '3.10.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
3737
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
3838

3939
- name: "Install pip"
4040
run: pip3 install --upgrade pip wheel
4141

4242
- name: "Install BuildingsPy"
43-
run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c
43+
run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@v5.2.0
4444

4545
- name: Check for UTF-8 BOM
4646
run : |
@@ -55,9 +55,11 @@ jobs:
5555
- name: "Test experiment setup"
5656
run : ../bin/runUnitTests.py --validate-experiment-setup
5757

58-
- name: "Test if package.order are correct"
58+
- name: "Test if package.order are correct, and revert order in UsersGuide"
5959
run : |
6060
python -c 'import buildingspy.development.refactor as r; r.write_package_order(".", recursive=True)'
61+
git checkout UsersGuide/ReleaseNotes/package.order
62+
git checkout UsersGuide/package.order
6163
git diff --exit-code .
6264
6365
- name: "Verify files for invalid strings"
@@ -119,3 +121,17 @@ jobs:
119121
chmod u=rw,og=rw $ff
120122
done
121123
done
124+
125+
test-checksum:
126+
# Skip if the commit message contains "ci skip"
127+
if: "!contains(github.event.head_commit.message, 'ci skip')"
128+
129+
runs-on: ubuntu-22.04
130+
131+
steps:
132+
# Checks-out repository under $GITHUB_WORKSPACE, so job can access it
133+
- name: Checkout code
134+
uses: actions/checkout@v3
135+
136+
- name: Compute the checksum and check that it matches the value from the last commit
137+
run: ./Resources/Scripts/travis/templates/checkandrun.sh --checksum --skip --diffhead

.travis.yml

Lines changed: 59 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ services:
3030

3131
env:
3232
global:
33-
- BUILDINGSPY_VERSION=BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c
34-
- OMC_VERSION=ubuntu-2004-omc:1.20.0_dev-314-g3033f43-1
35-
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.40
36-
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64
37-
- ENERGYPLUS_VERSION=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
33+
- DOCKER_REPONAME=lbnlblum
34+
- BUILDINGSPY_VERSION=BuildingsPy@v5.2.0
35+
- OMC_VERSION=ubuntu-2204-omc:1.24.0-1
36+
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.55.11
37+
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2025x-x86_64_rev-1
38+
- ENERGYPLUS_9_6_0=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
39+
- ENERGYPLUS_23_1_0=EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu20.04-x86_64
3840
- MODELICA_JSON_VERSION=6d950c3592fa021aa914ba4ff34a67cbb69962c6
3941
- MODELICA_JSON_HOME=${TRAVIS_BUILD_DIR}/modelica-json
4042

4143
jobs:
4244
- TEST_ARG="make test-cdl-conformance"
43-
- 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
45+
- TEST_ARG="make test-energyplus-validations test-dymola-spawn-spaces test-openmodelica-spawn-spaces test-openmodelica-cdl" #target test-optimica-spawn-fmu removed as it requires a local installation of OCT
4446
- TEST_ARG="make test-bestest"
4547
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Air,Examples}\""
4648
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Air,Examples}\""
4749
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Air,Examples}\""
48-
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
49-
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
50-
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_9_6_0\""
50+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.EnergyPlus_24_2_0\""
51+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_24_2_0\""
52+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.EnergyPlus_24_2_0\""
5153
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
5254
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
5355
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.Detailed.{BaseClasses,Constructions,Examples}\""
@@ -63,9 +65,15 @@ env:
6365
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
6466
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
6567
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
66-
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Applications,Experimental}\""
67-
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Applications,Experimental}\""
68-
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Applications,Experimental}\""
68+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Applications\""
69+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Applications\""
70+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Applications\""
71+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\""
72+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\" SINGLEPROC=\"true\""
73+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\""
74+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.DHC.Examples\""
75+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.DHC.Examples\" SINGLEPROC=\"true\""
76+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.DHC.Examples\""
6977
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
7078
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
7179
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\""
@@ -75,9 +83,9 @@ env:
7583
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.FixedResistances\""
7684
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.FixedResistances\""
7785
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.FixedResistances\""
78-
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,Interfaces}\""
79-
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,Interfaces}\""
80-
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,Interfaces}\""
86+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,HydronicConfigurations,Interfaces}\""
87+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,HydronicConfigurations,Interfaces}\""
88+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Geothermal,HeatExchangers,HeatPumps,Humidifiers,HydronicConfigurations,Interfaces}\""
8189
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
8290
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
8391
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{MassExchangers,MixingVolumes,Movers,Sensors,SolarCollectors,Sources,Storage,Utilities}\""
@@ -96,22 +104,32 @@ env:
96104
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Utilities\""
97105
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Utilities\""
98106
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Utilities\""
107+
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Templates\""
108+
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Templates\""
109+
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Templates\""
110+
- TEST_ARG="make test-templates-dymola"
99111

100112
before_install:
101113
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
102-
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* || "$TEST_ARG" == *spawn-portability* ]]; then
103-
docker pull "$DOCKER_USERNAME"/${DYMOLA_VERSION};
114+
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-templates-dymola* || "$TEST_ARG" == *test-bestest* || "$TEST_ARG" == *spawn-portability* ]]; then
115+
docker pull "$DOCKER_REPONAME"/${DYMOLA_VERSION};
104116
cp Buildings/Resources/Scripts/travis/dymola/dymola $HOME/bin/;
105117
fi;
106-
- if [[ "$TEST_ARG" == *test-optimica* ]]; then
107-
docker pull "$DOCKER_USERNAME"/${OPTIMICA_VERSION};
118+
- if [[ "$TEST_ARG" == *test-optimica* || "$TEST_ARG" == *test-templates-optimica* ]]; then
119+
docker pull "$DOCKER_REPONAME"/${OPTIMICA_VERSION};
108120
cp Buildings/Resources/Scripts/travis/optimica/jm_ipython.sh $HOME/bin/jm_ipython.sh;
109121
fi;
122+
# The Spawn idf reference results are generated with EnergyPlus 9.6.0,
123+
# while others use a more recent EnergyPlus, hence we install both
110124
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
111-
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.6.0/${ENERGYPLUS_VERSION}.tar.gz;
112-
tar xzf ${ENERGYPLUS_VERSION}.tar.gz;
113-
rm ${ENERGYPLUS_VERSION}.tar.gz;
114-
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_VERSION}";
125+
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.6.0/${ENERGYPLUS_9_6_0}.tar.gz;
126+
tar xzf ${ENERGYPLUS_9_6_0}.tar.gz;
127+
rm ${ENERGYPLUS_9_6_0}.tar.gz;
128+
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_9_6_0}";
129+
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v23.1.0/${ENERGYPLUS_23_1_0}.tar.gz;
130+
tar xzf ${ENERGYPLUS_23_1_0}.tar.gz;
131+
rm ${ENERGYPLUS_23_1_0}.tar.gz;
132+
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_23_1_0}";
115133
fi;
116134
- if [[ "$TEST_ARG" == *test-cdl-conformance* ]]; then
117135
wget --no-verbose https://github.com/lbl-srg/modelica-json/archive/${MODELICA_JSON_VERSION}.tar.gz;
@@ -124,8 +142,8 @@ before_install:
124142
cd -;
125143
echo "Installed modelica-json in ${MODELICA_JSON_HOME}";
126144
fi;
127-
- if [[ "$TEST_ARG" == *test-openmodelica* ]]; then
128-
docker pull "$DOCKER_USERNAME"/${OMC_VERSION};
145+
- if [[ "$TEST_ARG" == *test-openmodelica* || "$TEST_ARG" == *test-templates-openmodelica* ]]; then
146+
docker pull lbnlblum/${OMC_VERSION};
129147
cp Buildings/Resources/Scripts/travis/omc/omc $HOME/bin/omc;
130148
fi;
131149

@@ -138,18 +156,30 @@ install:
138156
- pip3 install --upgrade pip wheel
139157
- pip3 install --only-binary=numpy,scipy,matplotlib numpy==1.21.4 scipy==1.7.3 matplotlib==3.5.1
140158
- pip3 install git+https://github.com/lbl-srg/${BUILDINGSPY_VERSION}
141-
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
142-
export PATH=${PATH}:${TRAVIS_BUILD_DIR}/${ENERGYPLUS_VERSION};
159+
- if [[ "$TEST_ARG" == *test-energyplus* ]] || [[ "$TEST_ARG" == *test-templates* ]]; then
160+
export ENERGYPLUS_9_6_0=${ENERGYPLUS_9_6_0};
161+
export ENERGYPLUS_23_1_0=${ENERGYPLUS_23_1_0};
143162
pip3 install pandas==1.3.5;
144163
fi;
145-
- if [[ "$TEST_ARG" == *EnergyPlus_9_6_0* ]] || [[ "$TEST_ARG" == *Buildings.{Applications,Experimental}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then
164+
- if [[ "$TEST_ARG" == *EnergyPlus_24_2_0* ]] || [[ "$TEST_ARG" == *Buildings.{Obsolete* ]] || [[ "$TEST_ARG" == *Buildings.DHC.{ETS,Loads,Networks,Plants}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then
146165
echo "Installing Spawn binaries";
147166
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only;
148167
fi;
168+
- if [[ "$TEST_ARG" == *SINGLEPROC* ]]; then
169+
export NPROC=1;
170+
else
171+
export NPROC=10;
172+
fi;
149173

150174
# Execute tests
151175
script:
152-
- (cd Buildings/Resources/Scripts/travis && travis_wait 90 $TEST_ARG)
176+
- |
177+
TRAVIS_WAIT=90
178+
if [[ "$TEST_ARG" == *test-templates* ]]; then
179+
TRAVIS_WAIT=120
180+
fi
181+
(cd Buildings/Resources/Scripts/travis && travis_wait $TRAVIS_WAIT $TEST_ARG)
182+
153183
154184
after_failure:
155185
- |

0 commit comments

Comments
 (0)