Issue 619 Bug: Solving a system of equations... #855
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'C++ Test' | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
env: | |
tests_path: Sources/Tests/CPPWrapperUnitTests/tests | |
jobs: | |
Testing: | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
flag: win-x64 | |
- os: ubuntu-latest | |
flag: linux-x64 | |
- os: macos-latest | |
flag: osx-x64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET 7 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.100' | |
include-prerelease: true | |
- name: 'Install some libs for Linux' | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get install zlib1g-dev | |
sudo apt-get install libkrb5-dev | |
- name: 'Building the library into native for Windows' | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: cmd | |
run: | | |
cd Sources/Wrappers/AngouriMath.CPP.Exporting | |
mkdir ../AngouriMath.CPP.Importing/out-x64 | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
dotnet publish -p:NativeLib=Shared -p:SelfContained=true -r ${{ matrix.flag }} -c release | |
- name: 'Building the library into native for Linux & MacOS' | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
cd Sources/Wrappers/AngouriMath.CPP.Exporting | |
mkdir ../AngouriMath.CPP.Importing/out-x64 | |
dotnet publish -p:NativeLib=Shared -p:SelfContained=true -r ${{ matrix.flag }} -c release | |
- name: 'Preparing tests' | |
run: | | |
cd ${{ env.tests_path }} | |
cmake -S . -B build | |
mkdir "build/Debug" | |
- name: 'Copying the library for Windows' | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
cd ${{ env.tests_path }} | |
copy "..\..\..\Wrappers\AngouriMath.CPP.Importing\out-x64\AngouriMath.CPP.Exporting.dll" "build\Debug\AngouriMath.CPP.Exporting.dll" | |
- name: 'Copying the library for Linux' | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
cd ${{ env.tests_path }} | |
cp -a "../../../Wrappers/AngouriMath.CPP.Importing/out-x64/AngouriMath.CPP.Exporting.so" "build/Debug/libAngouriMath.CPP.Exporting.so" | |
- name: 'Copying the library for OS X' | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
cd ${{ env.tests_path }} | |
cp -r "../../../Wrappers/AngouriMath.CPP.Importing/out-x64/AngouriMath.CPP.Exporting.dylib" "build/Debug/libAngouriMath.CPP.Exporting.dylib" | |
cd build/Debug | |
path=$(pwd) | |
install_name_tool -id "$path/libAngouriMath.CPP.Exporting.dylib" libAngouriMath.CPP.Exporting.dylib | |
- name: 'Building and running tests' | |
run: | | |
cd ${{ env.tests_path }} | |
cmake --build build | |
cd build | |
ctest | |
- name: 'Upload logs' | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Logs | |
path: ./Sources/Tests/CPPWrapperUnitTests/tests/build/Testing/Temporary |