From dc319ee98dd68e925a1605bf41c64c986e9af36a Mon Sep 17 00:00:00 2001
From: wenyikuang <137332549+wenyikuang@users.noreply.github.com>
Date: Tue, 23 Apr 2024 12:13:04 -0600
Subject: [PATCH 1/5] Update nrel/openstudio docker image to 3.8.0 beta to test
multiple gems (#190)
- Use the 20:04 image
- Update the stock ruby in image to 3.2.0 to compatitable with openstudio 3.8
- Update OS 3.8 to test gems.
---
.github/workflows/docker-openstudio.yml | 8 +++----
.github/workflows/manual_installer_test.yml | 2 +-
Dockerfile | 23 +++++++++++----------
3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/docker-openstudio.yml b/.github/workflows/docker-openstudio.yml
index 2271e4d..7bb39fe 100644
--- a/.github/workflows/docker-openstudio.yml
+++ b/.github/workflows/docker-openstudio.yml
@@ -10,9 +10,9 @@ on: [push, pull_request]
env:
USE_TESTING_TIMEOUTS: "true"
- OPENSTUDIO_VERSION: 3.7.0
- OPENSTUDIO_SHA: d5269793f1
- OPENSTUDIO_VERSION_EXT: ""
+ OPENSTUDIO_VERSION: 3.8.0
+ OPENSTUDIO_SHA: 2Bc6dd2826ef
+ OPENSTUDIO_VERSION_EXT: "-beta"
jobs:
@@ -27,7 +27,7 @@ jobs:
- name: test and build
shell: bash
run: |
- docker build --target base -t openstudio:latest \
+ docker build -t openstudio:latest \
--build-arg OPENSTUDIO_VERSION=$OPENSTUDIO_VERSION \
--build-arg OPENSTUDIO_SHA=$OPENSTUDIO_SHA \
--build-arg OPENSTUDIO_VERSION_EXT=$OPENSTUDIO_VERSION_EXT \
diff --git a/.github/workflows/manual_installer_test.yml b/.github/workflows/manual_installer_test.yml
index 00d002f..9d48d0c 100644
--- a/.github/workflows/manual_installer_test.yml
+++ b/.github/workflows/manual_installer_test.yml
@@ -1,4 +1,4 @@
-name: Build, test and deploy Docker image
+name: manual_update_develop
on:
workflow_dispatch:
diff --git a/Dockerfile b/Dockerfile
index 98e3ab9..aabc88a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,11 +3,11 @@ FROM ubuntu:20.04 AS base
MAINTAINER Nicholas Long nicholas.long@nrel.gov
# Set the version of OpenStudio when building the container. For example `docker build --build-arg
-ARG OPENSTUDIO_VERSION=3.7.0
-ARG OPENSTUDIO_VERSION_EXT=""
-ARG OPENSTUDIO_DOWNLOAD_URL=https://github.com/NREL/OpenStudio/releases/download/v3.7.0/OpenStudio-3.7.0+d5269793f1-Ubuntu-20.04-x86_64.deb
-ENV OS_BUNDLER_VERSION=2.1.4
-ENV RUBY_VERSION=2.7.2
+ARG OPENSTUDIO_VERSION=3.8.0
+ARG OPENSTUDIO_VERSION_EXT="-beta"
+ARG OPENSTUDIO_DOWNLOAD_URL=https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-3.8.0-beta%2B276859dd1e-Ubuntu-20.04-x86_64.deb
+ENV OS_BUNDLER_VERSION=2.4.10
+ENV RUBY_VERSION=3.2.2
ENV BUNDLE_WITHOUT=native_ext
# Install gdebi, then download and install OpenStudio, then clean up.
# gdebi handles the installation of OpenStudio's dependencies
@@ -33,21 +33,22 @@ RUN apt-get update && apt-get install -y \
&& grep -v -q "AccessDenied
" ${OPENSTUDIO_DOWNLOAD_FILENAME} \
&& gdebi -n $OPENSTUDIO_DOWNLOAD_FILENAME
# Cleanup
- RUN rm -f $OPENSTUDIO_DOWNLOAD_FILENAME \
+RUN apt update && apt install -y libyaml-dev ruby-full
+
+RUN rm -f $OPENSTUDIO_DOWNLOAD_FILENAME \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen en_US en_US.UTF-8 \
&& dpkg-reconfigure locales
# RUN apt-get install ca-certificates
# RUN curl -k -SLO https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz \
-
-RUN curl -SLO -k https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz \
- && tar -xvzf ruby-2.7.2.tar.gz \
- && cd ruby-2.7.2 \
+RUN pwd
+RUN curl -SLO -k https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz \
+ && tar -xvzf ruby-3.2.2.tar.gz \
+ && cd ruby-3.2.2 \
&& ./configure \
&& make && make install
-
## Add RUBYLIB link for openstudio.rb
ENV RUBYLIB=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/Ruby
ENV ENERGYPLUS_EXE_PATH=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/EnergyPlus/energyplus
From 63e003160a6ee4fe4a59b26f95a95433f6401ce0 Mon Sep 17 00:00:00 2001
From: wenyikuang <137332549+wenyikuang@users.noreply.github.com>
Date: Tue, 23 Apr 2024 16:58:20 -0600
Subject: [PATCH 2/5] Cleanup cache (#191)
Removed the ruby3 cache and downloaded deb installing file for openstudio.f
---
Dockerfile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index aabc88a..b21ebce 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,15 +31,14 @@ RUN apt-get update && apt-get install -y \
&& OPENSTUDIO_DOWNLOAD_FILENAME=$(ls *.deb) \
# Verify that the download was successful (not access denied XML from s3)
&& grep -v -q "AccessDenied
" ${OPENSTUDIO_DOWNLOAD_FILENAME} \
- && gdebi -n $OPENSTUDIO_DOWNLOAD_FILENAME
+ && gdebi -n $OPENSTUDIO_DOWNLOAD_FILENAME \
# Cleanup
-RUN apt update && apt install -y libyaml-dev ruby-full
-
-RUN rm -f $OPENSTUDIO_DOWNLOAD_FILENAME \
+ && rm -f $OPENSTUDIO_DOWNLOAD_FILENAME \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen en_US en_US.UTF-8 \
&& dpkg-reconfigure locales
+RUN apt update && apt install -y libyaml-dev ruby-full
# RUN apt-get install ca-certificates
# RUN curl -k -SLO https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz \
RUN pwd
@@ -49,6 +48,7 @@ RUN curl -SLO -k https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz \
&& ./configure \
&& make && make install
+RUN rm -rf ruby*
## Add RUBYLIB link for openstudio.rb
ENV RUBYLIB=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/Ruby
ENV ENERGYPLUS_EXE_PATH=/usr/local/openstudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}/EnergyPlus/energyplus
From f7f6f11c4591b52a6afb90affb5d7076c27f708c Mon Sep 17 00:00:00 2001
From: wenyikuang <137332549+wenyikuang@users.noreply.github.com>
Date: Wed, 1 May 2024 20:49:43 -0600
Subject: [PATCH 3/5] Wenyi remove cache (#192)
* Cleanup cache
* build with ENV RC_RELEASE to make openstudio-standard fetch release
---
Dockerfile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index b21ebce..26b595d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,6 +6,8 @@ MAINTAINER Nicholas Long nicholas.long@nrel.gov
ARG OPENSTUDIO_VERSION=3.8.0
ARG OPENSTUDIO_VERSION_EXT="-beta"
ARG OPENSTUDIO_DOWNLOAD_URL=https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-3.8.0-beta%2B276859dd1e-Ubuntu-20.04-x86_64.deb
+
+ENV RC_RELEASE=TRUE
ENV OS_BUNDLER_VERSION=2.4.10
ENV RUBY_VERSION=3.2.2
ENV BUNDLE_WITHOUT=native_ext
From 81ed7f26b022cb1b651ed5e834c44f0ca4eada03 Mon Sep 17 00:00:00 2001
From: Wenyi Kuang
Date: Thu, 16 May 2024 00:11:04 -0600
Subject: [PATCH 4/5] update default installer, fix a broken dependency
---
Dockerfile | 6 ++----
test/Gemfile-git | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 26b595d..b94c2ec 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,9 +4,8 @@ MAINTAINER Nicholas Long nicholas.long@nrel.gov
# Set the version of OpenStudio when building the container. For example `docker build --build-arg
ARG OPENSTUDIO_VERSION=3.8.0
-ARG OPENSTUDIO_VERSION_EXT="-beta"
-ARG OPENSTUDIO_DOWNLOAD_URL=https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-3.8.0-beta%2B276859dd1e-Ubuntu-20.04-x86_64.deb
-
+ARG OPENSTUDIO_VERSION_EXT="-rc3"
+ARG OPENSTUDIO_DOWNLOAD_URL=https://openstudio-ci-builds.s3.amazonaws.com/develop/OpenStudio-3.8.0-rc3%2Bd8eac889d0-Ubuntu-20.04-x86_64.deb
ENV RC_RELEASE=TRUE
ENV OS_BUNDLER_VERSION=2.4.10
ENV RUBY_VERSION=3.2.2
@@ -42,7 +41,6 @@ RUN apt-get update && apt-get install -y \
RUN apt update && apt install -y libyaml-dev ruby-full
# RUN apt-get install ca-certificates
-# RUN curl -k -SLO https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz \
RUN pwd
RUN curl -SLO -k https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz \
&& tar -xvzf ruby-3.2.2.tar.gz \
diff --git a/test/Gemfile-git b/test/Gemfile-git
index 9e6d6d7..dfdb763 100644
--- a/test/Gemfile-git
+++ b/test/Gemfile-git
@@ -1,6 +1,5 @@
source 'http://rubygems.org'
-gem 'xml-simple'
gem 'openstudio-standards', github: 'nrel/openstudio-standards', branch: 'ambient-loop'
gem 'tilt', github: 'rtomayko/tilt', ref: 'abe77eaf1b5f8da0a7e46135f'
-gem 'json_pure', '~> 2.1'
\ No newline at end of file
+gem 'json_pure', '~> 2.1'
From 5a17ce3358da2fba8f0223ea97186dd5fcafcea8 Mon Sep 17 00:00:00 2001
From: Wenyi Kuang
Date: Thu, 16 May 2024 00:26:33 -0600
Subject: [PATCH 5/5] Update SHA and EXT
---
.github/workflows/docker-openstudio.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/docker-openstudio.yml b/.github/workflows/docker-openstudio.yml
index 7bb39fe..616d7da 100644
--- a/.github/workflows/docker-openstudio.yml
+++ b/.github/workflows/docker-openstudio.yml
@@ -11,8 +11,8 @@ on: [push, pull_request]
env:
USE_TESTING_TIMEOUTS: "true"
OPENSTUDIO_VERSION: 3.8.0
- OPENSTUDIO_SHA: 2Bc6dd2826ef
- OPENSTUDIO_VERSION_EXT: "-beta"
+ OPENSTUDIO_SHA: d8eac889d0
+ OPENSTUDIO_VERSION_EXT: "-rc3"
jobs: