-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (54 loc) · 2.42 KB
/
manual_installer_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: manual_update_develop
on:
workflow_dispatch:
inputs:
os_installer_link:
description: 'The Link where to download the LINUX OpenStudio SDK Installer (.DEB)'
required: true
default: 'https://github.com/NREL/OpenStudio/releases/download/v3.4.0/OpenStudio-3.4.0+4bd816f785-Ubuntu-20.04.deb'
os_version:
description: 'OS version (e.g. 3.4.0). Must match .deb installer'
required: true
os_version_ext:
description: 'OS version extension (e.g. -alpha). Must match .deb installer'
required: false
docker_image_tag:
description: 'Docker image tag. Tag name will be prefixed with "dev-" unless tag = "develop"'
required: true
env:
OPENSTUDIO_DOWNLOAD_URL: ${{ github.event.inputs.os_installer_link }} # required
OPENSTUDIO_VERSION: ${{ github.event.inputs.os_version }} # required
OPENSTUDIO_VERSION_EXT: ${{ github.event.inputs.os_version_ext }} # required
DOCKER_MANUAL_IMAGE_TAG: ${{ github.event.inputs.docker_image_tag }} # required
jobs:
build_container:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.x'
- name: test and build
shell: bash
run: |
set -x
echo "Installer link: ${{ github.event.inputs.os_installer_link }}"
echo "OS SDK Version: ${{ github.event.inputs.os_version }}"
echo "OS SDK Version Extension: ${{ github.event.inputs.os_version_ext }}"
echo "DOCKER IMAGE TAG: ${{ github.event.inputs.docker_image_tag }}"
sudo apt update
docker build --target base -t openstudio:latest \
--build-arg OPENSTUDIO_VERSION=$OPENSTUDIO_VERSION \
--build-arg OPENSTUDIO_VERSION_EXT=$OPENSTUDIO_VERSION_EXT \
--build-arg OPENSTUDIO_DOWNLOAD_URL=$OPENSTUDIO_DOWNLOAD_URL .
docker run openstudio:latest openstudio openstudio_version
docker run openstudio:latest /usr/local/openstudio-$OPENSTUDIO_VERSION/Radiance/bin/rtrace -version
docker run -v $(pwd):/var/simdata/openstudio openstudio:latest ruby /var/simdata/openstudio/test/test_run.rb
docker run -v $(pwd)/test:/var/simdata/openstudio openstudio:latest ./test_gemfile.sh
- name: deploy docker
if: ${{ success() }}
shell: bash
run: ./deploy_docker.sh
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}