Skip to content

fix(coil-adviser): reject insulated outer coating on non-isolated des… #393

fix(coil-adviser): reject insulated outer coating on non-isolated des…

fix(coil-adviser): reject insulated outer coating on non-isolated des… #393

Workflow file for this run

name: CI
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
build-linux:
name: Build on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
ninja-build \
g++-13 \
libgnuplot-iostream-dev \
liblapack-dev \
graphviz \
doxygen
# Set GCC 13 as default
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
- name: Install quicktype
run: npm install -g quicktype@23.2.6
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_CXX_COMPILER=g++-13 \
-DINCLUDE_MKF_TESTS=ON \
-DEMBED_MAS_DATA=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ./MKF_tests "[smoke-test]" --reporter console
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-linux
path: ${{github.workspace}}/build/Testing/
if-no-files-found: ignore
build-windows:
name: Build on Windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Ninja
run: choco install ninja -y
- name: Install quicktype
run: npm install -g quicktype@23.2.6
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build `
-G Ninja `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DINCLUDE_MKF_TESTS=ON `
-DEMBED_MAS_DATA=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j $env:NUMBER_OF_PROCESSORS
- name: Run tests
working-directory: ${{github.workspace}}/build
run: .\MKF_tests.exe "[smoke-test]" --reporter console
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-windows
path: ${{github.workspace}}/build/Testing/
if-no-files-found: ignore
coverage:
name: Coverage Report
runs-on: ubuntu-latest
needs: build-linux
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build g++-13 lcov
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
- name: Install quicktype
run: npm install -g quicktype@23.2.6
- name: Configure CMake (coverage)
run: |
cmake -B ${{github.workspace}}/build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_COVERAGE=ON \
-DCMAKE_CXX_COMPILER=g++-13 \
-DINCLUDE_MKF_TESTS=ON \
-DEMBED_MAS_DATA=ON
- name: Build
run: cmake --build ${{github.workspace}}/build -j4
- name: Run smoke tests
working-directory: ${{github.workspace}}/build
run: ./MKF_tests "[smoke-test]" --reporter console || true
- name: Collect coverage
run: |
lcov --capture \
--directory ${{github.workspace}}/build \
--output-file coverage.info \
--rc lcov_branch_coverage=1
lcov --remove coverage.info \
'*/tests/*' '*/build/_deps/*' '/usr/*' \
--output-file coverage_filtered.info \
--rc lcov_branch_coverage=1
genhtml coverage_filtered.info \
--output-directory coverage_html \
--branch-coverage \
--title "MKF Coverage"
lcov --summary coverage_filtered.info --rc lcov_branch_coverage=1
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage_html/
documentation:
name: Generate Documentation
runs-on: ubuntu-latest
needs: build-linux
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Generate documentation
run: doxygen Doxyfile
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/api/html/
code-quality:
name: Code Quality (advisory, non-blocking)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get install -y clang-format
- name: Check code formatting
run: |
find src \( -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 clang-format --dry-run --Werror || echo "Code formatting issues found (advisory). Run 'clang-format -i' on affected files."
continue-on-error: true
- name: Run cppcheck (optional)
run: |
sudo apt-get install -y cppcheck
cppcheck --enable=warning,style --error-exitcode=0 --quiet src/ 2>&1 | head -100
continue-on-error: true