Skip to content

Conan v2 + OS SDK 3.8.0-rc2 #1227

Conan v2 + OS SDK 3.8.0-rc2

Conan v2 + OS SDK 3.8.0-rc2 #1227

Workflow file for this run

name: C++ CI for OpenStudioApplication
on:
push:
branches: [ master, develop ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [ master, develop ]
env:
BUILD_TYPE: Release
BUILD_DOCUMENTATION: OFF
BUILD_TESTING: ON
BUILD_BENCHMARK: ON
BUILD_PACKAGE: ON
QT_VERSION: 6.6.3
jobs:
build:
# Note: as of 2021-01-29, this only works for push, not for pull request
# if: "!(contains(github.event.head_commit.message, 'skip') && contains(github.event.head_commit.message, 'ci'))"
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-2022, macos-13, macos-arm64]
include:
- os: ubuntu-20.04
SELF_HOSTED: false
PLATFORM_NAME: Linux
BINARY_EXT: deb
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Linux/DEB
COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ
QT_OS_NAME: linux
QT_ARCH: gcc_64
- os: ubuntu-22.04
SELF_HOSTED: false
PLATFORM_NAME: Linux
BINARY_EXT: deb
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Linux/DEB
COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ
QT_OS_NAME: linux
QT_ARCH: gcc_64
- os: windows-2022
SELF_HOSTED: false
PLATFORM_NAME: Windows
BINARY_EXT: exe
COMPRESSED_EXT: zip
BINARY_PKG_PATH: _CPack_Packages/win64/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/win64/ZIP
QT_OS_NAME: windows
QT_ARCH: win64_msvc2019_64
- os: macos-13
SELF_HOSTED: false
PLATFORM_NAME: Darwin
BINARY_EXT: dmg
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Darwin/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/Darwin/TGZ
MACOSX_DEPLOYMENT_TARGET: 11.0
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
QT_OS_NAME: mac
QT_ARCH: clang_64
- os: macos-arm64
SELF_HOSTED: true
PLATFORM_NAME: Darwin
BINARY_EXT: dmg
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Darwin/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/Darwin/TGZ
MACOSX_DEPLOYMENT_TARGET: 12.1
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
QT_OS_NAME: mac
QT_ARCH: arm_64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
if: ${{ !matrix.SELF_HOSTED }}
with:
python-version: '3.8.x'
- uses: ruby/setup-ruby@v1
if: ${{ !matrix.SELF_HOSTED }}
with:
ruby-version: 3.2.2
- name: Extract OSApp and OS SDK versions from CMakeLists.txt
shell: bash
run: |
# This both prints the variables and adds them to GITHUB_ENV
python ci/parse_cmake_versions.py
- name: Set OS-specific options and system dependencies (and QtIFW)
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
run: |
set -x
pwd
echo PLATFORM_NAME=${{ matrix.PLATFORM_NAME }} >> $GITHUB_ENV
echo BINARY_EXT=${{ matrix.BINARY_EXT }} >> $GITHUB_ENV
echo COMPRESSED_EXT=${{ matrix.COMPRESSED_EXT }} >> $GITHUB_ENV
if [ "$RUNNER_OS" == "Windows" ]; then
DIR_SEP="\\"
else
DIR_SEP="/"
fi
echo DIR_SEP=$DIR_SEP >> $GITHUB_ENV
if [ "${{ matrix.SELF_HOSTED }}" != "true" ]; then
CCACHE_DIR="${{ github.workspace }}${DIR_SEP}.ccache"
echo CCACHE_DIR=$CCACHE_DIR >> $GITHUB_ENV
fi
N=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
echo "There are $N threads available"
echo "N=$N" >> $GITHUB_ENV
if [ "$RUNNER_OS" == "Linux" ]; then
echo "Install needed system dependencies for OPENGL (due to Qt) for Linux"
sudo apt update -qq
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build ccache libxkbcommon-x11-dev libgl1-mesa-dev chrpath libxcb-cursor0
gcc --version
ccache --set-config=cache_dir=$CCACHE_DIR
ccache --set-config=max_size=500M
ccache --set-config=compression=true
elif [ "$RUNNER_OS" == "Windows" ]; then
curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.6.1/QtInstallerFramework-windows-x64-4.6.1.exe
./QtInstallerFramework-windows-x64-4.6.1.exe --verbose --script ./ci/install_script_qtifw.qs
dir "C:/Qt/"
echo "C:/Qt/QtIFW-4.6.1/bin" >> $GITHUB_PATH
echo "Using chocolatey to install ninja"
choco install ninja
# using ccache fails to build .rc files on Windows
# ccache is installed under chocolatey but `choco uninstall ccache` fails
# setting CCACHE_DISABLE=1 did not work, just remove ccache
# echo "Remove ccache if it exists"
# rm -f "/c/ProgramData/Chocolatey/bin/ccache" || true
choco install ccache
ccache --set-config=cache_dir=$CCACHE_DIR
ccache --set-config=max_size=500M
ccache --set-config=compression=true
# C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
MSVC_DIR=$(vswhere -products '*' -requires Microsoft.Component.MSBuild -property installationPath -latest)
echo "Latest is: $MSVC_DIR"
echo "MSVC_DIR=$MSVC_DIR" >> $GITHUB_ENV
# add folder containing vcvarsall.bat
echo "$MSVC_DIR\VC\Auxiliary\Build" >> $GITHUB_PATH
elif [ "$RUNNER_OS" == "macOS" ]; then
# The MACOSX_DEPLOYMENT_TARGET environment variable sets the default value for the CMAKE_OSX_DEPLOYMENT_TARGET variable.
echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.MACOSX_DEPLOYMENT_TARGET }} >> $GITHUB_ENV
echo SDKROOT=${{ matrix.SDKROOT }} >> $GITHUB_ENV
echo CMAKE_MACOSX_DEPLOYMENT_TARGET='-DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET' >> $GITHUB_ENV
if [ "${{ matrix.SELF_HOSTED }}" = "true" ]; then
echo "Using previously installed ninja and IFW"
echo "/Users/irvinemac/Qt/Tools/QtInstallerFramework/4.3/bin/" >> $GITHUB_PATH
else
echo "Using brew to install ninja"
brew install ninja md5sha1sum ccache
ccache --set-config=cache_dir=$CCACHE_DIR
ccache --set-config=max_size=500M
ccache --set-config=compression=true
ccache --set-config=compiler_check=content # darwin only
# The openssl@3 package installed on CI adds these files to the pkgconfig directory
# Remove them here so they aren't found instead of the version of OpenSSL built by Conan
rm /usr/local/lib/pkgconfig/libcrypto.pc
rm /usr/local/lib/pkgconfig/libssl.pc
rm /usr/local/lib/pkgconfig/openssl.pc
echo "Installing IFW"
curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.6.1/QtInstallerFramework-macOS-x64-4.6.1.dmg
hdiutil attach -mountpoint ./qtfiw_installer QtInstallerFramework-macOS-x64-4.6.1.dmg
echo "ls ./qtfiw_installer"
ls ./qtfiw_installer
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/MacOS"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/MacOS
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/Resources"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/Resources
sudo ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/MacOS/QtInstallerFramework-macOS-x64-4.6.1 --verbose --script ./ci/install_script_qtifw.qs
ls ~
ls ~/Qt/ || true
ls ~/Qt/QtIFW-4.6.1 || true
echo "~/Qt/QtIFW-4.6.1/bin/" >> $GITHUB_PATH
fi;
fi;
cmake --version
ccache --show-config || true
ccache --zero-stats || true
- name: Install conan
shell: bash
run: |
begin_group() { echo -e "::group::\033[93m$1\033[0m"; }
set -x
begin_group "Install conan 2"
python --version
pip install 'conan>2'
conan --version
echo "::endgroup::"
begin_group "Default profile"
if [ "${{ matrix.SELF_HOSTED }}" == "true" ]; then
export CONAN_USER_HOME=$HOME
else
export CONAN_USER_HOME="${{ github.workspace }}${DIR_SEP}conan-cache"
fi;
echo CONAN_USER_HOME="$CONAN_USER_HOME" >> $GITHUB_ENV
export CONAN_HOME="$CONAN_USER_HOME${DIR_SEP}.conan2"
echo CONAN_HOME="$CONAN_HOME" >> $GITHUB_ENV
export CONAN_PROFILE_DEFAULT="$CONAN_HOME${DIR_SEP}profiles${DIR_SEP}default"
echo CONAN_PROFILE_DEFAULT="$CONAN_PROFILE_DEFAULT" >> $GITHUB_ENV
conan profile detect --force --name default
cat $CONAN_PROFILE_DEFAULT
# Mac has the FreeBSD flavor of sed and MUST take a backup suffix...
sed -i.bak 's/cppstd=.*$/cppstd=20/g' $CONAN_PROFILE_DEFAULT
sed -i.bak 's/build_type=.*$/build_type=${{ env.BUILD_TYPE }}/g' $CONAN_PROFILE_DEFAULT
# Windows only
sed -i.bak 's/compiler.runtime_type=.*$/compiler.runtime_type=${{ env.BUILD_TYPE }}/g' $CONAN_PROFILE_DEFAULT
rm -Rf $CONAN_PROFILE_DEFAULT.bak || true
conan profile show
echo "::endgroup::"
begin_group "Global.conf"
echo "core:non_interactive = True" >> $CONAN_HOME/global.conf
echo "core.download:parallel = {{os.cpu_count() - 2}}" >> $CONAN_HOME/global.conf
echo "core.sources:download_cache = $CONAN_USER_HOME/.conan-download-cache" >> $CONAN_HOME/global.conf
cat $CONAN_HOME/global.conf
echo "::endgroup::"
begin_group "Remotes"
conan remote add --force nrel-v2 https://conan.openstudio.net/artifactory/api/conan/conan-v2
conan remote list
echo "::endgroup::"
begin_group "Debug hashFiles and co"
if [ "${{ matrix.SELF_HOSTED }}" == "false" ]; then
echo "runner.workspace=${{ runner.workspace }}"
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
echo "github.workspace=${{ github.workspace }}"
cat $CONAN_PROFILE_DEFAULT
echo format=${{ format('{0}/.conan/profiles/default', env.CONAN_USER_HOME) }}
echo hashFiles=${{ hashFiles(format('{0}/.conan/profiles/default', env.CONAN_USER_HOME)) }}
echo $CONAN_PROFILE_DEFAULT
echo hashFiles=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}
echo hashFiles_rel=${{ hashFiles('./conan-cache/.conan/profiles/default') }}
echo hashFiles_conanInstall=${{ hashFiles('./ConanInstall.cmake') }}
fi
echo "::endgroup::"
# Note: I'm picking up the ccache before I do the conan cache, otherwise on windows when trying to hashFiles('**/CMakeLists.txt') it looks into the conan folder which fails
# To prevent problems, changing to multiple more specific glob patterns
- name: Setup CCache
uses: actions/cache@v4
id: cacheccache
if: ${{ !matrix.SELF_HOSTED }}
with:
path: |
${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}-ck=${{ secrets.CACHE_KEY }}-cmakelists=${{ hashFiles('CMakeLists.txt', 'src/*/CMakeLists.txt', '*/CMakeLists.txt') }}
restore-keys: |
ccache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}-ck=${{ secrets.CACHE_KEY }}-
- name: Did restoring the CCache-cache work? Yes
# If the SDK wasn't found in the cache
if: steps.cacheccache.outputs.cache-hit == 'true'
shell: bash
run: |
ccache --show-stats -vv || ccache --show-stats
ccache --zero-stats
- name: Setup Conan Cache
uses: actions/cache@v4
id: cacheconan
if: ${{ !matrix.SELF_HOSTED }}
with:
path: |
${{ env.CONAN_USER_HOME }}
key: conan-cache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}-conaninstall=${{ hashFiles('./conanfile.py') }}-ck=${{ secrets.CACHE_KEY }}
restore-keys: |
conan-cache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}-conaninstall=${{ hashFiles('./conanfile.py') }}-
conan-cache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT) }}-
conan-cache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-
- name: Did restoring the conan-cache work? Yes
# If the SDK wasn't found in the cache
if: steps.cacheconan.outputs.cache-hit == 'true'
working-directory: ${{ env.CONAN_USER_HOME }}
shell: bash
run: |
set -x
set +e
cat $CONAN_PROFILE_DEFAULT
ls $CONAN_HOME
ls $CONAN_USER_HOME/.conan-download-cache
cat $CONAN_HOME/global.conf
ls $CONAN_USER_HOME/short
conan config show core.download:download_cache
conan config show core.sources:download_cache
exit 0
# This includes the Qt install, the OpenStudio SDK tar.gz,
# TODO: problem is that caching the entire build dir is limited to 10 GB. The build folder takes 3-4 GB per runner, and we have 4 of them that try to cache
# Perhaps we should just cache the ccache. Anyways, for incremental builds triggered one after another, cache eviction hasn't happened yet and all of them do a cache hit
- name: Cache Qt and SDK
id: cachebuild
if: ${{ !matrix.SELF_HOSTED }}
uses: actions/cache@v3
with:
path: |
build/Qt-install
build/OpenStudio-${{ env.OS_SDK_VERSION }}
key: minimal-build-cache-${{ matrix.os }}-build=${{ env.BUILD_TYPE }}-qt=${{ env.QT_VERSION }}-conan-profile=${{ hashFiles(env.CONAN_PROFILE_DEFAULT)}}-ck=${{ secrets.CACHE_KEY }}
- name: Did restoring the build-cache work? Yes
# If it was found in the cache, list files, and Delete the packages already produced
if: steps.cachebuild.outputs.cache-hit == 'true'
shell: bash
run: |
set -x
ls build/ || true
cat build/CMakeCache.txt || true
/bin/rm build/OpenStudioApplication-*${{ env.PLATFORM_NAME }}* || true
ls build/ || true
# Delete the archived OS SDK if not the expected version
if [ -d "build/OpenStudio-$OS_SDK_VERSION" ]; then
cd build/OpenStudio-$OS_SDK_VERSION
ls $OS_SDK_INSTALLER_NAME* || rm -Rf ./*
fi
- name: Install Qt
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
shell: bash
if: ${{ !matrix.SELF_HOSTED }}
run: |
set -x
cmake -E make_directory ./build
if [ "$RUNNER_OS" == "Windows" ]; then
# QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/msvc2019_64"
QT_INSTALL_DIR="$(cmd.exe //c cd)\build\Qt-install\${{ env.QT_VERSION }}\msvc2019_64"
elif [ "$RUNNER_OS" == "macOS" ]; then
QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/macos"
else
QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/${{ matrix.QT_ARCH }}"
fi
if [ -d "$QT_INSTALL_DIR" ]; then
echo "Qt $QT_VERSION already installed"
else
echo "Install aqtinstall, then install Qt $QT_VERSION for ${{ matrix.QT_OS_NAME }} ${{ matrix.QT_ARCH }}"
pip show setuptools
pip install setuptools --upgrade
pip3 install aqtinstall
aqt install-qt --outputdir ./build/Qt-install/ ${{ matrix.QT_OS_NAME }} desktop $QT_VERSION ${{ matrix.QT_ARCH }} -m qtwebchannel qtwebengine qtwebview qt5compat qtpositioning
fi
echo "$QT_INSTALL_DIR/bin" >> $GITHUB_PATH
echo QT_INSTALL_DIR=$QT_INSTALL_DIR >> $GITHUB_ENV
#ls ./build/Qt-install/$QT_VERSION/
#ls $QT_INSTALL_DIR || true
#ls $QT_INSTALL_DIR/lib || true
#ls $QT_INSTALL_DIR/lib/cmake || true
find ./build/Qt-install -name "*.cmake"
#ls $QT_INSTALL_DIR/translations || true
#ls $QT_INSTALL_DIR/translations/qtwebengine_locales || true
find ./build/Qt-install . -name "*.qm"
find ./build/Qt-install . -name "*.pak"
- name: Find Qt (Self-Hosted)
shell: bash
if: ${{ matrix.SELF_HOSTED }}
run: |
set -x
cmake -E make_directory ./build
if [ "$RUNNER_OS" == "macOS" ]; then
QT_INSTALL_DIR="/Users/irvinemac/Qt/6.6.3/macos/"
fi
echo "$QT_INSTALL_DIR/bin" >> $GITHUB_PATH
echo QT_INSTALL_DIR=$QT_INSTALL_DIR >> $GITHUB_ENV
#ls ./build/Qt-install/$QT_VERSION/
#ls $QT_INSTALL_DIR || true
#ls $QT_INSTALL_DIR/lib || true
#ls $QT_INSTALL_DIR/lib/cmake || true
find $QT_INSTALL_DIR -name "*.cmake"
#ls $QT_INSTALL_DIR/translations || true
#ls $QT_INSTALL_DIR/translations/qtwebengine_locales || true
find $QT_INSTALL_DIR . -name "*.qm"
find $QT_INSTALL_DIR . -name "*.pak"
- name: Configure CMake & build (Windows)
if: runner.os == 'Windows'
shell: cmd
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# NOTE: If you re-enable 'Download the OpenStudio installer' step, then pass `openstudio_DIR=$openstudio_DIR cmake [etc]`
run: |
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release
cmake --preset conan-release -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} ^
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} ^
-DBUILD_PACKAGE:BOOL=${{ env.BUILD_PACKAGE }} ^
-DANALYTICS_API_SECRET:STRING=${{ secrets.ANALYTICS_API_SECRET }} ^
-DANALYTICS_MEASUREMENT_ID:STRING=${{ secrets.ANALYTICS_MEASUREMENT_ID }}
cmake --build --preset conan-release --target package
# Delete conan build and source folders
conan cache clean --source --build --download --temp
ccache --show-stats -vv || ccache --show-stats || true
# Debug CPack:
# "C:\Program Files\CMake\bin\cpack.exe" --debug --verbose --config CPackConfig.cmake
- name: Configure CMake (Unix)
if: runner.os != 'Windows'
shell: bash
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# NOTE: If you re-enable 'Download the OpenStudio installer' step, then pass `openstudio_DIR=$openstudio_DIR cmake [etc]`
run: |
set -x
conan install . --output-folder=./build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.cppstd=20 -s build_type=Release
cmake --preset conan-release -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} \
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} \
-DBUILD_PACKAGE:BOOL=${{ env.BUILD_PACKAGE }} \
-DANALYTICS_API_SECRET:STRING=${{ secrets.ANALYTICS_API_SECRET }} \
-DANALYTICS_MEASUREMENT_ID:STRING=${{ secrets.ANALYTICS_MEASUREMENT_ID }}
cmake --build --preset conan-release --target package
# Delete conan build and source folders
conan cache clean --source --build --download --temp
ccache --show-stats -vv || ccache --show-stats || true
- name: Test bed Sign inner portable executable files and exe package (Windows 2022)
working-directory: ./build
if: (matrix.os == 'windows-2022')
shell: powershell
run: |
$installer_exe = Get-ChildItem -Filter "${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}" -File | Select-Object -First 1 | % { $_.FullName}
echo $installer_exe
echo "$installer_exe"
- name: Sign inner portable executable files and exe package (Windows 2022)
working-directory: ./build
# if: (runner.os == 'Windows')
if: contains(github.ref, 'refs/tags') && (matrix.os == 'windows-2022')
shell: powershell
run: |
# Install signpath
Install-Module -Name SignPath -Force
# Sign the OpenStudioApp.exe, put the signed version in place
Submit-SigningRequest `
-InputArtifactPath "Products/OpenStudioApp.exe" `
-CIUserToken "${{ secrets.SIGNPATH_CI_TOKEN }}" `
-OrganizationId "97f757f1-cd69-467b-b87b-db3eb5102a57" `
-ProjectSlug "OpenStudioApplication" `
-SigningPolicySlug "No_Approval_Release_GHA" `
-OutputArtifactPath "Products/OpenStudioApp.exe" `
-WaitForCompletion -Force
# Repackage
cpack
# Sign the .exe installer as well
$installer_exe = Get-ChildItem -Filter "${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}" -File | Select-Object -First 1 | % { $_.FullName}
Submit-SigningRequest `
-InputArtifactPath "$installer_exe" `
-CIUserToken "${{ secrets.SIGNPATH_CI_TOKEN }}" `
-OrganizationId "97f757f1-cd69-467b-b87b-db3eb5102a57" `
-ProjectSlug "OpenStudioApplication" `
-SigningPolicySlug "No_Approval_Release_GHA" `
-OutputArtifactPath "$installer_exe" `
-WaitForCompletion -Force
- name: Archive binary artifacts
uses: actions/upload-artifact@v4
# build/_CPack_Packages/win64/IFW/*.exe
# build/_CPack_Packages/Linux/DEB/*.deb
# build/_CPack_Packages/Darwin/IFW/*.dmg
with:
name: OpenStudioApplication-${{ env.OS_APP_VERSION }}.${{ github.sha }}-${{ matrix.os }}.${{ env.BINARY_EXT }}
path: build/${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}
- name: Archive TGZ or ZIP artifacts
uses: actions/upload-artifact@v4
with:
name: OpenStudioApplication-${{ env.OS_APP_VERSION }}.${{ github.sha }}-${{ matrix.os }}.${{ env.COMPRESSED_EXT }}
path: build/${{ matrix.COMPRESSED_PKG_PATH }}/*.${{ env.COMPRESSED_EXT }}
- name: Test
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
Xvfb :99 &
export DISPLAY=:99
ctest -j -T test --output-on-failure --no-compress-output -C $BUILD_TYPE || true
- name: Archive test results?
uses: actions/upload-artifact@v4
with:
name: OpenStudioApplication-${{ env.OS_APP_VERSION }}.${{ github.sha }}-${{ matrix.os }}-Test.xml
path: build/Testing/**/*.xml
- name: Benchmark
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
Xvfb :99 &
export DISPLAY=:99
Products/SpacesSurfaces_Benchmark --benchmark_out_format=csv --benchmark_out='bench_results_SpacesSurfaces.csv' || true
- name: Archive benchmark results?
uses: actions/upload-artifact@v4
with:
name: OpenStudioApplication-${{ env.OS_APP_VERSION }}.${{ github.sha }}-${{ matrix.os }}-bench_results.csv
path: build/bench_results_*.csv
- name: Upload Binary installer to release
if: contains(github.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload TGZ or ZIP to release
if: contains(github.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/${{ matrix.COMPRESSED_PKG_PATH }}/*.${{ env.COMPRESSED_EXT }}
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Delete binary packages
working-directory: ./build/
shell: bash
run: |
ls OpenStudioApplication-*
/bin/rm OpenStudioApplication-*${{ env.COMPRESSED_EXT }} || true
/bin/rm OpenStudioApplication-*${{ env.BINARY_EXT }} || true
ls OpenStudioApplication-* || true