Skip to content

Github action update #23

Github action update

Github action update #23

Workflow file for this run

name: Build and test
on: [push, workflow_dispatch]
jobs:
linux:
name: Linux
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Configure Conan
run: |
conan profile detect
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
- name: Generate build system
run: cmake --preset conan-$(echo ${{ matrix.build_type }} | tr '[:upper:]' '[:lower:]') -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
- name: Build
run: cmake --build --preset conan-$(echo ${{ matrix.build_type }} | tr '[:upper:]' '[:lower:]')
- name: Test
run: |
cd build/tests
ctest --output-on-failure --extra-verbose
- uses: actions/upload-artifact@v3
if: matrix.build_type == 'Release'
with:
name: proxyfmu
path: build/bin/proxyfmu*
windows:
name: Windows
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Configure Conan
run: |
conan profile detect
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
- name: Generate build system
run: cmake --preset conan-default -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
- name: Build
run: cmake --build --preset "conan-${{ matrix.build_type }}".ToLower()
- name: Test
run: |
cd build/tests
ctest -C ${{ matrix.build_type }} --output-on-failure --extra-verbose
- uses: actions/upload-artifact@v3
if: matrix.build_type == 'Release'
with:
name: proxyfmu
path: build/bin/proxyfmu*