Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a9515e0
test using all supported platforms in GH actions
tijcolem Oct 28, 2021
e2d988a
remove the branch name as not using it
tijcolem Oct 28, 2021
49aaa6e
Add different workflow title
tijcolem Oct 28, 2021
3124cbd
Merge pull request #1 from tijcolem/expand_platforms
tijcolem Oct 28, 2021
cbbd260
try and shorten the description input labels
tijcolem Oct 28, 2021
2cb984f
fix yaml
tijcolem Oct 28, 2021
dea721b
remove extra 2004 block
tijcolem Oct 28, 2021
78ce073
use curl vs wget on windows
tijcolem Oct 28, 2021
817fa98
try again on windows download
tijcolem Oct 28, 2021
77a127f
try again on windows download
tijcolem Oct 28, 2021
4c7aae5
try and fix mac installer
tijcolem Oct 28, 2021
e3bf56c
let's try and test using ruby bindings
tijcolem Oct 28, 2021
976c482
enable ruby binding test on all platforms
tijcolem Oct 28, 2021
1975a70
add both cli and ruby bindings tests
tijcolem Oct 29, 2021
dcbbdd2
fix mac nproc cmd
tijcolem Oct 29, 2021
8721379
fix mac nproc again
tijcolem Oct 29, 2021
9e6f748
use single qt install script
tijcolem Nov 2, 2021
e7885eb
add tags to cli and ruby and process these using tagged option
tijcolem Nov 2, 2021
11600eb
Merge remote-tracking branch 'nrel/develop' into develop
tijcolem Apr 12, 2022
61dff0d
make the all platform action use a single base url
tijcolem Apr 12, 2022
8d3b3e0
add / to end of urls
tijcolem Apr 12, 2022
a85e66c
fix description
tijcolem Apr 12, 2022
c03a038
add proper default value
tijcolem Apr 12, 2022
8742b73
remove end /
tijcolem Apr 12, 2022
e0f46c3
fix mac file type
tijcolem Apr 12, 2022
9a404be
Force an Always On Supply Air Fan Operating Mode Schedule for PTAC/PTHP
jmarrec Sep 30, 2022
2d36564
Merge remote-tracking branch 'remotes/nrel/develop' into develop
tijcolem Oct 4, 2022
626a501
updating ext for mac installer
tijcolem Oct 4, 2022
287a76c
update required to false for prerelease tag
tijcolem Oct 6, 2022
9f02ada
update 3.4.0 tests
Oct 12, 2022
1bfa708
Merge branch 'develop' of https://github.com/tijcolem/OpenStudio-reso…
tijcolem Oct 12, 2022
4d7e35e
merge latest from nrel/OpenStudio-resources
tijcolem Mar 21, 2023
4daa011
update to use 22.04 runner
tijcolem Apr 5, 2023
cf87ef2
fixes for url paths and ruby action
tijcolem Apr 5, 2023
2233455
update mac runner to macos-11
tijcolem May 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
332 changes: 332 additions & 0 deletions .github/workflows/manual_installer_all_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,332 @@
name: Test OS SDK Installer - All Platforms

on:
workflow_dispatch:
inputs:
base_url:
description: 'The base url to use to download each platform'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect to use builds from s3 instead of a prerelease? just curious

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I recently used s3 as a test and works fine.

required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.5.1'
os_version:
description: 'OpenStudio Version (e.g. 3.5.1)'
required: true
default: '3.5.1'
os_prerelease_tag:
description: 'Pre-release tag (e.g. -alpha, -rc1). Leave empty if none'
required: false
default: ''
os_build_sha:
description: 'OpenStudio Build sha (first 10 chars)'
required: true
default: '22e1db7be5'

jobs:
installer_ubuntu_2204:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.x'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Download and install OS SDK installer
shell: bash
run: |
set -x
installer_url="${{ github.event.inputs.base_url}}/OpenStudio-${{ github.event.inputs.os_version}}${{ github.event.inputs.os_prerelease_tag}}%2B${{ github.event.inputs.os_build_sha}}-Ubuntu-22.04-x86_64.deb"
echo "Installer link: $installer_url"
sudo apt update
wget $installer_url
sudo apt install -y ./OpenStudio*.deb
openstudio openstudio_version

- name: Setup python deps
shell: bash
run: |
pip install -r requirements.txt

- name: Run model_tests.rb
shell: bash
run: |
set -x
echo "nproc=$(nproc)"
N=$(nproc) CUSTOMTAG=cli openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) CUSTOMTAG=cli openstudio highlevel_tests.rb

- name: Run highlevel_tests (Ruby bindings)
if: always()
shell: bash
run: |
set -x
RUBYPATH=$(find /usr/local -type d -regex ".*openstudio.*/Ruby$")
export RUBYLIB=$RUBYPATH
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby highlevel_tests.rb

- name: Run model_tests.rb (Ruby bindings)
if: always()
shell: bash
run: |
set -x
RUBYPATH=$(find /usr/local -type d -regex ".*openstudio.*/Ruby$")
export RUBYLIB=$RUBYPATH
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby model_tests.rb

- name: Generate HTML and heatmap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably mean to run this step twice, after each run of model_tests.rb (cli + run)

You probably want to run with CUSTOMTAG=cli and CUSTOMTAG=ruby

And call process_results.py with --tagged or --all

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's a good idea to tag them as cli and ruby

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to run model_tests.rb with both openstudio (CLI) and system ruby? That's gonna take a long time. The fact that we would want to do it on Windows I can see, but linux/mac I'm not sure.

Copy link
Collaborator Author

@tijcolem tijcolem Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan on these running nightly so I don't mind if they take a while to run. If we want to hook this into PRs on OpenStudio I think we should just run cli and maybe just one platform but we can use the other workflow for that. Maybe rename the workflow to _installer or something along those lines.

if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --tagged --quiet || true
python process_results.py heatmap --tagged --quiet || true

- name: Archive test results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test-Results
path: Test-Stability/*

installer_ubuntu_2004:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.x'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Download and install OS SDK installer
shell: bash
run: |
set -x
installer_url="${{ github.event.inputs.base_url}}/OpenStudio-${{ github.event.inputs.os_version}}${{ github.event.inputs.os_prerelease_tag}}%2B${{ github.event.inputs.os_build_sha}}-Ubuntu-20.04-x86_64.deb"
echo "Installer link: $installer_url"
sudo apt update
wget $installer_url
sudo apt install -y ./OpenStudio*.deb
openstudio openstudio_version

- name: Setup python deps
shell: bash
run: |
pip install -r requirements.txt

- name: Run model_tests.rb
shell: bash
run: |
set -x
echo "nproc=$(nproc)"
N=$(nproc) CUSTOMTAG=cli openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) CUSTOMTAG=cli openstudio highlevel_tests.rb

- name: Run highlevel_tests (Ruby bindings)
if: always()
shell: bash
run: |
set -x
RUBYPATH=$(find /usr/local -type d -regex ".*openstudio.*/Ruby$")
export RUBYLIB=$RUBYPATH
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby highlevel_tests.rb

- name: Run model_tests.rb (Ruby bindings)
if: always()
shell: bash
run: |
set -x
RUBYPATH=$(find /usr/local -type d -regex ".*openstudio.*/Ruby$")
export RUBYLIB=$RUBYPATH
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --tagged --quiet || true
python process_results.py heatmap --tagged --quiet || true

- name: Archive test results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test-Results
path: Test-Stability/*

installer_windows:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.x'
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Download and install OS SDK installer
shell: bash
run: |
set -x
installer_url="${{ github.event.inputs.base_url}}/OpenStudio-${{ github.event.inputs.os_version}}${{ github.event.inputs.os_prerelease_tag}}%2B${{ github.event.inputs.os_build_sha}}-Windows.exe"
echo "Installer link: $installer_url"
curl -SLO $installer_url
OS_NAME=$(ls *.exe)
# script installs to /c/openstudio
sed -i -e "s|REPLACEME|c:\\\\\\\\openstudio|" ci/install-openstudio.qs
./$OS_NAME --script ci/install-openstudio.qs
/c/openstudio/bin/openstudio.exe openstudio_version

- name: Setup python deps
shell: bash
run: |
pip install -r requirements.txt

- name: Run model_tests.rb
shell: bash
run: |
set -x
echo "nproc=$(nproc)"
N=$(nproc) CUSTOMTAG=cli /c/openstudio/bin/openstudio.exe model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) CUSTOMTAG=cli /c/openstudio/bin/openstudio.exe highlevel_tests.rb

- name: Run highlevel_tests (Ruby bindings)
if: always()
shell: bash
run: |
set -x
export RUBYLIB=/c/openstudio/Ruby
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby highlevel_tests.rb

- name: Run model_tests.rb (Ruby bindings)
if: always()
shell: bash
run: |
set -x
export RUBYLIB=/c/openstudio/Ruby
ruby -v
MT_CPU=$(nproc) CUSTOMTAG=ruby ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --tagged --quiet || true
python process_results.py heatmap --tagged --quiet || true

- name: Archive test results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test-Results
path: Test-Stability/*

installer_mac_osx:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.x'
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Download and install OS SDK installer
shell: bash
run: |
set -x
installer_url="${{ github.event.inputs.base_url}}/OpenStudio-${{ github.event.inputs.os_version}}${{ github.event.inputs.os_prerelease_tag}}%2B${{ github.event.inputs.os_build_sha}}-Darwin-x86_64.dmg"
echo "Installer link: $installer_url"
echo "Installer link: ${{ github.event.inputs.os_installer_osx }}"
wget $installer_url
OS_NAME=$(ls *.dmg)
OS_NAME_NO_EXT=$(basename $OS_NAME .dmg)
sed -i -e "s|REPLACEME|$HOME/openstudio|" ci/install-openstudio.qs
hdiutil attach ${OS_NAME}
sudo /Volumes/${OS_NAME_NO_EXT}/${OS_NAME_NO_EXT}.app/Contents/MacOS/${OS_NAME_NO_EXT} --script ci/install-openstudio.qs
hdiutil detach /Volumes/${OS_NAME_NO_EXT} -force
openstudio openstudio_version

- name: Setup python deps
shell: bash
run: |
pip install -r requirements.txt

- name: Run model_tests.rb
shell: bash
run: |
set -x
echo "nproc=$(sysctl -n hw.logicalcpu)"
N=$(sysctl -n hw.logicalcpu) CUSTOMTAG=cli openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(sysctl -n hw.logicalcpu) CUSTOMTAG=cli openstudio highlevel_tests.rb

- name: Run highlevel_tests (Ruby bindings)
if: always()
shell: bash
run: |
set -x
export RUBYLIB=$HOME/openstudio/Ruby
ruby -v
MT_CPU=$(sysctl -n hw.logicalcpu) CUSTOMTAG=ruby ruby highlevel_tests.rb

- name: Run model_tests.rb (Ruby bindings)
if: always()
shell: bash
run: |
set -x
export RUBYLIB=$HOME/openstudio/Ruby
ruby -v
MT_CPU=$(sysctl -n hw.logicalcpu) CUSTOMTAG=ruby ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --tagged --quiet || true
python process_results.py heatmap --tagged --quiet || true

- name: Archive test results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test-Results
path: Test-Stability/*
40 changes: 40 additions & 0 deletions ci/install-openstudio.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
function Controller () {
// silent install is not an option until QtIFW v3.0.1
// gui.setSilent(true);
}

Controller.prototype.IntroductionPageCallback = function () {
gui.clickButton(buttons.NextButton);
}

Controller.prototype.ComponentSelectionPageCallback = function () {
var widget = gui.currentPageWidget();

// to install a subset of components, uncomment the code below and edit as neccesary
//widget.deselectAll();
//widget.selectComponent('CLI');
//widget.selectComponent('RubyAPI');
//widget.selectComponent('EnergyPlus');
//widget.selectComponent('Resources');

gui.clickButton(buttons.NextButton);
}

Controller.prototype.TargetDirectoryPageCallback = function () {
// set install directory if needed
var widget = gui.currentPageWidget();
widget.TargetDirectoryLineEdit.setText("REPLACEME")
gui.clickButton(buttons.NextButton);
}

Controller.prototype.StartMenuDirectoryPageCallback = function () {
gui.clickButton(buttons.NextButton);
}

Controller.prototype.ReadyForInstallationPageCallback = function () {
gui.clickButton(buttons.NextButton);
}

Controller.prototype.FinishedPageCallback = function () {
gui.clickButton(buttons.FinishButton);
}
15 changes: 13 additions & 2 deletions model/simulationtests/lib/baseline_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,21 @@ def add_hvac(params)
# Add HVAC system type
case sys_num
# 1: PTAC, Residential
when '01' then hvac = OpenStudio::Model.addSystemType1(self, zones)
when '01'
OpenStudio::Model.addSystemType1(self, zones)
# Force an Always On schedule to make the PTAC Constant and not Cycling
# cf https://github.com/NREL/OpenStudio/issues/4699
self.getZoneHVACPackagedTerminalAirConditioners.each do |ptac|
ptac.setSupplyAirFanOperatingModeSchedule(self.alwaysOnDiscreteSchedule)
end

# 2: PTHP, Residential
when '02'
hvac = OpenStudio::Model.addSystemType2(self, zones)
OpenStudio::Model.addSystemType2(self, zones)
# Force an Always On schedule to make the PTAC Constant and not Cycling
self.getZoneHVACPackagedTerminalHeatPumps.each do |pthp|
pthp.setSupplyAirFanOperatingModeSchedule(self.alwaysOnDiscreteSchedule)
end
# 3: PSZ-AC
when '03'
zones.each do |zone|
Expand Down
Loading