-
Notifications
You must be signed in to change notification settings - Fork 15
SDK Installer test on all platforms #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
a9515e0
e2d988a
49aaa6e
3124cbd
cbbd260
2cb984f
dea721b
78ce073
817fa98
77a127f
4c7aae5
e3bf56c
976c482
1975a70
dcbbdd2
8721379
9e6f748
e7885eb
11600eb
61dff0d
8d3b3e0
a85e66c
c03a038
8742b73
e0f46c3
9a404be
2d36564
626a501
287a76c
9f02ada
1bfa708
4d7e35e
4daa011
cf87ef2
2233455
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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' | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/* | ||
| 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); | ||
| } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.