add dll folder as loading library search path (#145) #151
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: FMI4cpp CI | |
on: [ push, workflow_dispatch ] | |
jobs: | |
cmake-on-linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \ | |
gcc g++ cmake libzip-dev libpugixml-dev | |
- name: Configure and build | |
run: | | |
cmake . -B build -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- name: Test | |
run: | | |
cd build/tests && ctest | |
vcpkg-on-linux: | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: gcc-${{ matrix.compiler_version }} | |
CXX: g++-${{ matrix.compiler_version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
compiler_version: [11] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step) | |
uses: lukka/run-vcpkg@v10 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: '4cac260c4b7331538d31886f57739fea0bffa27e' | |
vcpkgJsonGlob: 'vcpkg.json' | |
appendedCacheKey: vcpkginstall | |
- name: Configure and build | |
run: | | |
cmake . -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- name: Test | |
run: | | |
cd build/tests && ctest | |
vcpkg-on-windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, windows-2022] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step) | |
uses: lukka/run-vcpkg@v10 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: '4cac260c4b7331538d31886f57739fea0bffa27e' | |
vcpkgJsonGlob: 'vcpkg.json' | |
appendedCacheKey: vcpkginstall | |
- name: Configure and build | |
run: | | |
cmake . -B build -A x64 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DFMI4CPP_BUILD_TESTS=ON -DFMI4CPP_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build --config Release | |
shell: bash | |
- name: Test | |
run: | | |
cd build/tests && ctest -C Release | |
shell: bash |