File tree Expand file tree Collapse file tree 5 files changed +54
-5
lines changed Expand file tree Collapse file tree 5 files changed +54
-5
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build-linux :
7+ name : ubuntu-22.04-release
8+ runs-on : ubuntu-22.04
9+ defaults :
10+ run :
11+ shell : bash -e -o pipefail {0}
12+ steps :
13+ - name : checkout repository
14+ uses : actions/checkout@v4
15+ - name : check format
16+ run : ./format-files.sh check
17+ - name : configure
18+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
19+ - name : build
20+ run : cmake --build build
21+ - name : test
22+ run : ctest --test-dir build --output-on-failure
23+ - name : install
24+ run : sudo cmake --install build
25+ build-windows :
26+ name : windows-2022-release
27+ runs-on : windows-2022
28+ defaults :
29+ run :
30+ shell : C:\msys64\usr\bin\bash.exe {0}
31+ steps :
32+ - name : checkout repository
33+ uses : actions/checkout@v4
34+ - name : configure
35+ run : cmake -S . -B build -G "Visual Studio 17 2022"
36+ - name : build
37+ run : cmake --build build --config Release
38+ - name : test
39+ run : ctest --test-dir build --output-on-failure
40+ - name : install
41+ run : cmake --install build --config Release
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 17)
99set (CMAKE_CXX_STANDARD_REQUIRED True )
1010
1111if (MSVC )
12- set (CMAKE_CXX_FLAGS "/EHsc /Wall " )
12+ set (CMAKE_CXX_FLAGS "/EHsc /W3 " )
1313 set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
1414 set (CMAKE_CXX_FLAGS_RELEASE "/O2" )
1515 add_compile_definitions (_USE_MATH_DEFINES)
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ set -euo pipefail
4+
5+ MODE=" ${1:- default} "
6+
37PROJ_ROOT=$( dirname $0 )
48
59if ! type -p clang-format > /dev/null; then
2125 exit 1
2226fi
2327
28+ EXTRA_FLAGS=" "
29+ if [[ " $MODE " == " check" ]]; then
30+ echo " check mode enabled, not formatting files, only checking"
31+ EXTRA_FLAGS=" --dry-run --Werror"
32+ fi
33+
2434find " ${PROJ_ROOT} " -type f \
2535 \( -name " *.cpp" -o -name " *.c" -o -name " *.hpp" -o -name " *.h" \) \
2636 -not -path " ${PROJ_ROOT} /build/*" \
27- -print -exec clang-format --style=file -i ' {} ' \;
37+ -print0 | xargs -0 clang-format $EXTRA_FLAGS --style=file --verbose -i
Original file line number Diff line number Diff line change 11#pragma once
2- #define _USE_MATH_DEFINES
32#include < algorithm>
43#include < array>
54#include < cmath>
Original file line number Diff line number Diff line change 3535 */
3636
3737/* ====== INCLUSIONS ====== */
38- #include < stdio.h>
39- #define _USE_MATH_DEFINES
4038#include < math.h>
39+ #include < stdio.h>
4140
4241namespace odr
4342{
You can’t perform that action at this time.
0 commit comments