3.9.0 rc1 #1015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: openstudio-server | |
on: [push, pull_request] | |
# example of how to restrict to one branch and push event | |
#on: | |
# push: | |
# branches: | |
# - test_branch | |
env: | |
USE_TESTING_TIMEOUTS: "true" | |
OPENSTUDIO_VERSION: 3.9.0 | |
OPENSTUDIO_VERSION_SHA: cc1e0bbd6d | |
OPENSTUDIO_VERSION_EXT: "-rc2" | |
DOCKER_COMPOSE_VERSION: 1.21.1 | |
BUNDLE_WITHOUT: native_ext | |
jobs: | |
linux-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: setup | |
shell: bash | |
run: ./ci/github-actions/setup.sh | |
- name: unit-test | |
shell: bash | |
run: ./ci/github-actions/test.sh | |
env: | |
BUILD_TYPE: test | |
- name: integration | |
shell: bash | |
run: ./ci/github-actions/test.sh | |
env: | |
BUILD_TYPE: integration | |
SKIP_URBANOPT_ALGO: true # Set this when excluding urbanopt-cli gem from server. | |
- name: logs | |
if: ${{ failure() }} | |
shell: bash | |
run: ./ci/github-actions/print_logs.sh | |
- name: build gem package | |
if: ${{ success() }} | |
shell: bash | |
run: ./ci/github-actions/export_build_linux.sh | |
- name: upload gem package | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: openstudio-server-gems-linux | |
path: build/NREL/export/*.tar.gz | |
macos-test: | |
runs-on: macos-13 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: setup | |
shell: bash | |
run: ./ci/github-actions/setup.sh | |
- name: unit-test | |
shell: bash | |
run: ./ci/github-actions/test.sh | |
env: | |
BUILD_TYPE: test | |
- name: integration | |
shell: bash | |
run: ./ci/github-actions/test.sh | |
env: | |
BUILD_TYPE: integration | |
SKIP_URBANOPT_ALGO: true # Set this when excluding urbanopt-cli gem from server. | |
- name: logs | |
if: ${{ failure() }} | |
shell: bash | |
run: ./ci/github-actions/print_logs.sh | |
- name: build gem package | |
if: ${{ success() }} | |
shell: bash | |
run: ./ci/github-actions/export_build_osx.sh | |
- name: upload gem package | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: openstudio-server-gems-darwin | |
path: build/NREL/export/*.tar.gz | |
docker: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: setup | |
shell: bash | |
run: ./ci/github-actions/setup.sh | |
env: | |
BUILD_TYPE: docker | |
- name: docker | |
shell: bash | |
run: | | |
export OPENSTUDIO_TAG=3.9.0 | |
sed -i -E "s/.git//g" .dockerignore | |
docker volume create --name=osdata | |
docker images --all | |
docker --version | |
docker-compose --version | |
docker-compose -f docker-compose.test.yml pull | |
docker-compose -f docker-compose.test.yml build --build-arg OPENSTUDIO_VERSION=$OPENSTUDIO_TAG | |
docker-compose -f docker-compose.test.yml up -d | |
# set SKIP_URBANOPT_ALGO=true to skip UrbanOpt algo tests | |
docker-compose exec -e SKIP_URBANOPT_ALGO=true -T web /usr/local/bin/run-server-tests | |
docker-compose stop | |
git checkout -- .dockerignore && git checkout -- Dockerfile | |
env: | |
CI: true | |
OS_SERVER_NUMBER_OF_WORKERS: 4 | |
BUILD_TYPE: docker | |
COMPOSE_INTERACTIVE_NO_CLI: 1 | |
- name: logs | |
if: ${{ failure() }} | |
shell: bash | |
run: ./ci/github-actions/print_logs.sh | |
- name: docker-upload | |
if: | | |
github.ref == 'refs/heads/master' || | |
github.ref == 'refs/heads/develop' | |
# github.ref == 'refs/heads/3.9.0' | |
shell: bash | |
run: ./docker/deployment/scripts/deploy_docker_github_actions.sh | |
env: | |
CI: true | |
BUILD_TYPE: docker | |
# On forked Pull Requests secrets will not be sent to the runner. See more info here: | |
# https://docs.github.com/en/actions/reference/encrypted-secrets | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} |