From 8411aa7cf3d3217e63c5d422b46040d1bb7c02ae Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 17:48:21 +0100 Subject: [PATCH 01/13] pipeline fixes --- .github/workflows/build.yml | 119 +----------------------------------- .github/workflows/check.yml | 14 ++++- 2 files changed, 14 insertions(+), 119 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69e2066..bb4fc2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,6 @@ name: Build +permissions: + contents: read on: [push, pull_request] @@ -100,119 +102,4 @@ jobs: - name: Run Tests working-directory: ${{runner.workspace}}\build\${{ matrix.mode }} - run: ./Tests.exe - - check-files: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Check File Names - working-directory: ${{runner.workspace}}/Atomic/ - run: python ./tools/check_file_names.py - - - name: Check Licenses - working-directory: ${{runner.workspace}}/Atomic/ - run: python ./tools/check_licenses.py - - - name: Check Header Guards - working-directory: ${{runner.workspace}}/Atomic/ - run: python ./tools/check_header_guards.py - - clang-format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Dependencies - run: sudo apt-get install clang-format - - - name: Download Run-Clang-Format - run: git clone https://github.com/Sarcasm/run-clang-format.git - - - name: Run Clang-Format - working-directory: ${{runner.workspace}}/Atomic/ - run: python run-clang-format/run-clang-format.py -r --extensions h,hpp ./include/ --style=file - - clang-tidy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Dependencies - run: sudo apt-get install clang-tidy - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/Atomic/build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-std=c++17 -DCMAKE_CXX_COMPILER=g++; cmake --build . --config Debug - - - name: Run Clang-Tidy - working-directory: ${{runner.workspace}}/Atomic - shell: bash - run: run-clang-tidy -header-filter='.*' -p build/ -quiet - - coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Dependencies - run: sudo apt-get install lcov - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/Atomic/build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_CXX_COMPILER=g++ -DENABLE_COVERAGE=ON; cmake --build . --config Debug - - - name: Execute Tests - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: make Tests; ./Tests - - - name: Generate Coverage Files - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: lcov --capture --directory ./CMakeFiles/Tests.dir/tests/unit/ --output-file coverage.info - - - name: Generate HTML Reports - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: genhtml coverage.info --output-directory ../coverage/ - - - uses: actions/upload-artifact@v4 - with: - name: Atomic-Coverage-Report - path: ${{runner.workspace}}/Atomic/coverage/ - - cppcheck-ubuntu: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Dependencies - run: sudo apt-get install cppcheck - - - name: Run CppCheck - working-directory: ${{runner.workspace}}/Atomic - shell: bash - run: find ./include -name '*.hpp' | xargs cppcheck --enable=all -q --force -Iinclude/ - - cppcheck-macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Dependencies - run: brew install cppcheck - - - name: Run CppCheck - working-directory: ${{runner.workspace}}/Atomic - shell: bash - run: find ./include -name '*.hpp' | xargs cppcheck --enable=all -q --force -Iinclude/ + run: ./Tests.exe \ No newline at end of file diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3ea39a4..93b3059 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,9 +1,12 @@ name: Checks +permissions: + contents: read on: [push, pull_request] jobs: check-files: + name: "Check Files for Licenses and Header Guards" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,12 +24,13 @@ jobs: run: python ./tools/check_header_guards.py clang-format: + name: "Run Clang-Format" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Dependencies - run: sudo apt install python clang-format + run: sudo apt-get install clang-format - name: Download Run-Clang-Format run: git clone https://github.com/Sarcasm/run-clang-format.git @@ -36,12 +40,13 @@ jobs: run: python run-clang-format/run-clang-format.py -r --extensions h,hpp ./include/ --style=file clang-tidy: + name: "Run Clang-Tidy" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Dependencies - run: sudo apt install clang-tidy + run: sudo apt-getinstall clang-tidy - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/Atomic/build @@ -57,6 +62,7 @@ jobs: run: run-clang-tidy -header-filter='.*' -p build/ -quiet coverage: + name: "Generate Coverage Report" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -93,6 +99,7 @@ jobs: path: ${{runner.workspace}}/Atomic/coverage/ cppcheck-ubuntu: + name: "Run CppCheck on Linux" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -106,6 +113,7 @@ jobs: run: find ./include -name '*.hpp' | xargs cppcheck --enable=all -q --force -Iinclude/ cppcheck-macos: + name: "Run CppCheck on MacOS" runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -116,4 +124,4 @@ jobs: - name: Run CppCheck working-directory: ${{runner.workspace}}/Atomic shell: bash - run: find ./include -name '*.hpp' | xargs cppcheck --enable=all -q --force -Iinclude/ + run: find ./include -name '*.hpp' | xargs cppcheck --enable=all -q --force -Iinclude/ \ No newline at end of file From 7464cc59164eb724269bf799d1e3c6409e98cb98 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 17:57:28 +0100 Subject: [PATCH 02/13] clang format --- include/atomic.hpp | 2 +- include/atomic/container.hpp | 2 +- include/atomic/container/dynamic_stack.hpp | 2 +- include/atomic/container/fixed_stack.hpp | 2 +- .../atomic/container/fixed_stack_operator.hpp | 2 +- include/atomic/core.hpp | 2 +- include/atomic/core/compiler.hpp | 2 +- include/atomic/core/defines.hpp | 2 +- include/atomic/core/logging.hpp | 12 +++--- include/atomic/core/operating_system.hpp | 2 +- include/atomic/core/standard.hpp | 2 +- include/atomic/core/utility.hpp | 2 +- include/atomic/geometry.hpp | 2 +- include/atomic/geometry/circle.hpp | 2 +- include/atomic/geometry/forwarder.hpp | 2 +- include/atomic/geometry/line.hpp | 2 +- include/atomic/geometry/line_segment.hpp | 2 +- include/atomic/geometry/ray.hpp | 2 +- include/atomic/geometry/triangle.hpp | 38 +++++++++---------- include/atomic/linear-algebra.hpp | 2 +- .../linear-algebra/dynamic_matrix_engine.hpp | 2 +- .../linear-algebra/dynamic_vector_engine.hpp | 2 +- .../linear-algebra/engine_properties.hpp | 2 +- .../linear-algebra/fixed_matrix_engine.hpp | 2 +- .../linear-algebra/fixed_vector_engine.hpp | 2 +- include/atomic/linear-algebra/forwarder.hpp | 2 +- include/atomic/linear-algebra/math.hpp | 2 +- include/atomic/linear-algebra/matrix.hpp | 2 +- .../linear-algebra/matrix_engine_operator.hpp | 2 +- .../atomic/linear-algebra/matrix_order.hpp | 2 +- include/atomic/linear-algebra/quarternion.hpp | 2 +- .../linear-algebra/quarternion_operator.hpp | 2 +- include/atomic/linear-algebra/traits.hpp | 2 +- include/atomic/linear-algebra/vector.hpp | 2 +- .../linear-algebra/vector_engine_operator.hpp | 2 +- include/atomic/math.hpp | 2 +- include/atomic/math/constants.hpp | 2 +- include/atomic/math/random.hpp | 2 +- include/atomic/math/sequence.hpp | 2 +- include/atomic/math/timer.hpp | 2 +- include/atomic/physics.hpp | 2 +- include/atomic/physics/constants.hpp | 2 +- 42 files changed, 65 insertions(+), 65 deletions(-) diff --git a/include/atomic.hpp b/include/atomic.hpp index 889101f..864c02d 100644 --- a/include/atomic.hpp +++ b/include/atomic.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_HPP diff --git a/include/atomic/container.hpp b/include/atomic/container.hpp index d5e35cc..7b4edbe 100644 --- a/include/atomic/container.hpp +++ b/include/atomic/container.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CONTAINER_HPP diff --git a/include/atomic/container/dynamic_stack.hpp b/include/atomic/container/dynamic_stack.hpp index d222a77..f0e2fb0 100644 --- a/include/atomic/container/dynamic_stack.hpp +++ b/include/atomic/container/dynamic_stack.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CONTAINER_DYNAMIC_STACK_HPP diff --git a/include/atomic/container/fixed_stack.hpp b/include/atomic/container/fixed_stack.hpp index 318a603..7e710c2 100644 --- a/include/atomic/container/fixed_stack.hpp +++ b/include/atomic/container/fixed_stack.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CONTAINER_FIXED_STACK_HPP diff --git a/include/atomic/container/fixed_stack_operator.hpp b/include/atomic/container/fixed_stack_operator.hpp index 38615f8..d341bae 100644 --- a/include/atomic/container/fixed_stack_operator.hpp +++ b/include/atomic/container/fixed_stack_operator.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CONTAINER_FIXED_STACK_OPERATOR_HPP diff --git a/include/atomic/core.hpp b/include/atomic/core.hpp index 17664a4..b3fc065 100644 --- a/include/atomic/core.hpp +++ b/include/atomic/core.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_HPP diff --git a/include/atomic/core/compiler.hpp b/include/atomic/core/compiler.hpp index ac37b02..13d4019 100644 --- a/include/atomic/core/compiler.hpp +++ b/include/atomic/core/compiler.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_COMPILER_HPP diff --git a/include/atomic/core/defines.hpp b/include/atomic/core/defines.hpp index ab30a3c..030dc6a 100644 --- a/include/atomic/core/defines.hpp +++ b/include/atomic/core/defines.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_DEFINES_HPP diff --git a/include/atomic/core/logging.hpp b/include/atomic/core/logging.hpp index 6bb0d0b..166434f 100644 --- a/include/atomic/core/logging.hpp +++ b/include/atomic/core/logging.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_LOGGING_HPP @@ -63,7 +63,7 @@ namespace detail { } template - static inline void log(Args &&... args) + static inline void log(Args &&...args) { std::cout << "[LOG]: "; int dummy[] = { 0, ((void)log_argument(std::forward(args)), 0)... }; @@ -72,7 +72,7 @@ namespace detail { } template - static inline void trace(Args &&... args) + static inline void trace(Args &&...args) { std::cout << TERM_WHITE << "[TRACE]: "; int dummy[] = { 0, ((void)log_argument(std::forward(args)), 0)... }; @@ -81,7 +81,7 @@ namespace detail { } template - static inline void info(Args &&... args) + static inline void info(Args &&...args) { std::cout << TERM_GREEN << "[INFO]: "; int dummy[] = { 0, ((void)log_argument(std::forward(args)), 0)... }; @@ -90,7 +90,7 @@ namespace detail { } template - static inline void warn(Args &&... args) + static inline void warn(Args &&...args) { std::cout << TERM_YELLOW << "[WARNING]: "; int dummy[] = { 0, ((void)log_argument(std::forward(args)), 0)... }; @@ -99,7 +99,7 @@ namespace detail { } template - static inline void error(Args &&... args) + static inline void error(Args &&...args) { std::cout << TERM_RED << "[ERROR]: "; int dummy[] = { 0, ((void)log_argument(std::forward(args), std::cerr), 0)... }; diff --git a/include/atomic/core/operating_system.hpp b/include/atomic/core/operating_system.hpp index 3d6ba83..3cf7a43 100644 --- a/include/atomic/core/operating_system.hpp +++ b/include/atomic/core/operating_system.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_OPERATING_SYSTEM_HPP diff --git a/include/atomic/core/standard.hpp b/include/atomic/core/standard.hpp index 3f8272e..eb21e15 100644 --- a/include/atomic/core/standard.hpp +++ b/include/atomic/core/standard.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_STANDARD_HPP diff --git a/include/atomic/core/utility.hpp b/include/atomic/core/utility.hpp index de6e59c..ae94287 100644 --- a/include/atomic/core/utility.hpp +++ b/include/atomic/core/utility.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_CORE_UTILITY_HPP diff --git a/include/atomic/geometry.hpp b/include/atomic/geometry.hpp index f92ec26..09ca65c 100644 --- a/include/atomic/geometry.hpp +++ b/include/atomic/geometry.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_HPP diff --git a/include/atomic/geometry/circle.hpp b/include/atomic/geometry/circle.hpp index f9bb9b5..a54ca66 100644 --- a/include/atomic/geometry/circle.hpp +++ b/include/atomic/geometry/circle.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_CIRCLE_HPP diff --git a/include/atomic/geometry/forwarder.hpp b/include/atomic/geometry/forwarder.hpp index 88c7af8..89ec2fb 100644 --- a/include/atomic/geometry/forwarder.hpp +++ b/include/atomic/geometry/forwarder.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_FORWARDER_HPP diff --git a/include/atomic/geometry/line.hpp b/include/atomic/geometry/line.hpp index 14af7d4..e624bb7 100644 --- a/include/atomic/geometry/line.hpp +++ b/include/atomic/geometry/line.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_LINE_HPP diff --git a/include/atomic/geometry/line_segment.hpp b/include/atomic/geometry/line_segment.hpp index 0dfe143..99427b0 100644 --- a/include/atomic/geometry/line_segment.hpp +++ b/include/atomic/geometry/line_segment.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_LINE_SEGMENT_HPP diff --git a/include/atomic/geometry/ray.hpp b/include/atomic/geometry/ray.hpp index 8a42934..27cf902 100644 --- a/include/atomic/geometry/ray.hpp +++ b/include/atomic/geometry/ray.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_RAY_HPP diff --git a/include/atomic/geometry/triangle.hpp b/include/atomic/geometry/triangle.hpp index 990845d..cb7252f 100644 --- a/include/atomic/geometry/triangle.hpp +++ b/include/atomic/geometry/triangle.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_GEOMETRY_TRIANGLE_HPP @@ -30,45 +30,45 @@ namespace geometry { void translate(const linalg::fvector2 &translation); - //returns the number of faces. + // returns the number of faces. ATOMIC_NODISCARD constexpr auto faces() const noexcept; - //returns the number of vertices. + // returns the number of vertices. ATOMIC_NODISCARD constexpr auto vertices() const noexcept; - //returns the number of edges. + // returns the number of edges. ATOMIC_NODISCARD constexpr auto edges() const noexcept; - //returns the length of side a. + // returns the length of side a. ATOMIC_NODISCARD constexpr auto side_a() const noexcept; - //returns the length of side b. + // returns the length of side b. ATOMIC_NODISCARD constexpr auto side_b() const noexcept; - //returns the length of side c. + // returns the length of side c. ATOMIC_NODISCARD constexpr auto side_c() const noexcept; - //returns the angle of a. + // returns the angle of a. ATOMIC_NODISCARD constexpr auto angle_a() const noexcept; - //returns the angle of b. + // returns the angle of b. ATOMIC_NODISCARD constexpr auto angle_b() const noexcept; - //returns the angle of c. + // returns the angle of c. ATOMIC_NODISCARD constexpr auto angle_c() const noexcept; - //returns the height of a. + // returns the height of a. ATOMIC_NODISCARD constexpr auto height_a() const noexcept; - //returns the height of b. + // returns the height of b. ATOMIC_NODISCARD constexpr auto height_b() const noexcept; - //returns the height of c. + // returns the height of c. ATOMIC_NODISCARD constexpr auto height_c() const noexcept; - //returns the area of the triangle. + // returns the area of the triangle. ATOMIC_NODISCARD constexpr auto area() const noexcept; - //returns the perimeter of the triangle. + // returns the perimeter of the triangle. ATOMIC_NODISCARD constexpr auto perimeter() const noexcept; - //returns the semi-perimeter of the triangle. + // returns the semi-perimeter of the triangle. ATOMIC_NODISCARD constexpr auto semiperimeter() const noexcept; - //returns the inradius of the triangle. + // returns the inradius of the triangle. ATOMIC_NODISCARD constexpr auto inradius() const noexcept; - //returns the circumradius of the triangle. + // returns the circumradius of the triangle. ATOMIC_NODISCARD constexpr auto circumradius() const noexcept; - //returns the centroid of the triangle. + // returns the centroid of the triangle. ATOMIC_NODISCARD constexpr auto centroid() const noexcept; public: diff --git a/include/atomic/linear-algebra.hpp b/include/atomic/linear-algebra.hpp index a5b3d6a..87104d5 100644 --- a/include/atomic/linear-algebra.hpp +++ b/include/atomic/linear-algebra.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_HPP diff --git a/include/atomic/linear-algebra/dynamic_matrix_engine.hpp b/include/atomic/linear-algebra/dynamic_matrix_engine.hpp index 5c1a45a..8dad1a0 100644 --- a/include/atomic/linear-algebra/dynamic_matrix_engine.hpp +++ b/include/atomic/linear-algebra/dynamic_matrix_engine.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_DYNAMIC_MATRIX_ENGINE_HPP diff --git a/include/atomic/linear-algebra/dynamic_vector_engine.hpp b/include/atomic/linear-algebra/dynamic_vector_engine.hpp index c46c935..b798d69 100644 --- a/include/atomic/linear-algebra/dynamic_vector_engine.hpp +++ b/include/atomic/linear-algebra/dynamic_vector_engine.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_DYNAMIC_VECTOR_ENGINE_HPP diff --git a/include/atomic/linear-algebra/engine_properties.hpp b/include/atomic/linear-algebra/engine_properties.hpp index 2e0804e..8a45142 100644 --- a/include/atomic/linear-algebra/engine_properties.hpp +++ b/include/atomic/linear-algebra/engine_properties.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_ENGINE_PROPERTIES_HPP diff --git a/include/atomic/linear-algebra/fixed_matrix_engine.hpp b/include/atomic/linear-algebra/fixed_matrix_engine.hpp index 22c6321..93f31c9 100644 --- a/include/atomic/linear-algebra/fixed_matrix_engine.hpp +++ b/include/atomic/linear-algebra/fixed_matrix_engine.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_FIXED_MATRIX_ENGINE_HPP diff --git a/include/atomic/linear-algebra/fixed_vector_engine.hpp b/include/atomic/linear-algebra/fixed_vector_engine.hpp index 11cc6a9..f6a01b6 100644 --- a/include/atomic/linear-algebra/fixed_vector_engine.hpp +++ b/include/atomic/linear-algebra/fixed_vector_engine.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_FIXED_VECTOR_ENGINE_HPP diff --git a/include/atomic/linear-algebra/forwarder.hpp b/include/atomic/linear-algebra/forwarder.hpp index 267e49e..d203103 100644 --- a/include/atomic/linear-algebra/forwarder.hpp +++ b/include/atomic/linear-algebra/forwarder.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_FORWARDER_HPP diff --git a/include/atomic/linear-algebra/math.hpp b/include/atomic/linear-algebra/math.hpp index 8651fd9..ce0b771 100644 --- a/include/atomic/linear-algebra/math.hpp +++ b/include/atomic/linear-algebra/math.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_MATH_HPP diff --git a/include/atomic/linear-algebra/matrix.hpp b/include/atomic/linear-algebra/matrix.hpp index 2c9db83..acfd1af 100644 --- a/include/atomic/linear-algebra/matrix.hpp +++ b/include/atomic/linear-algebra/matrix.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_MATRIX_HPP diff --git a/include/atomic/linear-algebra/matrix_engine_operator.hpp b/include/atomic/linear-algebra/matrix_engine_operator.hpp index ab7fad9..fbc1a39 100644 --- a/include/atomic/linear-algebra/matrix_engine_operator.hpp +++ b/include/atomic/linear-algebra/matrix_engine_operator.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_MATRIX_ENGINE_OPERATOR_HPP diff --git a/include/atomic/linear-algebra/matrix_order.hpp b/include/atomic/linear-algebra/matrix_order.hpp index 2f08def..04f6b8b 100644 --- a/include/atomic/linear-algebra/matrix_order.hpp +++ b/include/atomic/linear-algebra/matrix_order.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_MATRIX_ORDER_HPP diff --git a/include/atomic/linear-algebra/quarternion.hpp b/include/atomic/linear-algebra/quarternion.hpp index 368c623..a16ea57 100644 --- a/include/atomic/linear-algebra/quarternion.hpp +++ b/include/atomic/linear-algebra/quarternion.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_QUARTERNION_HPP diff --git a/include/atomic/linear-algebra/quarternion_operator.hpp b/include/atomic/linear-algebra/quarternion_operator.hpp index f268367..3dba39a 100644 --- a/include/atomic/linear-algebra/quarternion_operator.hpp +++ b/include/atomic/linear-algebra/quarternion_operator.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_QUARTERNION_OPERATOR_HPP diff --git a/include/atomic/linear-algebra/traits.hpp b/include/atomic/linear-algebra/traits.hpp index f67b09c..49b7805 100644 --- a/include/atomic/linear-algebra/traits.hpp +++ b/include/atomic/linear-algebra/traits.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_TRAITS_HPP diff --git a/include/atomic/linear-algebra/vector.hpp b/include/atomic/linear-algebra/vector.hpp index 0092ce7..7baf441 100644 --- a/include/atomic/linear-algebra/vector.hpp +++ b/include/atomic/linear-algebra/vector.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_VECTOR_HPP diff --git a/include/atomic/linear-algebra/vector_engine_operator.hpp b/include/atomic/linear-algebra/vector_engine_operator.hpp index 8464876..aaf034c 100644 --- a/include/atomic/linear-algebra/vector_engine_operator.hpp +++ b/include/atomic/linear-algebra/vector_engine_operator.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_LINEAR_ALGEBRA_VECTOR_ENGINE_OPERATOR_HPP diff --git a/include/atomic/math.hpp b/include/atomic/math.hpp index 6cc7fa4..e8c60fc 100644 --- a/include/atomic/math.hpp +++ b/include/atomic/math.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_MATH_HPP diff --git a/include/atomic/math/constants.hpp b/include/atomic/math/constants.hpp index a0f97fb..7ca8743 100644 --- a/include/atomic/math/constants.hpp +++ b/include/atomic/math/constants.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_MATH_CONSTANTS_HPP diff --git a/include/atomic/math/random.hpp b/include/atomic/math/random.hpp index cc40f21..b97f42c 100644 --- a/include/atomic/math/random.hpp +++ b/include/atomic/math/random.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_MATH_RANDOM_HPP diff --git a/include/atomic/math/sequence.hpp b/include/atomic/math/sequence.hpp index dc3d30e..e17092e 100644 --- a/include/atomic/math/sequence.hpp +++ b/include/atomic/math/sequence.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_MATH_SEQUENCE_HPP diff --git a/include/atomic/math/timer.hpp b/include/atomic/math/timer.hpp index 2037651..d7612c2 100644 --- a/include/atomic/math/timer.hpp +++ b/include/atomic/math/timer.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_MATH_TIMER_HPP diff --git a/include/atomic/physics.hpp b/include/atomic/physics.hpp index 433ed14..9b9fcc0 100644 --- a/include/atomic/physics.hpp +++ b/include/atomic/physics.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_PHYSICS_HPP diff --git a/include/atomic/physics/constants.hpp b/include/atomic/physics/constants.hpp index 38dc61e..8b21495 100644 --- a/include/atomic/physics/constants.hpp +++ b/include/atomic/physics/constants.hpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #ifndef ATOMIC_PHYSICS_CONSTANTS_HPP From 519ee72dbcb3beef6f9d7e09dcbecee2a2803ffb Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 17:57:57 +0100 Subject: [PATCH 03/13] fix clang tidy typo --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 93b3059..9b965b9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Dependencies - run: sudo apt-getinstall clang-tidy + run: sudo apt-get install clang-tidy - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/Atomic/build From 468b2fe15156229492389356d1a7bd1657b3bfdd Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:00:28 +0100 Subject: [PATCH 04/13] fix: format fixes --- .../quarternion/quarternion_addition.test.cpp | 2 +- .../traits/element_promotion.test.cpp | 4 ++-- .../linear-algebra/traits/is_engine.test.cpp | 2 +- .../traits/is_scalar_element.test.cpp | 2 +- .../vector/dynamic_vector_addition.test.cpp | 2 +- .../dynamic_vector_multiplication.test.cpp | 2 +- .../dynamic_vector_subtraction.test.cpp | 4 ++-- .../vector/fixed_vector_addition.test.cpp | 2 +- .../vector/fixed_vector_math.test.cpp | 24 +++++++++---------- .../fixed_vector_multiplication.test.cpp | 2 +- .../vector/fixed_vector_subtraction.test.cpp | 2 +- tests/unit/unit_main.cpp | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/unit/linear-algebra/quarternion/quarternion_addition.test.cpp b/tests/unit/linear-algebra/quarternion/quarternion_addition.test.cpp index 6974583..1282e8b 100644 --- a/tests/unit/linear-algebra/quarternion/quarternion_addition.test.cpp +++ b/tests/unit/linear-algebra/quarternion/quarternion_addition.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/traits/element_promotion.test.cpp b/tests/unit/linear-algebra/traits/element_promotion.test.cpp index e77c2d3..fa18728 100644 --- a/tests/unit/linear-algebra/traits/element_promotion.test.cpp +++ b/tests/unit/linear-algebra/traits/element_promotion.test.cpp @@ -2,13 +2,13 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include #include -TEMPLATE_TEST_CASE("element_promotion_t - same type", "[trait]", int, unsigned int, float, double, long double) +TEMPLATE_TEST_CASE("element_promotion_t - same type", "[trait]", int, unsigned int, float, double, long double) { CHECK(typeid(atomic::linalg::detail::element_promotion_t) == typeid(TestType)); } diff --git a/tests/unit/linear-algebra/traits/is_engine.test.cpp b/tests/unit/linear-algebra/traits/is_engine.test.cpp index 49069f9..dd3f333 100644 --- a/tests/unit/linear-algebra/traits/is_engine.test.cpp +++ b/tests/unit/linear-algebra/traits/is_engine.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/traits/is_scalar_element.test.cpp b/tests/unit/linear-algebra/traits/is_scalar_element.test.cpp index 0abaf32..adb8bf6 100644 --- a/tests/unit/linear-algebra/traits/is_scalar_element.test.cpp +++ b/tests/unit/linear-algebra/traits/is_scalar_element.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/vector/dynamic_vector_addition.test.cpp b/tests/unit/linear-algebra/vector/dynamic_vector_addition.test.cpp index 870913e..1bf327f 100644 --- a/tests/unit/linear-algebra/vector/dynamic_vector_addition.test.cpp +++ b/tests/unit/linear-algebra/vector/dynamic_vector_addition.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/vector/dynamic_vector_multiplication.test.cpp b/tests/unit/linear-algebra/vector/dynamic_vector_multiplication.test.cpp index 7e319bb..5942c60 100644 --- a/tests/unit/linear-algebra/vector/dynamic_vector_multiplication.test.cpp +++ b/tests/unit/linear-algebra/vector/dynamic_vector_multiplication.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/vector/dynamic_vector_subtraction.test.cpp b/tests/unit/linear-algebra/vector/dynamic_vector_subtraction.test.cpp index 71cfce1..a684591 100644 --- a/tests/unit/linear-algebra/vector/dynamic_vector_subtraction.test.cpp +++ b/tests/unit/linear-algebra/vector/dynamic_vector_subtraction.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include @@ -13,7 +13,7 @@ TEMPLATE_TEST_CASE("Dynamic Sized Vector Subtraction - Same Type", "[dynamic-vec const atomic::linalg::dvector v1 = { 1, 2, 3 }; const atomic::linalg::dvector v2 = { 1, 2, 3, 4 }; const atomic::linalg::dvector v3 = { 1, 2, 3 }; - //const atomic::linalg::dvector v4 = { 1.1, 2.2, 3.3, 4.4 }; + // const atomic::linalg::dvector v4 = { 1.1, 2.2, 3.3, 4.4 }; } TEST_CASE("Dynamic Sized Vector Subtraction - Varying Floating", "[dynamic-vector][subtraction]") diff --git a/tests/unit/linear-algebra/vector/fixed_vector_addition.test.cpp b/tests/unit/linear-algebra/vector/fixed_vector_addition.test.cpp index 851fa52..7451adb 100644 --- a/tests/unit/linear-algebra/vector/fixed_vector_addition.test.cpp +++ b/tests/unit/linear-algebra/vector/fixed_vector_addition.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/vector/fixed_vector_math.test.cpp b/tests/unit/linear-algebra/vector/fixed_vector_math.test.cpp index 3116502..cc66697 100644 --- a/tests/unit/linear-algebra/vector/fixed_vector_math.test.cpp +++ b/tests/unit/linear-algebra/vector/fixed_vector_math.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include @@ -10,14 +10,14 @@ See file LICENSE or go to TEST_CASE("Fixed Sized Vector Dot Product", "[fixed-vector][dotproduct]") { - const atomic::linalg::fvector v1 { 1, 2, 3 }; - const atomic::linalg::fvector v2 { 15, 25, 65 }; + const atomic::linalg::fvector v1{ 1, 2, 3 }; + const atomic::linalg::fvector v2{ 15, 25, 65 }; - const atomic::linalg::fvector v3 { 10.5F, 100.5F, 25.5F }; - const atomic::linalg::fvector v4 { 75.6F, 12.54F, 10.54F }; + const atomic::linalg::fvector v3{ 10.5F, 100.5F, 25.5F }; + const atomic::linalg::fvector v4{ 75.6F, 12.54F, 10.54F }; - const atomic::linalg::fvector v5 { -10, -20, -30 }; - const atomic::linalg::fvector v6 { 15.6, 10, 0 }; + const atomic::linalg::fvector v5{ -10, -20, -30 }; + const atomic::linalg::fvector v6{ 15.6, 10, 0 }; CHECK(atomic::linalg::dot_product(v1, v2) == 260); CHECK(atomic::linalg::dot_product(v2, v1) == 260); @@ -27,12 +27,12 @@ TEST_CASE("Fixed Sized Vector Dot Product", "[fixed-vector][dotproduct]") CHECK(atomic::linalg::dot_product(v6, v5) == -356); } -TEST_CASE("Fixed Sized Vector Cross Product - Integer", "[fixed-vector][crossproduct][cumulative]") +TEST_CASE("Fixed Sized Vector Cross Product - Integer", "[fixed-vector][crossproduct][cumulative]") { - const atomic::linalg::fvector v1 { 1, 2, 3 }; - const atomic::linalg::fvector v2 { 15, 25, 65 }; - const atomic::linalg::fvector exp1 { 55, -20, -5 }; - const atomic::linalg::fvector exp2 { -55, 20, 5 }; + const atomic::linalg::fvector v1{ 1, 2, 3 }; + const atomic::linalg::fvector v2{ 15, 25, 65 }; + const atomic::linalg::fvector exp1{ 55, -20, -5 }; + const atomic::linalg::fvector exp2{ -55, 20, 5 }; auto res1 = cross_product(v1, v2); auto res2 = cross_product(v2, v1); diff --git a/tests/unit/linear-algebra/vector/fixed_vector_multiplication.test.cpp b/tests/unit/linear-algebra/vector/fixed_vector_multiplication.test.cpp index 20104e7..aa4b530 100644 --- a/tests/unit/linear-algebra/vector/fixed_vector_multiplication.test.cpp +++ b/tests/unit/linear-algebra/vector/fixed_vector_multiplication.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/linear-algebra/vector/fixed_vector_subtraction.test.cpp b/tests/unit/linear-algebra/vector/fixed_vector_subtraction.test.cpp index 65f43a0..bbfd3ea 100644 --- a/tests/unit/linear-algebra/vector/fixed_vector_subtraction.test.cpp +++ b/tests/unit/linear-algebra/vector/fixed_vector_subtraction.test.cpp @@ -2,7 +2,7 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ #include diff --git a/tests/unit/unit_main.cpp b/tests/unit/unit_main.cpp index a029262..a8b74a1 100644 --- a/tests/unit/unit_main.cpp +++ b/tests/unit/unit_main.cpp @@ -2,8 +2,8 @@ This file is part of Atomic which is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3. -See file LICENSE or go to +See file LICENSE or go to https://www.gnu.org/licenses/lgpl-3.0.en.html for full license details. ***********************************************************************/ -#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_MAIN #include \ No newline at end of file From 67dd0ee9869e7c34070dc9060d36b5d081846a69 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:02:16 +0100 Subject: [PATCH 05/13] fix: fix clang-tidy --- .clang-tidy | 1 - 1 file changed, 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 09ff53a..20c270a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,5 +2,4 @@ Checks: '*,-fuchsia-*, -modernize-use-trailing-return-type, -readability-avoid-const-params-in-decls, -llvm-include-order' WarningsAsErrors: '' HeaderFilterRegex: '' -AnalyzeTemporaryDtors: false FormatStyle: none \ No newline at end of file From 52de6c32854ae5bdca0f438030d89a1b16c5e34e Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:04:18 +0100 Subject: [PATCH 06/13] fix: set triggers to be explict --- .github/workflows/build.yml | 8 +++++++- .github/workflows/check.yml | 8 +++++++- .github/workflows/security.yml | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb4fc2b..f324a8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,13 @@ name: Build permissions: contents: read -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: ubuntu-latest: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9b965b9..40543f2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,13 @@ name: Checks permissions: contents: read -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: check-files: diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index d4c2cfd..7cd6bc7 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -2,7 +2,7 @@ on: push: - branches: [ stable, dev ] + branches: [ main ] schedule: - cron: '22 16 * * 0' From bcd186ecc77a644ac22bbb404a2f3c8768f207fb Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:05:39 +0100 Subject: [PATCH 07/13] fix: ignore mismatch in code coverage --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 40543f2..2a5d8d7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -92,7 +92,7 @@ jobs: - name: Generate Coverage Files shell: bash working-directory: ${{runner.workspace}}/Atomic/build - run: lcov --capture --directory ./CMakeFiles/Tests.dir/tests/unit/ --output-file coverage.info + run: lcov --capture --ignore-errors mismatch --directory ./CMakeFiles/Tests.dir/tests/unit/ --output-file coverage.info - name: Generate HTML Reports shell: bash From d5a6cea754e8fb6c48eedef967a5dc70961ccc38 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:11:31 +0100 Subject: [PATCH 08/13] refactor: try with this approach of a script --- .github/scripts/build-matrix.sh | 31 +++++++++ .github/workflows/build.yml | 113 ++++++++------------------------ 2 files changed, 59 insertions(+), 85 deletions(-) create mode 100644 .github/scripts/build-matrix.sh diff --git a/.github/scripts/build-matrix.sh b/.github/scripts/build-matrix.sh new file mode 100644 index 0000000..5508d69 --- /dev/null +++ b/.github/scripts/build-matrix.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -euo pipefail + +COMPILERS=(${COMPILERS:-g++}) +STANDARDS=(${STANDARDS:-c++17}) +MODES=(${MODES:-Debug}) + +echo "๐Ÿ—๏ธ Running build matrix" +echo "Compilers: ${COMPILERS[*]}" +echo "Standards: ${STANDARDS[*]}" +echo "Modes: ${MODES[*]}" +echo + +for COMPILER in "${COMPILERS[@]}"; do + for STANDARD in "${STANDARDS[@]}"; do + for MODE in "${MODES[@]}"; do + echo "::group::$COMPILER ($STANDARD, $MODE)" + BUILD_DIR="build-${COMPILER}-${STANDARD}-${MODE}" + cmake -E make_directory "$BUILD_DIR" + cd "$BUILD_DIR" + cmake "$GITHUB_WORKSPACE" \ + -DCMAKE_BUILD_TYPE="$MODE" \ + -DCMAKE_CXX_FLAGS="-std=$STANDARD" \ + -DCMAKE_CXX_COMPILER="$COMPILER" + cmake --build . --config "$MODE" + ./Tests || exit 1 + cd .. + echo "::endgroup::" + done + done +done diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f324a8f..88416e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,108 +4,51 @@ permissions: on: push: - branches: - - main + branches: [ main ] pull_request: - branches: - - main + branches: [ main ] jobs: ubuntu-latest: runs-on: ubuntu-latest - strategy: - matrix: - compiler: [ g++-11, g++-12, clang++-14, clang++-15 ] - standard: [ c++14, c++17, c++20 ] - mode: [ Debug, Release ] steps: - uses: actions/checkout@v4 + - run: sudo apt-get install -y g++-11 g++-12 clang-14 clang-15 + - name: Run Build Matrix + run: | + COMPILERS="g++-11 g++-12 clang++-14 clang++-15" \ + STANDARDS="c++14 c++17 c++20" \ + MODES="Debug Release" \ + .github/scripts/build-matrix.sh - - name: Install Dependencies - run: sudo apt-get install g++-11 g++-12 clang-14 clang-15 -y - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/Atomic/build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_FLAGS=-std=${{ matrix.standard }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler}}; cmake --build . --config ${{ matrix.mode }} - - - name: Run Tests - working-directory: ${{runner.workspace}}/Atomic/build - shell: bash - run: ./Tests - ubuntu-jammy: runs-on: ubuntu-22.04 - strategy: - matrix: - compiler: [ g++-9, g++-10, clang++-11, clang++-12, clang++-13, clang++-14, clang++-15 ] - standard: [ c++14, c++17, c++2a ] - mode: [ Debug, Release ] steps: - uses: actions/checkout@v4 - - - name: Install Dependencies - run: sudo apt-get install g++-9 g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 -y - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/Atomic/build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_FLAGS=-std=${{ matrix.standard }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler}}; cmake --build . --config ${{ matrix.mode }} - - - name: Run Tests - working-directory: ${{runner.workspace}}/Atomic/build - shell: bash - run: ./Tests + - run: sudo apt-get install -y g++-9 g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 + - name: Run Build Matrix + run: | + COMPILERS="g++-9 g++-10 clang++-11 clang++-12 clang++-13 clang++-14 clang++-15" \ + STANDARDS="c++14 c++17 c++20" \ + MODES="Debug Release" \ + .github/scripts/build-matrix.sh macos: - strategy: - matrix: - compiler: [ c++, g++-13, g++-14 ] - standard: [ c++14, c++17, c++20 ] - mode: [ Debug, Release ] - os: [ macos-15, macos-14 ] - runs-on: ${{ matrix.os }} + runs-on: macos-15 steps: - uses: actions/checkout@v4 - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/Atomic/build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}/Atomic/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_FLAGS=-std=${{ matrix.standard }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler}}; cmake --build . --config ${{ matrix.mode }} - - - name: Run Tests - working-directory: ${{runner.workspace}}/Atomic/build - shell: bash - run: ./Tests + - name: Run Build Matrix + run: | + COMPILERS="c++ g++-13 g++-14" \ + STANDARDS="c++14 c++17 c++20" \ + MODES="Debug Release" \ + .github/scripts/build-matrix.sh windows: - strategy: - matrix: - compiler: [ clang, gcc, msvc-14.0, msvc-14.2 ] - standard: [ c++14, c++17, c++20, c++23 ] - mode: [ Debug, Release ] - os: [ windows-2025, windows-2022 ] - runs-on: ${{ matrix.os }} + runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}\build - - - name: Build - shell: bash - working-directory: ${{runner.workspace}}\build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCMAKE_CXX_FLAGS=-std=${{ matrix.standard }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler}}; cmake --build . --config ${{ matrix.mode }} - - - name: Run Tests - working-directory: ${{runner.workspace}}\build\${{ matrix.mode }} - run: ./Tests.exe \ No newline at end of file + - name: Run Build Matrix + shell: pwsh + run: | + bash .github/scripts/build-matrix.sh \ No newline at end of file From 8913d7809632673b97326505b3249369a6880c62 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:16:33 +0100 Subject: [PATCH 09/13] build fixes --- .github/scripts/build-matrix.ps1 | 42 ++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 18 +++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/scripts/build-matrix.ps1 diff --git a/.github/scripts/build-matrix.ps1 b/.github/scripts/build-matrix.ps1 new file mode 100644 index 0000000..4fd012c --- /dev/null +++ b/.github/scripts/build-matrix.ps1 @@ -0,0 +1,42 @@ +#!/usr/bin/env pwsh +$ErrorActionPreference = "Stop" + +# Defaults if not provided +$Compilers = if ($env:COMPILERS) { $env:COMPILERS.Split(" ") } else { @("cl") } +$Standards = if ($env:STANDARDS) { $env:STANDARDS.Split(" ") } else { @("c++17") } +$Modes = if ($env:MODES) { $env:MODES.Split(" ") } else { @("Debug") } + +Write-Host "๐Ÿ—๏ธ Running build matrix" +Write-Host "Compilers: $($Compilers -join ', ')" +Write-Host "Standards: $($Standards -join ', ')" +Write-Host "Modes: $($Modes -join ', ')" +Write-Host "" + +foreach ($Compiler in $Compilers) { + foreach ($Standard in $Standards) { + foreach ($Mode in $Modes) { + Write-Host "::group::$Compiler ($Standard, $Mode)" + $BuildDir = "build-$Compiler-$Standard-$Mode" + cmake -E make_directory $BuildDir + Push-Location $BuildDir + + cmake $env:GITHUB_WORKSPACE ` + -DCMAKE_BUILD_TYPE=$Mode ` + -DCMAKE_CXX_FLAGS="-std=$Standard" ` + -DCMAKE_CXX_COMPILER=$Compiler + + cmake --build . --config $Mode + + if (Test-Path "./Tests.exe") { + ./Tests.exe + } elseif (Test-Path "./Tests") { + ./Tests + } else { + Write-Host "โš ๏ธ No test binary found in $BuildDir" + } + + Pop-Location + Write-Host "::endgroup::" + } + } +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88416e6..fedbd18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: "Make Script Executable" + run: chmod +x .github/scripts/build-matrix.sh + - run: sudo apt-get install -y g++-11 g++-12 clang-14 clang-15 - name: Run Build Matrix run: | @@ -25,6 +29,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + + - name: "Make Script Executable" + run: chmod +x .github/scripts/build-matrix.sh + - run: sudo apt-get install -y g++-9 g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 - name: Run Build Matrix run: | @@ -37,6 +45,10 @@ jobs: runs-on: macos-15 steps: - uses: actions/checkout@v4 + + - name: "Make Script Executable" + run: chmod +x .github/scripts/build-matrix.sh + - name: Run Build Matrix run: | COMPILERS="c++ g++-13 g++-14" \ @@ -48,7 +60,11 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 + - name: Run Build Matrix shell: pwsh run: | - bash .github/scripts/build-matrix.sh \ No newline at end of file + $env:COMPILERS = "clang gcc msvc-14.0 msvc-14.2" + $env:STANDARDS = "c++14 c++17 c++20 c++23" + $env:MODES = "Debug Release" + .github\scripts\build-matrix.ps1 \ No newline at end of file From e5343206b5803c9ca250c2803f159a86c98298dd Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:23:33 +0100 Subject: [PATCH 10/13] chatgpt updated scripts --- .github/scripts/build-matrix.ps1 | 72 ++++++++++++++++++++++++++------ .github/scripts/build-matrix.sh | 71 +++++++++++++++++++++++++++---- 2 files changed, 121 insertions(+), 22 deletions(-) diff --git a/.github/scripts/build-matrix.ps1 b/.github/scripts/build-matrix.ps1 index 4fd012c..3ef1b3f 100644 --- a/.github/scripts/build-matrix.ps1 +++ b/.github/scripts/build-matrix.ps1 @@ -1,10 +1,14 @@ #!/usr/bin/env pwsh $ErrorActionPreference = "Stop" -# Defaults if not provided -$Compilers = if ($env:COMPILERS) { $env:COMPILERS.Split(" ") } else { @("cl") } -$Standards = if ($env:STANDARDS) { $env:STANDARDS.Split(" ") } else { @("c++17") } -$Modes = if ($env:MODES) { $env:MODES.Split(" ") } else { @("Debug") } +# Fail early if required environment variables are missing +if (-not $env:COMPILERS) { Write-Host "โŒ COMPILERS is required"; exit 1 } +if (-not $env:STANDARDS) { Write-Host "โŒ STANDARDS is required"; exit 1 } +if (-not $env:MODES) { Write-Host "โŒ MODES is required"; exit 1 } + +$Compilers = $env:COMPILERS.Split(" ") +$Standards = $env:STANDARDS.Split(" ") +$Modes = $env:MODES.Split(" ") Write-Host "๐Ÿ—๏ธ Running build matrix" Write-Host "Compilers: $($Compilers -join ', ')" @@ -12,6 +16,9 @@ Write-Host "Standards: $($Standards -join ', ')" Write-Host "Modes: $($Modes -join ', ')" Write-Host "" +# Array to track failures +$Failures = @() + foreach ($Compiler in $Compilers) { foreach ($Standard in $Standards) { foreach ($Mode in $Modes) { @@ -20,19 +27,45 @@ foreach ($Compiler in $Compilers) { cmake -E make_directory $BuildDir Push-Location $BuildDir - cmake $env:GITHUB_WORKSPACE ` - -DCMAKE_BUILD_TYPE=$Mode ` - -DCMAKE_CXX_FLAGS="-std=$Standard" ` - -DCMAKE_CXX_COMPILER=$Compiler + # CMake configure + try { + cmake $env:GITHUB_WORKSPACE ` + -DCMAKE_BUILD_TYPE=$Mode ` + -DCMAKE_CXX_FLAGS="-std=$Standard" ` + -DCMAKE_CXX_COMPILER=$Compiler + } catch { + $Failures += "$Compiler $Standard $Mode (cmake configure)" + Pop-Location + Write-Host "::endgroup::" + continue + } + + # Build + try { + cmake --build . --config $Mode + } catch { + $Failures += "$Compiler $Standard $Mode (build)" + Pop-Location + Write-Host "::endgroup::" + continue + } - cmake --build . --config $Mode + # Test executable path + $TestExe = Join-Path $PWD "Tests.exe" + if (-not (Test-Path $TestExe)) { + $TestExe = Join-Path $PWD $Mode "Tests.exe" + } - if (Test-Path "./Tests.exe") { - ./Tests.exe - } elseif (Test-Path "./Tests") { - ./Tests + # Run tests + if (Test-Path $TestExe) { + try { + & $TestExe + } catch { + $Failures += "$Compiler $Standard $Mode (tests)" + } } else { Write-Host "โš ๏ธ No test binary found in $BuildDir" + $Failures += "$Compiler $Standard $Mode (no test binary)" } Pop-Location @@ -40,3 +73,16 @@ foreach ($Compiler in $Compilers) { } } } + +# Summary +Write-Host "" +Write-Host "๐Ÿงพ Build Matrix Summary:" +if ($Failures.Count -eq 0) { + Write-Host "โœ… All builds and tests passed!" +} else { + Write-Host "โŒ $($Failures.Count) failed combination(s):" + foreach ($fail in $Failures) { + Write-Host " - $fail" + } + exit 1 +} diff --git a/.github/scripts/build-matrix.sh b/.github/scripts/build-matrix.sh index 5508d69..fb53fec 100644 --- a/.github/scripts/build-matrix.sh +++ b/.github/scripts/build-matrix.sh @@ -1,9 +1,26 @@ #!/usr/bin/env bash set -euo pipefail -COMPILERS=(${COMPILERS:-g++}) -STANDARDS=(${STANDARDS:-c++17}) -MODES=(${MODES:-Debug}) +# Fail early if required environment variables are missing +if [ -z "${COMPILERS:-}" ]; then + echo "โŒ COMPILERS is required" + exit 1 +fi + +if [ -z "${STANDARDS:-}" ]; then + echo "โŒ STANDARDS is required" + exit 1 +fi + +if [ -z "${MODES:-}" ]; then + echo "โŒ MODES is required" + exit 1 +fi + +# Convert space-separated strings into arrays +COMPILERS=($COMPILERS) +STANDARDS=($STANDARDS) +MODES=($MODES) echo "๐Ÿ—๏ธ Running build matrix" echo "Compilers: ${COMPILERS[*]}" @@ -11,21 +28,57 @@ echo "Standards: ${STANDARDS[*]}" echo "Modes: ${MODES[*]}" echo +# Track failed combinations +failures=() + for COMPILER in "${COMPILERS[@]}"; do for STANDARD in "${STANDARDS[@]}"; do for MODE in "${MODES[@]}"; do echo "::group::$COMPILER ($STANDARD, $MODE)" BUILD_DIR="build-${COMPILER}-${STANDARD}-${MODE}" + cmake -E make_directory "$BUILD_DIR" cd "$BUILD_DIR" - cmake "$GITHUB_WORKSPACE" \ - -DCMAKE_BUILD_TYPE="$MODE" \ - -DCMAKE_CXX_FLAGS="-std=$STANDARD" \ - -DCMAKE_CXX_COMPILER="$COMPILER" - cmake --build . --config "$MODE" - ./Tests || exit 1 + + if ! cmake "$GITHUB_WORKSPACE" \ + -DCMAKE_BUILD_TYPE="$MODE" \ + -DCMAKE_CXX_FLAGS="-std=$STANDARD" \ + -DCMAKE_CXX_COMPILER="$COMPILER"; then + failures+=("$COMPILER $STANDARD $MODE (cmake configure)") + cd .. + echo "::endgroup::" + continue + fi + + if ! cmake --build . --config "$MODE"; then + failures+=("$COMPILER $STANDARD $MODE (build)") + cd .. + echo "::endgroup::" + continue + fi + + if ! ./Tests; then + failures+=("$COMPILER $STANDARD $MODE (tests)") + cd .. + echo "::endgroup::" + continue + fi + cd .. echo "::endgroup::" done done done + +# Summary +echo +echo "๐Ÿงพ Summary:" +if [ ${#failures[@]} -eq 0 ]; then + echo "โœ… All builds and tests passed!" +else + echo "โŒ ${#failures[@]} failed combination(s):" + for fail in "${failures[@]}"; do + echo " - $fail" + done + exit 1 +fi From cce1ae704c78cb31fa18e9e38a255929e500c5f2 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:28:46 +0100 Subject: [PATCH 11/13] rename for clarity --- .github/workflows/build.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fedbd18..9cb7528 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,9 @@ on: branches: [ main ] jobs: - ubuntu-latest: - runs-on: ubuntu-latest + ubuntu-noble: + name: "Ubuntu Noble" + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -26,6 +27,7 @@ jobs: .github/scripts/build-matrix.sh ubuntu-jammy: + name: "Ubuntu Jammy" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -33,15 +35,16 @@ jobs: - name: "Make Script Executable" run: chmod +x .github/scripts/build-matrix.sh - - run: sudo apt-get install -y g++-9 g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 + - run: sudo apt-get install -y g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 - name: Run Build Matrix run: | - COMPILERS="g++-9 g++-10 clang++-11 clang++-12 clang++-13 clang++-14 clang++-15" \ + COMPILERS="g++-10 clang++-11 clang++-12 clang++-13 clang++-14 clang++-15" \ STANDARDS="c++14 c++17 c++20" \ MODES="Debug Release" \ .github/scripts/build-matrix.sh macos: + name: "MacOS 15" runs-on: macos-15 steps: - uses: actions/checkout@v4 @@ -56,11 +59,26 @@ jobs: MODES="Debug Release" \ .github/scripts/build-matrix.sh - windows: + windows-2022: + name: "Windows 2022" runs-on: windows-2022 steps: - uses: actions/checkout@v4 + - name: Run Build Matrix + shell: pwsh + run: | + $env:COMPILERS = "clang gcc msvc-14.0 msvc-14.2" + $env:STANDARDS = "c++14 c++17 c++20 c++23" + $env:MODES = "Debug Release" + .github\scripts\build-matrix.ps1 + + windows-2025: + name: "Windows 2025" + runs-on: windows-2025 + steps: + - uses: actions/checkout@v4 + - name: Run Build Matrix shell: pwsh run: | From 1a9f36475f8e0baa27eb2daa76cf868af8d7302c Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:31:14 +0100 Subject: [PATCH 12/13] added apt cache --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cb7528..baef98d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,11 @@ jobs: - name: "Make Script Executable" run: chmod +x .github/scripts/build-matrix.sh + - uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-cache-${{ runner.os }}-latest + - run: sudo apt-get install -y g++-11 g++-12 clang-14 clang-15 - name: Run Build Matrix run: | @@ -35,6 +40,11 @@ jobs: - name: "Make Script Executable" run: chmod +x .github/scripts/build-matrix.sh + - uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-cache-${{ runner.os }}-latest + - run: sudo apt-get install -y g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 - name: Run Build Matrix run: | From 353dc9bec7fb9f6e46f959013970709eeb4239ea Mon Sep 17 00:00:00 2001 From: james Date: Mon, 13 Oct 2025 18:32:35 +0100 Subject: [PATCH 13/13] rename cache --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index baef98d..24e8387 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/cache@v4 with: path: /var/cache/apt/archives - key: apt-cache-${{ runner.os }}-latest + key: apt-cache-ubuntu-noble-latest - run: sudo apt-get install -y g++-11 g++-12 clang-14 clang-15 - name: Run Build Matrix @@ -43,7 +43,7 @@ jobs: - uses: actions/cache@v4 with: path: /var/cache/apt/archives - key: apt-cache-${{ runner.os }}-latest + key: apt-cache-ubuntu-jammy-latest - run: sudo apt-get install -y g++-10 clang-11 clang-12 clang-13 clang-14 clang-15 - name: Run Build Matrix