Skip to content

<refactor>: change template arguments of sum_of_errors_evaluator #208

<refactor>: change template arguments of sum_of_errors_evaluator

<refactor>: change template arguments of sum_of_errors_evaluator #208

Workflow file for this run

name: Build and test all platforms
on:
pull_request:
push:
branches:
- main
paths-ignore:
- '**.md'
- .gitignore
workflow_dispatch:
jobs:
build-test:
name: ${{matrix.config.name}} ${{matrix.build_type}}
runs-on: ${{matrix.config.os}}
strategy:
fail-fast: false
matrix:
build_type: ["Debug", "Release"]
config:
- {
name: "Windows Latest MSVC ",
artifact: "windows-msvc.txz",
os: windows-latest,
shell: powershell,
generator: default,
cc: "cl", cxx: "cl"
}
- {
name: "Ubuntu Latest GCC ",
artifact: "ubuntu.txz",
os: ubuntu-latest,
shell: bash,
generator: default,
cc: "gcc", cxx: "g++"
}
#- {
# name: "Windows Latest MINGW ",
# artifact: "windows-mingw.txz",
# os: windows-latest,
# shell: cmd,
# generator: "MinGW Makefiles",
# cc: "gcc", cxx: "g++"
# }
#- {
# name: "macOS Latest GCC ",
# artifact: "macos.txz",
# os: macos-latest,
# shell: bash,
# generator: default,
# cc: "gcc", cxx: "g++"
# }
defaults:
run:
shell: ${{matrix.config.shell}}
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
steps:
- uses: actions/checkout@v4
- name: Configure CMake (default generator)
if: ${{matrix.config.generator == 'default'}}
working-directory: ${{github.workspace}}
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build/ src/
- name: Configure CMake (specific generator)
if: ${{matrix.config.generator != 'default'}}
working-directory: ${{github.workspace}}
run: cmake -G"${{matrix.config.generator}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build/ src/
- name: Build
working-directory: ${{github.workspace}}
run: cmake --build build/ --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest --output-on-failure -C ${{matrix.build_type}}
#- name: Pack
# working-directory: ${{github.workspace}}/build
# run: cmake -E tar -Jcfv ../${{matrix.build_type}}${{matrix.config.artifact}} .
#- name: Upload
# uses: actions/upload-artifact@v4
# with:
# path: ./${{matrix.build_type}}${{matrix.config.artifact}}
# name: ${{matrix.build_type}}${{matrix.config.artifact}}