Skip to content
Open
Show file tree
Hide file tree
Changes from 16 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
327 changes: 327 additions & 0 deletions .github/workflows/manual_installer_all_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
name: Test OS SDK Installer - All Platforms

on:
workflow_dispatch:
inputs:
os_installer_ubuntu_1804:
description: 'Ubuntu 1804 (.deb) URL'
required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.2.1/OpenStudio-3.2.1%2Bbdbdbc9da6-Ubuntu-18.04.deb'
Copy link
Contributor

Choose a reason for hiding this comment

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

This is tedious to launch. We can infer the installer links for all platforms from a single one supplied.

Copy link
Collaborator Author

@tijcolem tijcolem Nov 2, 2021

Choose a reason for hiding this comment

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

I suppose OS builds will always have the base url.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well I take that back. Windows is a little odd as I push out both unsigned and signed installers so s3 on nightly build that we'll certainly want to test and hook into this action.

e.g. http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/?prefix=3.3.0-rc2/
signed: http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/?prefix=3.3.0-rc2/signed/

Even though it's a bit tedious to enter 4 links there may be cases it's needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

So you went back on this idea of having 4 links?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's now just base url along with build sha, version.

os_installer_ubuntu_2004:
description: 'Ubuntu 2004 (.deb) URL'
required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.2.1/OpenStudio-3.2.1%2Bbdbdbc9da6-Ubuntu-20.04.deb'
os_installer_windows:
description: 'Windows (.exe) URL'
required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.2.1/OpenStudio-3.2.1%2Bbdbdbc9da6-Windows.exe'
os_installer_osx:
description: 'Mac OSX (.dmg) URL'
required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.2.1/OpenStudio-3.2.1%2Bbdbdbc9da6-Darwin.dmg'

jobs:
installer_ubuntu_1804:
runs-on: ubuntu-18.04
Copy link
Contributor

Choose a reason for hiding this comment

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

There's code that's duplicated for each job, but using a matrix and a bunch of if platform (in bash or conditionally run some steps) is probably not going to simplify much so I'm fine with it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I thought of this. My understanding is the matrix works great for testing things such as multiples versions of python, not sure how if matrix works for vm instances.


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
echo "Installer link: ${{ github.event.inputs.os_installer_ubuntu_1804 }}"
sudo apt update
wget '${{ github.event.inputs.os_installer_ubuntu_1804 }}'
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=SHA openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) 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) 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) 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 --quiet || true
python process_results.py heatmap --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: actions/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Download and install OS SDK installer
shell: bash
run: |
set -x
echo "Installer link: ${{ github.event.inputs.os_installer_ubuntu_2004 }}"
sudo apt update
wget '${{ github.event.inputs.os_installer_ubuntu_2004 }}'
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=SHA openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) 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) 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) ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --quiet || true
python process_results.py heatmap --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
echo "Installer link: ${{ github.event.inputs.os_installer_windows }}"
curl -SLO '${{ github.event.inputs.os_installer_windows }}'
OS_NAME=$(ls *.exe)
# script installs to /c/openstudio
./$OS_NAME --script ci/install-windows.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=SHA /c/openstudio/bin/openstudio.exe model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(nproc) /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) 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) ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --quiet || true
python process_results.py heatmap --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-10.15

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
echo "Installer link: ${{ github.event.inputs.os_installer_osx }}"
wget '${{ github.event.inputs.os_installer_osx }}'
OS_NAME=$(ls *.dmg)
OS_NAME_NO_EXT=$(basename $OS_NAME .dmg)
sed -i -e "s|REPLACEME|$HOME/openstudio|" ci/install-mac.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-mac.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=SHA openstudio model_tests.rb

- name: Run highlevel_tests
if: always()
shell: bash
run: |
set -x
MT_CPU=$(sysctl -n hw.logicalcpu) 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) 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) ruby model_tests.rb

- name: Generate HTML and heatmap
if: ${{ always() }}
shell: bash
run: |
set -x
python process_results.py test-status --quiet || true
python process_results.py heatmap --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-mac.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);
}
Loading