Skip to content

fix(ZonePicker): support new LBT and deprecate Legacy version #201

fix(ZonePicker): support new LBT and deprecate Legacy version

fix(ZonePicker): support new LBT and deprecate Legacy version #201

Workflow file for this run

env:
INSTALLBUILDER_DIR: ../ib
INSTALLBUILDER_URL: https://storage.googleapis.com/pollination-public/plugins/installerAssets/installbuilder-enterprise-21.12.0-windows-x64-installer.exe
name: CD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Build_windows:
name: "Build for windows"
runs-on: windows-latest
continue-on-error: false
strategy:
fail-fast: true
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v3
- name: Setup MSbuild
uses: microsoft/setup-msbuild@v1.0.2
# this is for fixing semantic-release-action
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Semantic Release - dry run for getting version
if: github.ref == 'refs/heads/master'
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Set test version
shell: bash
run: |
echo "ReleaseVersion=0.0.1" >> $GITHUB_ENV
- name: Set real version
if: github.ref == 'refs/heads/master'
shell: bash
run: |
echo "ReleaseVersion=${{ steps.semantic.outputs.new_release_version }}" >> $GITHUB_ENV
- name: MSBuild GH Plugin
run: |
echo ${{ env.ReleaseVersion }}
msbuild src/Ironbug.Grasshopper/Ironbug.Grasshopper.csproj /p:Configuration=Release /p:Platform=x64 /p:Version=${{ env.ReleaseVersion }} /restore
mkdir installer/plugin
mv src/Ironbug.Grasshopper/bin/x64/Release/* installer/plugin
mkdir installer/HVACTemplates
cp doc/HVAC_GHTemplates/* installer/HVACTemplates -r
ls installer -r
- name: Build Ironbug.Console
run: |
dotnet build ./src/Ironbug.Console/Ironbug.Console.csproj /p:Configuration=Release /p:Platform=x64 /p:TargetFramework=NET48 /p:Version=${{ env.ReleaseVersion }}
ls ./src/Ironbug.Console/bin/x64/Release/
7z a -tzip ironbug.console.win.zip ./src/Ironbug.Console/bin/x64/Release/
cp ./src/Ironbug.Console/bin/x64/Release/Ironbug.Console.exe installer/plugin
- name: Unit tests
run: |
dotnet test src\Ironbug.HVAC_Tests --arch x64
- name: Console test
run: |
echo "Test standalone console with sample model"
cp "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/FourOfficeBuilding.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test.osm"
./src/Ironbug.Console/bin/x64/Release/Ironbug.Console.exe "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/Sys01_PTAC_AllElec.json"
echo "Test console with GH plugin"
mkdir "C:/Program Files/ladybug_tools/openstudio/CSharp/openstudio"
cp ./src/Ironbug.Console/bin/x64/Release/openstudio* "C:/Program Files/ladybug_tools/openstudio/CSharp/openstudio"
cp "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/FourOfficeBuilding.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test2.osm"
./src/Ironbug.Console/bin/x64/Release/Ironbug.Console.exe "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test2.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/Sys01_PTAC_AllElec.json"
- name: zip plugin
shell: bash
run: |
mkdir ./ironbug
cp ./installer/plugin/* ./ironbug -r
cp ./installer/HVACTemplates ./ironbug -r
7z a -tzip ironbug.zip ./ironbug
ls
- name: Install the InstalBuilder
shell: bash
env:
IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
run: |
curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.exe
./ib.exe --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe --version
echo "$IB_LICENSE" > lic.xml
- name: Create installer package
shell: bash
run: |
${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe build installer/Ironbug.xml \
--license lic.xml \
--setvars project.outputDirectory=$(pwd) \
--setvars project.version=${{ env.ReleaseVersion }} \
--verbose
cp ./*-installer.exe ./installer.exe
ls -l
- name: Upload Installer
uses: actions/upload-artifact@v3
with:
name: windows
path: |
ironbug.zip
installer.exe
ironbug.console.win.zip
Build_ubuntu:
name: "Build for ubuntu"
runs-on: ubuntu-latest
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v3
- name: Unit tests
run: |
cd ./src/Ironbug.HVAC_Tests
dotnet restore Ironbug.HVAC_Tests.csproj
dotnet test Ironbug.HVAC_Tests.csproj --arch x64
ls
# this is for fixing semantic-release-action
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Semantic Release - dry run for getting version
if: github.ref == 'refs/heads/master'
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Set test version
shell: bash
run: |
echo "ReleaseVersion=0.0.1" >> $GITHUB_ENV
- name: Set real version
if: github.ref == 'refs/heads/master'
shell: bash
run: |
echo "ReleaseVersion=${{ steps.semantic.outputs.new_release_version }}" >> $GITHUB_ENV
- name: Build
run: |
dotnet build ./src/Ironbug.Console/Ironbug.Console.csproj -a x64 /p:Configuration=Release /p:TargetFramework=NET7 /p:Version=${{ env.ReleaseVersion }}
ls ./src/Ironbug.Console/bin/Release/linux-x64
zip -r ironbug.console.linux.zip ./src/Ironbug.Console/bin/Release/linux-x64
- name: Console test
run: |
echo "Test standalone console with sample model"
cp "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/FourOfficeBuilding.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test.osm"
./src/Ironbug.Console/bin/Release/linux-x64/Ironbug.Console "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/test.osm" "./src/Ironbug.HVAC_Tests/TestSource/Integration Testing/Sys01_PTAC_AllElec.json"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: ironbug.console.linux.zip
release:
name: deploy installers
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [Build_windows, Build_ubuntu]
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v3
- name: Download all installers
uses: actions/download-artifact@v3
- name: list files
run: |
cp ./windows/* .
cp ./linux/* .
ls -l
- uses: actions/setup-node@v3
if: github.ref == 'refs/heads/master'
with:
node-version: 14
- uses: cycjimmy/semantic-release-action@v3
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}