Actions for Mathcad (#2322)

Added the Mathcad module to the GitHub actions
This commit is contained in:
Jorrit Wronski
2023-11-29 08:35:13 +01:00
committed by GitHub
parent abe3a1b51b
commit e83c7160d3
2 changed files with 43 additions and 3 deletions

40
.github/workflows/mathcad_builder.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Mathcad wrapper
on:
push:
branches: [ 'master', 'main', 'develop', 'actions_mathcad' ]
tags: [ 'v*' ]
pull_request:
branches: [ 'master', 'main', 'develop' ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Get dependencies
shell: bash
run: |
mkdir "Custom Functions"
cd "Custom Functions"
curl -H "Authorization: token ${{ secrets.COOLPROP_ORG_REPO_TOKEN }}" https://raw.githubusercontent.com/CoolProp/PRIVATE_DEPENDENCIES/main/MathcadPrime/Custom%20Functions/mcadincl.h --output mcadincl.h
curl -H "Authorization: token ${{ secrets.COOLPROP_ORG_REPO_TOKEN }}" https://raw.githubusercontent.com/CoolProp/PRIVATE_DEPENDENCIES/main/MathcadPrime/Custom%20Functions/mcaduser.lib --output mcaduser.lib
- name: Configure CMake
run: cmake -DCOOLPROP_PRIME_MODULE:BOOL=ON -DCOOLPROP_PRIME_ROOT:STRING="${{ github.workspace }}" -B build -S .
- name: Build
run: |
cmake --build build --target CoolPropMathcadWrapper -j $(nproc) --config Release
cmake --build build --target install --config Release
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: MathcadPrime
path: install_root/MathcadPrime

View File

@@ -778,7 +778,7 @@ if(COOLPROP_PRIME_MODULE)
if("${COOLPROP_PRIME_ROOT}" STREQUAL "")
message(
FATAL_ERROR
"You must provide the path to MathCAD Prime Root directory using something like -DCOOLPROP_PRIME_ROOT=\"C:/Program Files/PTC/Mathcad Prime 3.1\""
"You must provide the path to Mathcad Prime Root directory using something like -DCOOLPROP_PRIME_ROOT=\"C:/Program Files/PTC/Mathcad Prime 3.1\""
)
else()
message(STATUS "COOLPROP_PRIME_ROOT: ${COOLPROP_PRIME_ROOT}")
@@ -796,11 +796,11 @@ if(COOLPROP_PRIME_MODULE)
set_target_properties(CoolPropMathcadWrapper PROPERTIES SUFFIX ".dll" PREFIX
"")
install(TARGETS CoolPropMathcadWrapper
DESTINATION "${COOLPROP_INSTALL_PREFIX}/MathCADPrime")
DESTINATION "${COOLPROP_INSTALL_PREFIX}/MathcadPrime")
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/wrappers/MathCAD/Prime/CoolPropFluidProperties.mcdx"
DESTINATION MathCADPrime)
DESTINATION MathcadPrime)
endif()
if(COOLPROP_MATHCAD15_MODULE)