Skip to content

Improve Robustness of IF97 Reverse (P,H) and (P,S) Evaluations Along Saturation Curve #207

Improve Robustness of IF97 Reverse (P,H) and (P,S) Evaluations Along Saturation Curve

Improve Robustness of IF97 Reverse (P,H) and (P,S) Evaluations Along Saturation Curve #207

Workflow file for this run

name: Library builds (shared)
on:
push:
branches: [ 'master', 'main', 'develop', 'actions_shared' ]
tags: [ 'v*' ]
pull_request:
branches: [ 'master', 'main', 'develop' ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests packaging
- name: Extract CoolProp version from CMakeLists.txt
shell: bash
run: |
set -x
COOLPROP_VERSION=$(python dev/extract_version.py --cmake-only)
echo COOLPROP_VERSION=$COOLPROP_VERSION >> $GITHUB_ENV
- name: Configure CMake
run: cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=${{ env.BUILD_TYPE }} -DCOOLPROP_SHARED_LIBRARY:BOOL=ON
- name: Build
run: cmake --build build --target install -j $(nproc) --config ${{ env.BUILD_TYPE }}
# Create a special case for Windows since we also need 2 flavours of 32bit binaries
- name: Configure CMake for 32bit Windows stdcall
if: startsWith(matrix.os, 'windows')
run: cmake -B build_stdc -S . -DCMAKE_BUILD_TYPE:STRING=${{ env.BUILD_TYPE }} -DCOOLPROP_SHARED_LIBRARY:BOOL=ON -DCOOLPROP_STDCALL_LIBRARY:BOOL=ON -A Win32
- name: Build with CMake for 32bit Windows stdcall
if: startsWith(matrix.os, 'windows')
run: cmake --build build_stdc --target install -j $(nproc) --config ${{ env.BUILD_TYPE }}
- name: Configure CMake for 32bit Windows cdecl
if: startsWith(matrix.os, 'windows')
run: cmake -B build_cdecl -S . -DCMAKE_BUILD_TYPE:STRING=${{ env.BUILD_TYPE }} -DCOOLPROP_SHARED_LIBRARY:BOOL=ON -DCOOLPROP_CDECL_LIBRARY:BOOL=ON -A Win32
- name: Build with CMake for 32bit Windows cdecl
if: startsWith(matrix.os, 'windows')
run: cmake --build build_cdecl --target install -j $(nproc) --config ${{ env.BUILD_TYPE }}
# - name: Tar.gz the shared library to maintain case sensitivy and file permissions
# working-directory: ./install_root/shared_library/
# shell: bash
# run: |
# set -x
# tar -cvzf CoolProp-${{ env.COOLPROP_VERSION }}-shared-${{ matrix.os }}.tar.gz ./*
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: shared_library
path: install_root/shared_library
# - 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: install_root/shared_library/CoolProp-${{ env.COOLPROP_VERSION }}-shared-${{ matrix.os }}.tar.gz
# tag: ${{ github.ref }}
# overwrite: true
# file_glob: false