Skip to content

Add GitHub Actions workflow for building installers #1

Add GitHub Actions workflow for building installers

Add GitHub Actions workflow for building installers #1

name: Build Installers
on:
workflow_dispatch:
inputs:
openstudio_version:
description: 'OpenStudio Version (e.g. 3.11.0)'
required: true
default: '3.11.0'
openstudio_version_sha:
description: 'OpenStudio Version SHA (e.g. 241b8abb4d)'
required: true
default: '241b8abb4d'
openstudio_version_ext:
description: 'OpenStudio Version Extension (e.g. -rc1)'
required: false
default: ''
push:
branches:
- master
- develop
pull_request:
env:
OPENSTUDIO_VERSION: ${{ inputs.openstudio_version || '3.11.0' }}
OPENSTUDIO_VERSION_SHA: ${{ inputs.openstudio_version_sha || '241b8abb4d' }}
OPENSTUDIO_VERSION_EXT: ${{ inputs.openstudio_version_ext || '' }}
jobs:
build-linux:
runs-on: ubuntu-24.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: build
- name: Build Gem Package
shell: bash
run: ./ci/github-actions/export_build_linux.sh
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
name: openstudio-server-gems-linux
path: build/NREL/export/*.tar.gz
build-macos:
runs-on: macos-15-intel # Intel runner required for x86_64 architecture compatibility with OpenStudio (matching the test workflow)
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
shell: bash
run: ./ci/github-actions/setup.sh
env:
BUILD_TYPE: build
- name: Build Gem Package
shell: bash
run: ./ci/github-actions/export_build_osx.sh
- name: Upload macOS Artifact
uses: actions/upload-artifact@v4
with:
name: openstudio-server-gems-darwin
path: build/NREL/export/*.tar.gz
build-macos-arm:
runs-on: macos-15
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
shell: bash
run: ./ci/github-actions/setup.sh
env:
BUILD_TYPE: build
- name: Build Gem Package
shell: bash
run: ./ci/github-actions/export_build_osx.sh
- name: Upload macOS ARM Artifact
uses: actions/upload-artifact@v4
with:
name: openstudio-server-gems-darwin-arm
path: build/NREL/export/*.tar.gz
build-windows:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
bundler-cache: false # We manage gems manually via openstudio_meta
- name: Setup Windows Environment
shell: cmd
run: ci\github-actions\setup_win.bat
- name: Build Gem Package
shell: cmd
env:
BUNDLE_VERSION: 2.4.10
GEM_HOME: C:\projects\openstudio-server\gems
GEM_PATH: C:\projects\openstudio-server\gems;C:\projects\openstudio-server\gems\bundler\gems
RUBYLIB: C:\projects\openstudio\Ruby
OPENSTUDIO_TEST_EXE: C:\projects\openstudio\bin\openstudio.exe
run: ci\github-actions\export_build_win.bat
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: openstudio-server-gems-win32
path: build/NREL/export/*.tar.gz