Skip to content

fix compiler issues with C++17 #14

fix compiler issues with C++17

fix compiler issues with C++17 #14

Workflow file for this run

name: Build and Test MnxValidate
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
generator: Ninja
- os: macos-latest
generator: Ninja
- os: windows-latest
generator: "Visual Studio 17 2022"
steps:
# Checkout the repository with submodules
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true # Clone submodules recursively
fetch-depth: 0 # Ensure full history for submodules
# Display Preinstalled Tools
- name: Display preinstalled tools
run: |
cmake --version
# Install Ninja (if needed)
- name: Install Ninja on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y ninja-build
- name: Install Ninja on macOS
if: matrix.os == 'macos-latest'
run: brew install ninja || echo "Ninja already installed"
- name: Verify Ninja Installation
if: matrix.os != 'windows-latest'
run: ninja --version || echo "Ninja is not available on this platform"
# Configure on Linux and macOS
- name: Configure with CMake on Linux and macOS
if: matrix.os != 'windows-latest'
run: cmake -G "${{ matrix.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=Release
# Configure on Windows
- name: Configure with CMake on Windows
if: matrix.os == 'windows-latest'
run: cmake -G "${{ matrix.generator }}" -S . -B build
# Build on Linux and macOS
- name: Build on Linux and macOS
if: matrix.os != 'windows-latest'
run: cmake --build build
# Build on Windows
- name: Build on Windows
if: matrix.os == 'windows-latest'
run: cmake --build build --config Release
# Run Tests
- name: Run Tests
run: ctest --test-dir build/tests --output-on-failure