diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 78f90ce7..8914a998 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v3 @@ -44,3 +44,22 @@ jobs: mkdir -p build && cd build cmake .. make -j4 + + # For Windows, build using MSVC and vcpkg or choco for dependencies + - name: Install dependencies on Windows + if: runner.os == 'Windows' + shell: pwsh + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install eigen -y + # Dependencies for matplotplusplus + choco install gnuplot -y + + - name: Build on Windows + if: runner.os == 'Windows' + shell: pwsh + run: | + mkdir -Force build + cd build + cmake .. + cmake --build . --config Release diff --git a/include/cddp-cpp/cddp_core/constraint.hpp b/include/cddp-cpp/cddp_core/constraint.hpp index c79dafb9..250f9f78 100644 --- a/include/cddp-cpp/cddp_core/constraint.hpp +++ b/include/cddp-cpp/cddp_core/constraint.hpp @@ -19,6 +19,7 @@ #include #include +#define _USE_MATH_DEFINES #include // For std::acos, std::sqrt, std::max, M_PI #include #include diff --git a/include/cddp-cpp/dynamics_model/manipulator.hpp b/include/cddp-cpp/dynamics_model/manipulator.hpp index 5bcfbe5c..9f084cc6 100644 --- a/include/cddp-cpp/dynamics_model/manipulator.hpp +++ b/include/cddp-cpp/dynamics_model/manipulator.hpp @@ -18,6 +18,8 @@ #define CDDP_MANIPULATOR_HPP #include "cddp_core/dynamical_system.hpp" +#define _USE_MATH_DEFINES +#include #include namespace cddp { @@ -218,4 +220,4 @@ class Manipulator : public DynamicalSystem { } // namespace cddp -#endif // CDDP_MANIPULATOR_HPP \ No newline at end of file +#endif // CDDP_MANIPULATOR_HPP