Skip to content
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

Travis build artifacts #597

Merged
merged 153 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
ec3caca
remove simulate datapoint logs from the debug log
brianlball May 30, 2019
fdff96d
Merge branch 'develop' into log_clean_up
anyaelena May 31, 2019
18f5da0
Merge branch 'redis' into log_clean_up
brianlball May 31, 2019
fa02072
Merge branch 'log_clean_up' of https://github.com/NREL/OpenStudio-ser…
brianlball May 31, 2019
faf434f
Merge branch 'develop' into log_clean_up
anyaelena Jun 3, 2019
59e033f
Merge branch 'develop' into log_clean_up
anyaelena Jun 14, 2019
8a175bd
Merge branch 'develop' into log_clean_up
anyaelena Jul 11, 2019
e048f57
Merge pull request #491 from NREL/log_clean_up
anyaelena Jul 29, 2019
976d329
first attempt at artifact publishing
anyaelena Aug 31, 2019
bbfb92c
try to narrow and debug artifact publishing
anyaelena Aug 31, 2019
e3214be
try setting artifacts path from .travis.yml and update permissions on…
anyaelena Aug 31, 2019
f8a06de
portable ruby for osx builds
anyaelena Sep 3, 2019
e288722
focus on osx build/export first
anyaelena Sep 3, 2019
2d540c9
fix overzealous copy/paste.
anyaelena Sep 3, 2019
8c266e7
Update Gemfile
anyaelena Sep 5, 2019
5428d0b
Update Gemfile
anyaelena Sep 5, 2019
fce1c2c
Update Gemfile
anyaelena Sep 6, 2019
0db09ae
Update .travis.yml
anyaelena Sep 6, 2019
55fd82a
fix mongo install
anyaelena Sep 7, 2019
191d80e
merge develop
anyaelena Sep 10, 2019
998d6b7
set env vars and path for test
anyaelena Sep 10, 2019
633f0a2
typo
anyaelena Sep 10, 2019
f88581e
some tweaks to fix --enable-load-relative ruby install and install_ge…
anyaelena Sep 12, 2019
4a9476d
additional env vars prior to export
anyaelena Sep 12, 2019
e5aea65
turn off artifact export (instead run manually from export script)
anyaelena Sep 12, 2019
cccef0e
export dir must not be in build dir (build dir is copied to export di…
anyaelena Sep 12, 2019
5a824bf
export should be running on xcode9.2 (not xenial)
anyaelena Sep 13, 2019
ef41e07
fix details for export build
anyaelena Sep 13, 2019
ea35c20
bring back all tests and publish docker image and local builds during…
anyaelena Sep 13, 2019
7d777ea
linux tests will require update to custom install of 2.2.4 (vs rvm)
anyaelena Sep 13, 2019
c42cbba
keep using rvm 2.2.4 until linux builds/tests are updated.
anyaelena Sep 13, 2019
6e27a0c
try only export_build for now.
anyaelena Sep 13, 2019
7aee670
turn linux back off and get rid of ruby environment (which does thing…
anyaelena Sep 13, 2019
84f3071
fix integration test for osx
anyaelena Sep 13, 2019
d46d8ed
OSX build/upload working. Switch tracks to build/test on Linux using…
anyaelena Sep 13, 2019
01665a2
install 2.2.4 using rbenv on linux.
anyaelena Sep 13, 2019
145d98c
fix some env vars
anyaelena Sep 13, 2019
5daadf6
fix PATH
anyaelena Sep 13, 2019
3b46c8c
mongodb service not starting for linux/minimal. try with generic.
anyaelena Sep 14, 2019
0553a5f
publish linux build to s3
anyaelena Sep 14, 2019
7d42e2d
yml format issue.
anyaelena Sep 14, 2019
5ee660b
make file executable
anyaelena Sep 14, 2019
38db7a5
resurrect full test suite.
anyaelena Sep 14, 2019
fdaf591
export from develop and master branches
anyaelena Sep 14, 2019
c6d4a55
updating for openstudio 2.9.0 rc1
tijcolem Sep 18, 2019
d5004da
fixed rc1 string
tijcolem Sep 18, 2019
fbb2bfa
updating sha for 2.9.0
tijcolem Sep 23, 2019
3b1948c
Merge pull request #512 from NREL/2.9.0-rc1
tijcolem Sep 24, 2019
0963513
Updating for OpenStudio 2.9.0-rc2
tijcolem Sep 27, 2019
2c0687d
set to faraday version
tijcolem Sep 30, 2019
7bfd8f9
adding faraday to server Gemfile only
tijcolem Sep 30, 2019
f800af0
Merge pull request #515 from NREL/2.9.0-rc2
tijcolem Sep 30, 2019
abbc1e0
updating to 2.9.0-rc3
tijcolem Oct 1, 2019
4cd0404
updating sha for rc3
tijcolem Oct 2, 2019
a108215
Merge pull request #517 from NREL/2.9.0-rc3
tijcolem Oct 2, 2019
d9961e1
updating v2.9.0 official release
tijcolem Oct 11, 2019
3ec9373
Merge pull request #519 from NREL/v2.9.0
tijcolem Oct 11, 2019
5b030b3
updating r container to v3.6.1
tijcolem Oct 24, 2019
657253f
Merge pull request #521 from NREL/R_3.6.1
tijcolem Oct 24, 2019
2944fce
bump up timeouts to at least an hour
brianlball Nov 5, 2019
75d219b
bson 4.5.0
brianlball Nov 19, 2019
cdbbe84
enabling us-west-2 aws region
brianlball Nov 19, 2019
8250a51
make -rcX optional
brianlball Nov 20, 2019
2b168e3
Merge pull request #524 from NREL/timeouts-dev
brianlball Nov 21, 2019
c1fcb54
remove memfix-controller
brianlball Nov 21, 2019
dd4c8e8
Merge pull request #527 from NREL/memfix-dev
brianlball Nov 25, 2019
7507122
bumping to v2.9.1
tijcolem Nov 26, 2019
87691a3
Merge pull request #529 from NREL/v2.9.1
tijcolem Nov 26, 2019
cb53b23
add cli_debug
brianlball Nov 27, 2019
1be566c
update utility scripts
brianlball Nov 28, 2019
0d1b907
cli_verbose
brianlball Nov 28, 2019
1ed9250
change cli args to be strings to be cleaner and consistent with PAT
brianlball Nov 30, 2019
437433d
add check for valid CLI options
brianlball Dec 3, 2019
a812369
updating SHA for v2.9.1-rc1
tijcolem Dec 3, 2019
3fabebc
Merge pull request #533 from NREL/v2.9.1
tijcolem Dec 3, 2019
3794263
Merge branch 'develop' into debug_flag
nllong Dec 3, 2019
9a78348
remove hidden tab
brianlball Dec 4, 2019
6415d24
Merge branch 'debug_flag' of github.com:NREL/OpenStudio-server into d…
brianlball Dec 4, 2019
ce81e0b
code cleanup
brianlball Dec 4, 2019
99c235f
Merge pull request #531 from NREL/debug_flag
brianlball Dec 4, 2019
372c081
updating to 2.9.1 offical
tijcolem Dec 6, 2019
025637b
Merge pull request #534 from NREL/v2.9.1
tijcolem Dec 6, 2019
732e765
add timeouts as user args
brianlball Dec 10, 2019
0ef6232
remove tabs
brianlball Dec 11, 2019
7b90761
Merge pull request #537 from NREL/timeout_args_develop
nllong Dec 11, 2019
e782578
bump scp download timeout
brianlball Jan 21, 2020
d3baa6e
Merge pull request #541 from NREL/scp_timeout
brianlball Jan 21, 2020
c595aea
redis-namespace 1.6.0 and resque 1.27.4
brianlball Jan 21, 2020
9341060
Merge branch 'develop' into scp_timeout
brianlball Jan 21, 2020
5e9dc15
Merge pull request #542 from NREL/scp_timeout
brianlball Jan 21, 2020
918979e
Merge branch 'develop' into travis_build_artifacts
anyaelena Jan 22, 2020
d763df8
Update README.md
brianlball Feb 15, 2020
2b5d4c3
Merge branch 'develop' into travis_build_artifacts
anyaelena Feb 24, 2020
68385f2
update branch
anyaelena Jul 2, 2020
c0040d0
Remove dupes.
anyaelena Jul 2, 2020
a44300f
Seems to be legacy from older code. No reason to add Faraday in this…
anyaelena Jul 2, 2020
8ebf235
formatting fix, portable Ruby from S3, and temporarily set travis to …
anyaelena Jul 2, 2020
ab022e2
Ugh RVM.
anyaelena Jul 2, 2020
7172f7f
Downloaded portable ruby should be at /usr/local/bin which should alr…
anyaelena Jul 2, 2020
7f7582a
Keep trying to erase rvm.
anyaelena Jul 2, 2020
dfc1813
try to skip prompt.
anyaelena Jul 2, 2020
cedd280
Sudo the rvm implode
anyaelena Jul 2, 2020
946636b
Mv all of downloaded Ruby, not only binaries.
anyaelena Jul 6, 2020
5a78e62
sudo mv ruby and updated env vars in test.sh.
anyaelena Jul 6, 2020
5c61db2
bump xcode version to travis default.
anyaelena Jul 6, 2020
7281b39
Test publishing for only osx.
anyaelena Jul 7, 2020
7a489b5
limit to xcode.
anyaelena Jul 7, 2020
ea27dab
fix PATH
anyaelena Jul 8, 2020
4650d5a
Fix xcode version for publish.
anyaelena Jul 8, 2020
eec55f3
Cleaner export PATH (which is reproduced in our S3 bucket).
anyaelena Jul 8, 2020
85ca5d2
install awscli to bypass the travis artifact system.
anyaelena Jul 13, 2020
459ba95
should fix linux errors
anyaelena Jul 13, 2020
68c42f7
test only linux.
anyaelena Jul 13, 2020
4302b00
try with relative path
anyaelena Jul 13, 2020
78f7ab3
Ok. ARTIFACTS_PATHS value relative to Travis Build Dir.
anyaelena Jul 13, 2020
dac06c1
OSS SHA rather than OS SHA.
anyaelena Jul 13, 2020
3279788
Try again with ARTIFACTS_BUCKET updated in Travis repo settings.
anyaelena Jul 13, 2020
ddb0ee5
Switch back to testing Linux builds.
anyaelena Jul 13, 2020
85c9c30
Debug OpenSSL with portable Ruby.
anyaelena Jul 14, 2020
e14ea92
Debug OpenSSL with portable Ruby on Travis.
anyaelena Jul 14, 2020
f661650
OpenSSL
anyaelena Jul 14, 2020
03008bf
Load/run openstudio.rb with portable Ruby.
anyaelena Jul 14, 2020
2c78583
Try Linux publishing.
anyaelena Jul 15, 2020
bcf628a
more with linux builds
anyaelena Jul 15, 2020
3fb73de
clean up big files
anyaelena Jul 20, 2020
c132ba2
test osx publishing.
anyaelena Jul 20, 2020
462715f
Clean up after mongo install
anyaelena Jul 20, 2020
6d5db39
return exit status of artifact upload
anyaelena Jul 20, 2020
42bb9c6
debug segfault on bionic
anyaelena Jul 21, 2020
348635e
linux export
anyaelena Jul 21, 2020
090f271
corrected path for linux.
anyaelena Jul 21, 2020
48f4895
Fix
anyaelena Jul 21, 2020
d8534aa
Merge remote-tracking branch 'origin' into travis_build_artifacts
anyaelena Sep 10, 2020
dac1dae
clean up after merge
anyaelena Sep 10, 2020
43781d7
test with ruby2.5 package to confirm segfault related to ruby version.
anyaelena Sep 11, 2020
d8a75ea
test osx10.15.4+ with xcode11.4
anyaelena Sep 11, 2020
a689215
Portable Ruby - Linux
anyaelena Sep 11, 2020
80ee90c
use patched gem for osx 10.15+
anyaelena Sep 11, 2020
ec1fe65
Required by the updated portable Ruby.
anyaelena Sep 11, 2020
bd101c4
corrected package install
anyaelena Sep 11, 2020
f0c1042
Add testing for xcode 10.2 and build from 10.2 to match OpenStudio.
anyaelena Sep 11, 2020
cab9ec8
Turn off cipher output and set ulimit during testing.
anyaelena Sep 11, 2020
ca054d3
xcode 10.2 builds are failing because they need libxml2
anyaelena Sep 11, 2020
cc6440b
Docker builds currently failing in all branches with 'Unable to find …
anyaelena Sep 11, 2020
bb23ea1
find libxml (we hope).
anyaelena Sep 11, 2020
2e8433c
trying to fix libxml2 compile issue on xcode 10.12
anyaelena Sep 14, 2020
4e30ca0
Test libxml2 fix in install_gems code
anyaelena Sep 14, 2020
c274bbd
try brew link instead of adding to install_gems command.
anyaelena Sep 14, 2020
2b265ed
Try to use same system libraries as nokogiri
anyaelena Sep 14, 2020
6d47d50
header files moved in osx 10.14.
anyaelena Sep 15, 2020
b8e1a97
typo
anyaelena Sep 15, 2020
3aaa02a
Merge branch 'develop' into travis_build_artifacts
anyaelena Sep 18, 2020
c113340
update publishing branches and a little cleanup
anyaelena Sep 18, 2020
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
56 changes: 35 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
language: minimal

# addons:
# artifacts: true

env:
global:
- USE_TESTING_TIMEOUTS: "true"
- OPENSTUDIO_VERSION=3.0.1 OPENSTUDIO_VERSION_SHA=09b7c8a554 OPENSTUDIO_VERSION_EXT=""
- DOCKER_COMPOSE_VERSION=1.21.1
- BUNDLE_WITHOUT=native_ext

# gemfile:
# - server/Gemfile

# Set the default scripts that are used for the majority of the tests in the matrix
# redis-server now wants to bind to ipv6 ::1. This changes this behavior.
before_install:
Expand All @@ -25,14 +19,8 @@ after_failure: ./ci/travis/print_logs.sh

# Services for linux -- all instances
services:
# counter to documentation, these aren't starting for bionic
# - mongodb
# - redis-server
- docker

rvm:
- 2.5

jobs:
include:
- stage: test
Expand All @@ -49,10 +37,26 @@ jobs:
os: osx
osx_image: xcode9.4
env: BUILD_TYPE=test
- stage: test
os: osx
osx_image: xcode10.2
env: BUILD_TYPE=test
- stage: test
os: osx
osx_image: xcode11.4
env: BUILD_TYPE=test
- stage: test
os: osx
osx_image: xcode9.4
env: BUILD_TYPE=integration
- stage: test
os: osx
osx_image: xcode10.2
env: BUILD_TYPE=integration
- stage: test
os: osx
osx_image: xcode11.4
env: BUILD_TYPE=integration
- stage: test
os: linux
sudo: required
Expand All @@ -79,16 +83,8 @@ jobs:
after_script:
# Reset the git checkout to remove the test-based data in the containers and rebuild
- git checkout -- .dockerignore && git checkout -- Dockerfile
# - stage: Upload native OSX build
# if: branch=local-builds
# os: xcode9.4
# sudo: required
# env:
# - BUILD_TYPE=publish
# before_script:
# script: ./ci/travis/export_build.sh

- stage: Deploy Docker Image
- stage: publish
# Include your branch name below to publish a custom image.
# This change must be made in combination with a modification to
# deployment/scripts/deploy_docker.sh, as indicated in comments for that file.
Expand All @@ -109,6 +105,24 @@ jobs:
- docker-compose build --build-arg OPENSTUDIO_VERSION=$OPENSTUDIO_TAG web
- docker-compose build rserve
script: ./docker/deployment/scripts/deploy_docker.sh
- stage: publish
if: branch = master OR branch = develop
os: osx
osx_image: xcode10.2
sudo: required
env:
- BUILD_TYPE=export
before_script:
script: ./ci/travis/export_build_osx.sh
- stage: publish
if: branch = master OR branch = develop
os: linux
dist: bionic
sudo: required
env:
- BUILD_TYPE=export
before_script:
script: ./ci/travis/export_build_linux.sh

notifications:
slack:
Expand Down
3 changes: 2 additions & 1 deletion bin/openstudio_meta
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ class InstallGems

sys_cmds << "#{$ruby_path} #{RbConfig::CONFIG['prefix']}/bin/gem install --no-env-shebang bundler -v 2.1.0"
if /darwin/.match(RUBY_PLATFORM)
sys_cmds << "#{$ruby_path} #{bundler_bin} config build.nokogiri --use-system-libraries --with-xml2-lib=/usr/lib --with-xml2-include=/usr/include"
sys_cmds << "#{$ruby_path} #{bundler_bin} config build.nokogiri --use-system-libraries --with-xml2-lib=/usr/lib --with-xml2-config=/usr/bin/xml2-config"
sys_cmds << "#{$ruby_path} #{bundler_bin} config build.libxml-ruby --use-system-libraries --with-xml2-config=/usr/bin/xml2-config"
end
if options[:test_dev_build]
sys_cmds << "#{$ruby_path} #{bundler_bin} install --with default development test"
Expand Down
54 changes: 54 additions & 0 deletions ci/travis/cipher.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env ruby
require 'openssl'

def crypt_by_password(alg, pass, salt, text)
puts "--Setup--"
puts %(cipher alg: "#{alg}")
puts %(plain text: "#{text}")
puts %(password: "#{pass}")
puts %(salt: "#{salt}")
puts

puts "--Encrypting--"
enc = OpenSSL::Cipher.new(alg)
enc.encrypt
enc.pkcs5_keyivgen(pass, salt)
cipher = enc.update(text)
cipher << enc.final
puts %(encrypted text: #{cipher.inspect})
puts

puts "--Decrypting--"
dec = OpenSSL::Cipher.new(alg)
dec.decrypt
dec.pkcs5_keyivgen(pass, salt)
plain = dec.update(cipher)
plain << dec.final
puts %(decrypted text: "#{plain}")
puts
end

def ciphers
ciphers = OpenSSL::Cipher.ciphers.sort
ciphers.each{|i|
if i.upcase != i && ciphers.include?(i.upcase)
ciphers.delete(i)
end
}
return ciphers
end

puts "Supported ciphers in #{OpenSSL::OPENSSL_VERSION}:"
ciphers.each_with_index{|name, i|
printf("%-15s", name)
puts if (i + 1) % 5 == 0
}
puts
puts

alg = ARGV.shift || ciphers.first
pass = "secret password"
salt = "8 octets" # or nil
text = "abcdefghijklmnopqrstuvwxyz"

crypt_by_password(alg, pass, salt, text)
26 changes: 26 additions & 0 deletions ci/travis/export_build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# empty dir for export
mkdir /home/travis/build/NREL/export

export PATH="/usr/loca/bin/ruby:/usr/local/openstudio-${OPENSTUDIO_VERSION}/bin:${PATH}"
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
# Dir containing openstudio
export RUBYLIB="/usr/local/openstudio-${OPENSTUDIO_VERSION}/Ruby"
export OPENSTUDIO_TEST_EXE="/usr/local/openstudio-${OPENSTUDIO_VERSION}/bin/openstudio"
mongo_dir="/usr/bin"
/usr/local/ruby/bin/ruby "${TRAVIS_BUILD_DIR}/bin/openstudio_meta" install_gems --export="/home/travis/build/NREL/export"
oss_filename="OpenStudio-server-$(git -C "${TRAVIS_BUILD_DIR}" rev-parse --short=10 HEAD)-linux.tar.gz"
ls -al /home/travis/build/NREL/export/
#mv build package to root of travis build for artifact upload.
mv /home/travis/build/NREL/export/$oss_filename .
ls -al

export ARTIFACTS_PATHS=$oss_filename
# set to 2GB instead of default of 1
export ARTIFACTS_MAX_SIZE=2147483648
# supposedly installed by default but not available
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
# TODO don't recreate entire path to file within the AWS bucket.
artifacts upload
exit $?

22 changes: 22 additions & 0 deletions ci/travis/export_build_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#empty dir for export
mkdir /Users/travis/build/NREL/export

export PATH="/usr/local/ruby/bin:$PATH"
export RUBYLIB="$HOME/openstudio/Ruby"
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
/usr/local/ruby/bin/ruby "${TRAVIS_BUILD_DIR}/bin/openstudio_meta" install_gems --export="/Users/travis/build/NREL/export"
oss_filename="OpenStudio-server-$(git -C "${TRAVIS_BUILD_DIR}" rev-parse --short=10 HEAD)-darwin.tar.gz"


#mv build package to root of travis build for artifact upload.
mv /Users/travis/build/NREL/export/$oss_filename .

export ARTIFACTS_PATHS=$oss_filename
# set to 2GB instead of default of 1
export ARTIFACTS_MAX_SIZE=2147483648
# supposedly installed by default but not available
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
# TODO don't recreate entire path to file within the AWS bucket.
artifacts upload
exit $?
2 changes: 1 addition & 1 deletion ci/travis/install_openstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ ! -z ${OPENSTUDIO_VERSION} ] && [ ! -z ${OPENSTUDIO_SHA} ]; then
rm -rf /var/lib/apt/lists/*
locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales

rm $OPENSTUDIO_DOWNLOAD_FILENAME
else
echo "Must pass in the OpenStudio version, and sha to be installed (e.g. install_openstudio.sh 2.4.0 f58a3e1808)"
exit 9
Expand Down
37 changes: 29 additions & 8 deletions ci/travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,26 @@ if [ "${BUILD_TYPE}" == "docker" ]; then
sudo apt-get install -y pv

else
sudo rvm implode --force # rvm PATH rewriting interferes with portable Ruby.
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then

brew update > /Users/travis/build/NREL/OpenStudio-server/spec/files/logs/brew-update.log
# AP: do we need mongo install here ? seems to be handled by service defined in travis yml.
# NL: Services are not handled in osx
brew install pv tree ruby@2.5
brew install pv tree

# install portable ruby - required for build that will eventually be published
# see https://github.com/NREL/OpenStudio-PAT/wiki/Pat-Build-Notes
curl -SLO --insecure https://openstudio-resources.s3.amazonaws.com/pat-dependencies3/ruby-2.5.5-darwin.tar.gz
tar xvzf ruby-2.5.5-darwin.tar.gz
sudo mv ruby /usr/local/
otool -L /usr/local/ruby/bin/ruby
rm ruby-2.5.5-darwin.tar.gz

# Install mongodb from a download. Brew is hanging and requires building mongo. This also speeds up the builds.
curl -SLO https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.4.18.tgz
tar xvzf mongodb-osx-ssl-x86_64-3.4.18.tgz
cp mongodb-osx-x86_64-3.4.18/bin/* /usr/local/bin/

rm -r mongodb-osx*

# Install openstudio -- Use the install script that is in this repo now, the one on OpenStudio/develop has changed
export OS_NAME=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}%2B${OPENSTUDIO_VERSION_SHA}-Darwin
export OS_NAME_WITH_PLUS=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}+${OPENSTUDIO_VERSION_SHA}-Darwin
Expand All @@ -36,8 +44,8 @@ else
# Will install into $HOME/openstudio and RUBYLIB will be $HOME/openstudio/Ruby
sudo /Volumes/${OS_NAME_WITH_PLUS}/${OS_NAME_WITH_PLUS}.app/Contents/MacOS/${OS_NAME_WITH_PLUS} --script ci/travis/install-mac.qs
hdiutil detach /Volumes/${OS_NAME_WITH_PLUS} -force

export PATH="$TRAVIS_BUILD_DIR/gems/bin:/usr/local/opt/ruby@2.5/bin:$HOME/openstudio/bin:$PATH"
rm ${OS_NAME}.dmg
export PATH="/usr/local/ruby/bin:$TRAVIS_BUILD_DIR/gems/bin:$HOME/openstudio/bin:$PATH"
export RUBYLIB="$HOME/openstudio/Ruby"
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
Expand All @@ -60,15 +68,23 @@ else
sudo mv redis.conf /etc/redis/redis.conf
sudo systemctl start redis-server.service || true
sudo systemctl status redis-server.service
sudo apt-get install -y pv tree mongodb ruby2.5
sudo apt-get install -y pv tree mongodb libqdbm14
sudo systemctl start mongodb

# install portable ruby - required for build that will eventually be published
# see https://github.com/NREL/OpenStudio-PAT/wiki/Pat-Build-Notes
curl -SLO --insecure https://openstudio-resources.s3.amazonaws.com/pat-dependencies3/ruby-2.5.5-linux.tar.gz
tar xvzf ruby-2.5.5-linux.tar.gz
sudo mv ruby /usr/local/
ldd /usr/local/ruby/bin/ruby
rm ruby-2.5.5-linux.tar.gz

mkdir -p reports/rspec
# AP: this appears to only be used for Travis/Linux so we should move it out of the docker/deployment/scripts dir
sudo ./ci/travis/install_openstudio.sh $OPENSTUDIO_VERSION $OPENSTUDIO_VERSION_SHA $OPENSTUDIO_VERSION_EXT
export RUBYLIB=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/Ruby
export ENERGYPLUS_EXE_PATH=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/EnergyPlus/energyplus
export PATH=/usr/bin:/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/bin:${PATH}
export PATH=/usr/local/ruby/bin:/usr/local/bin:/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/bin:${PATH}
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
fi
Expand All @@ -77,7 +93,12 @@ else

cd ${TRAVIS_BUILD_DIR}/server
printenv
which ruby
ruby -v
# test openssl
# ruby ${TRAVIS_BUILD_DIR}/ci/travis/cipher.rb
ruby ${TRAVIS_BUILD_DIR}/ci/travis/verify_openstudio.rb

ruby "${TRAVIS_BUILD_DIR}/bin/openstudio_meta" install_gems --with_test_develop --debug --verbose --use_cached_gems
bundle -v
# create dir for output files which will be generated in case of failure
Expand Down
9 changes: 6 additions & 3 deletions ci/travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
export RUBYLIB="${HOME}/openstudio/Ruby"
export OPENSTUDIO_TEST_EXE="${HOME}/openstudio/bin/openstudio"
# re-export PATH, even though it's set in setup.sh.
export PATH="$TRAVIS_BUILD_DIR/gems/bin:/usr/local/opt/ruby@2.5/bin:$HOME/openstudio/bin:$PATH"
export PATH="$TRAVIS_BUILD_DIR/gems/bin:/usr/local/ruby/bin:$HOME/openstudio/bin:$PATH"
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
mongo_dir="/usr/local/bin"
elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
# Dir containing openstudio
export ENERGYPLUS_EXE_PATH=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/EnergyPlus/energyplus
export PATH=/usr/bin:/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/bin:${PATH}
export PATH=/usr/local/ruby/bin:/usr/bin:/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/bin:${PATH}
export GEM_HOME="$TRAVIS_BUILD_DIR/gems"
export GEM_PATH="$TRAVIS_BUILD_DIR/gems:$TRAVIS_BUILD_DIR/gems/bundler/gems"
export RUBYLIB="/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/Ruby:/usr/Ruby"
export RUBYLIB="/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/Ruby"
export OPENSTUDIO_TEST_EXE="/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/bin/openstudio"
mongo_dir="/usr/bin"
fi
Expand All @@ -33,6 +33,9 @@ else
if [ "${BUILD_TYPE}" == "test" ];then
ulimit -a
echo "starting unit tests. RUBYLIB=$RUBYLIB ; OPENSTUDIO_TEST_EXE=$OPENSTUDIO_TEST_EXE"
# Threadsafe test requires higher ulimit to avoid EMFILE error
ulimit -n
ulimit -n 1024
ruby "${TRAVIS_BUILD_DIR}/bin/openstudio_meta" run_rspec --debug --verbose --mongo-dir="$mongo_dir" --openstudio-exe="$OPENSTUDIO_TEST_EXE" "${TRAVIS_BUILD_DIR}/spec/unit-test"
exit_status=$?
if [ $exit_status == 0 ];then
Expand Down
5 changes: 5 additions & 0 deletions ci/travis/verify_openstudio.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
require 'openstudio'

uuid = OpenStudio::UUID::create()
puts "Able to load OpenStudio.rb. uuid #{uuid} generated."
2 changes: 2 additions & 0 deletions server/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ if RUBY_PLATFORM =~ /linux/
gem 'execjs'
gem 'libv8'
gem 'therubyracer'
elsif RUBY_PLATFORM =~ /darwin/
gem 'execjs', github: 'NREL/execjs'
end

# The only resque only is :docker, :docker-dev, :production
Expand Down