2020-08-24 19:03:23 +00:00
|
|
|
name: C/C++ CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-09-01 05:52:22 +00:00
|
|
|
branches: [ main ]
|
2020-08-24 19:03:23 +00:00
|
|
|
pull_request:
|
2022-09-01 05:52:22 +00:00
|
|
|
branches: [ main ]
|
2020-08-24 19:03:23 +00:00
|
|
|
|
2022-08-31 17:00:20 +00:00
|
|
|
env:
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
2020-08-24 19:03:23 +00:00
|
|
|
jobs:
|
2020-11-02 03:05:46 +00:00
|
|
|
build_cmake:
|
2022-02-08 15:42:05 +00:00
|
|
|
name: CMake Build & Test
|
2020-11-02 03:05:46 +00:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-02-25 19:35:43 +00:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
2020-11-02 03:05:46 +00:00
|
|
|
build_type: [Release]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
2022-08-31 17:00:20 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-02 03:05:46 +00:00
|
|
|
- name: Configure CMake
|
2022-02-08 15:42:05 +00:00
|
|
|
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DELFIO_BUILD_EXAMPLES=YES -DELFIO_BUILD_TESTS=YES
|
2020-11-02 03:05:46 +00:00
|
|
|
- name: Build
|
2022-01-15 10:38:18 +00:00
|
|
|
run: cmake --build build --config ${{ matrix.build_type }}
|
2022-02-08 16:05:08 +00:00
|
|
|
- name: Test
|
2022-02-08 15:42:05 +00:00
|
|
|
run: |
|
2022-02-08 15:52:13 +00:00
|
|
|
cd build
|
2022-02-25 23:51:49 +00:00
|
|
|
ctest -C ${{ matrix.build_type }}
|
2022-02-08 15:42:05 +00:00
|
|
|
cd ..
|