Skip to content

Bumped CoolProp version once more #132

Bumped CoolProp version once more

Bumped CoolProp version once more #132

Workflow file for this run

name: Continuous Integration
on: [push]
jobs:
finish-ci:
runs-on: ubuntu-latest
needs: [build-macos, build-linux, build-windows, build-msys-openmodelica, build-msys, build-docs]
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v5
with:
pattern: binaries-*
merge-multiple: true
- name: Determine the name suffix
id: ref_name
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "This is a tag build"
echo "ref_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
echo "This is a branch build"
echo "ref_name=latest" >> $GITHUB_OUTPUT
fi
- name: Copy the PDF manual
run: cp ExternalMedia/Resources/manual.pdf ExternalMedia-${{ steps.ref_name.outputs.ref_name }}.pdf
- name: Zip binaries
uses: papeloto/action-zip@v1
with:
files: ExternalMedia/
recursive: true
dest: ExternalMedia-${{ steps.ref_name.outputs.ref_name }}.zip
- name: Display the file structure
run: ls -R
- name: Upload zipped binaries
uses: actions/upload-artifact@v5
with:
name: ExternalMedia-binaries
path: |
./ExternalMedia-latest.pdf
./ExternalMedia-latest.zip
if: github.ref_type != 'tag'
- name: Release on GitHub
uses: softprops/action-gh-release@v2
with:
files: |
./ExternalMedia-*.pdf
./ExternalMedia-*.zip
if: github.ref_type == 'tag'
- uses: geekyeggo/delete-artifact@v5
with:
name: binaries-*
get-coolprop:
runs-on: ubuntu-latest
outputs:
coolprop-hash: ${{ steps.coolprop_hash.outputs.coolprop-hash }}
coolprop-check: ${{ steps.coolprop_check.outputs.coolprop-check }}
env:
COOLPROP_VERSION: v7.2.0
steps:
- name: Get CoolProp version hash
shell: bash
id: coolprop_hash
run: echo "coolprop-hash=$(git ls-remote https://github.com/CoolProp/CoolProp.git refs/tags/${COOLPROP_VERSION} | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Restore the CoolProp cache
uses: actions/cache/restore@v4
id: coolprop_cache
with:
key: coolprop-${{ steps.coolprop_hash.outputs.coolprop-hash }}
path: externals/CoolProp.git
lookup-only: true
enableCrossOsArchive: true
- name: Download CoolProp sources
if: steps.coolprop_cache.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir externals
cd externals
git clone --recursive https://github.com/CoolProp/CoolProp.git CoolProp.git
cd CoolProp.git
git checkout tags/${COOLPROP_VERSION}
git submodule update --init --recursive
- name: Save the CoolProp cache
uses: actions/cache/save@v4
if: steps.coolprop_cache.outputs.cache-hit != 'true'
with:
key: coolprop-${{ steps.coolprop_hash.outputs.coolprop-hash }}
path: externals/CoolProp.git
enableCrossOsArchive: true
- name: Set CoolProp availability
id: coolprop_check
shell: bash
run: |
if [ "${{ steps.coolprop_cache.outputs.cache-hit }}" = "true" ]; then
echo "CoolProp exists in the cache"
echo "coolprop-check=1" >> $GITHUB_OUTPUT
else
if [ -d "externals/CoolProp.git" ]; then
echo "CoolProp has been cloned successfully"
echo "coolprop-check=1" >> $GITHUB_OUTPUT
else
echo "CoolProp is NOT available"
echo "coolprop-check=0" >> $GITHUB_OUTPUT
fi
fi
build-macos:
needs: get-coolprop
runs-on: ${{ matrix.platform }}
strategy:
# Only use one build here, otherwise we cannot control which build is included in the release zip package
# Check the use of the ${MODELICA_PLATFORM} and ${MODELICA_COMPILER} variables in the CMake files
matrix:
include:
- platform: macos-latest # currently macos-26, arm-only
arch: arm64
- platform: macos-15-intel
arch: x86_64
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: |
cmake --version
cmake -E make_directory ${{runner.workspace}}/build
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Configure with CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake ${GITHUB_WORKSPACE}/Projects -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DFLUIDPROP=0 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }} || true
cmake ${GITHUB_WORKSPACE}/Projects -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DFLUIDPROP=0 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
- name: Build with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target ExternalMediaLib
- name: Install with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install
- name: upload macos artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-macos-${{ matrix.arch }}
path: Modelica
build-linux:
needs: get-coolprop
runs-on: ${{ matrix.platform }}
strategy:
# Only use one build here, otherwise we cannot control which build is included in the release zip package
# Check the use of the ${MODELICA_PLATFORM} and ${MODELICA_COMPILER} variables in the CMake files
matrix:
include:
- platform: ubuntu-latest
#- platform: ubuntu-20.04
#- platform: ubuntu-18.04
steps:
- uses: actions/checkout@v5
- name: Create Build Environment
run: |
cmake --version
cmake -E make_directory ${{runner.workspace}}/build
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Configure with CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake ${GITHUB_WORKSPACE}/Projects -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=0 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }} || true
cmake ${GITHUB_WORKSPACE}/Projects -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=0 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
- name: Build with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target ExternalMediaLib
- name: Install with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install
- name: upload linux artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-linux-x86_64
path: Modelica
build-windows:
needs: get-coolprop
runs-on: ${{ matrix.platform }}
strategy:
# Use several builds here, Windows requires different builds for different compilers
# Check the use of the ${MODELICA_PLATFORM} and ${MODELICA_COMPILER} variables in the CMake files
matrix:
include:
- platform: windows-2025
generator: Visual Studio 17 2022
arch: Win32
toolset: v143
- platform: windows-2025
generator: Visual Studio 17 2022
arch: x64
toolset: v143
steps:
- uses: actions/checkout@v5
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Create Build Environment
run: |
cmake --version
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure with CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ runner.workspace }}/ExternalMedia/Projects -A ${{ matrix.arch }} -G "${{ matrix.generator }}" -T "${{ matrix.toolset }}" -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
cmake ${{ runner.workspace }}/ExternalMedia/Projects -A ${{ matrix.arch }} -G "${{ matrix.generator }}" -T "${{ matrix.toolset }}" -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
- name: Build with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target ExternalMediaLib --config Release
- name: Install with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install --config Release
- name: upload windows artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-windows-${{ matrix.toolset }}-${{ matrix.arch }}
path: Modelica
get-msys-openmodelica:
runs-on: windows-latest
outputs:
omdev-hash: ${{ steps.keyomdev.outputs.omdev-hash }}
steps:
- name: Get OMDev version hash
shell: bash
id: keyomdev
run: echo "omdev-hash=$(git ls-remote https://openmodelica.org/git/OMDev.git HEAD | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Restore the OMDev cache
uses: actions/cache/restore@v4
id: cacheomdev
with:
path: C:/OMDev
key: omdev-${{ steps.keyomdev.outputs.omdev-hash }}
lookup-only: true
- name: Create the OMDev environment
if: steps.cacheomdev.outputs.cache-hit != 'true'
run: git clone https://openmodelica.org/git/OMDev.git C:/OMDev
- name: Save the OMDev cache
uses: actions/cache/save@v4
if: steps.cacheomdev.outputs.cache-hit != 'true'
with:
path: C:/OMDev
key: omdev-${{ steps.keyomdev.outputs.omdev-hash }}
build-msys-openmodelica:
needs: [get-msys-openmodelica, get-coolprop]
runs-on: windows-latest
strategy:
matrix:
include:
- bitness: 32
- bitness: 64
steps:
- name: Restore the OMDev cache
uses: actions/cache/restore@v4
id: cache-omdev
with:
path: C:/OMDev
key: omdev-${{ needs.get-msys-openmodelica.outputs.omdev-hash }}
- uses: actions/checkout@v5
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Configure with CMake for ${{ matrix.bitness }}bit
working-directory: ${{runner.workspace}}
run: |
$env:Path = "${env:ProgramFiles}\CMake\bin;C:\OMDev\tools\msys\usr\bin;C:\OMDev\tools\msys\mingw${{ matrix.bitness }}\bin;$env:Path"
cmake -B build -S ${{ runner.workspace }}/ExternalMedia/Projects -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
cmake -B build -S ${{ runner.workspace }}/ExternalMedia/Projects -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
- name: Build with CMake for ${{ matrix.bitness }}bit
working-directory: ${{runner.workspace}}
run: |
$env:Path = "${env:ProgramFiles}\CMake\bin;C:\OMDev\tools\msys\usr\bin;C:\OMDev\tools\msys\mingw${{ matrix.bitness }}\bin;$env:Path"
cmake --build build --target ExternalMediaLib
cmake --build build --target install
- name: upload msys-openmodelica artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-windows-msys-openmodelica-${{ matrix.bitness }}
path: Modelica
build-msys:
needs: get-coolprop
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Create Build Environment
run: |
cmake --version
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure with CMake
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ runner.workspace }}/ExternalMedia/Projects -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
cmake ${{ runner.workspace }}/ExternalMedia/Projects -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP=1 -DCOOLPROP=${{ needs.get-coolprop.outputs.coolprop-check }}
- name: Build with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target ExternalMediaLib
- name: Install with CMake
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install
#- name: upload msys artifacts
# uses: actions/upload-artifact@v4
# with:
# name: binaries-msys
# path: Modelica
build-docs:
needs: get-coolprop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Restore CoolProp sources
if: needs.get-coolprop.outputs.coolprop-check == '1'
uses: actions/cache/restore@v4
with:
key: coolprop-${{ needs.get-coolprop.outputs.coolprop-hash }}
path: externals/CoolProp.git
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Build Doxygen sources
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'Projects/'
doxyfile-path: './Doxyfile'
enable-latex: true
- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: Projects/Documentation
- name: Copy PDF to Modelica tree
run: cp 'Projects/Documentation/latex/refman.pdf' 'Modelica/ExternalMedia/Resources/manual.pdf'
- name: Upload Modelica sources with PDF
uses: actions/upload-artifact@v4
with:
name: binaries-docs
path: Modelica
- name: Deploy generated HTML
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: Projects/Documentation/html
#destination_dir: latest