diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 270af037..481d197c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -71,7 +71,7 @@ jobs: needs: [create_release] strategy: matrix: - os: [ubuntu-22.04, windows-2022] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v5 @@ -92,6 +92,22 @@ jobs: compiler: gcc if: runner.os == 'Linux' + - name: Setup NSIS (Windows) + run: | + iwr -useb get.scoop.sh -outfile 'install.ps1' + .\install.ps1 -RunAsAdmin + scoop update + scoop bucket add extras + scoop install nsis + Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\scoop\shims\" + if: runner.os == 'Windows' + + - name: Install Rust-bindgen (Linux) + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install bindgen + if: runner.os == 'Linux' + - name: Install VTK (Linux) run: | sudo apt-get -qq update diff --git a/.github/workflows/mdf_verification.yml b/.github/workflows/mdf_verification.yml index 02b015f7..431a5fcd 100644 --- a/.github/workflows/mdf_verification.yml +++ b/.github/workflows/mdf_verification.yml @@ -18,11 +18,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-latest] steps: - uses: actions/checkout@v5 + - name: Install deps + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install libblas-dev liblapack-dev + if: runner.os == 'Linux' + - name: Setup Python uses: actions/setup-python@v6 id: setup-python diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index a08ee6c9..750fe6b2 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-latest] steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index 1e3f8b8f..ed0d3d41 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -7,7 +7,7 @@ on: description: 'Host OS' required: false type: string - default: '["ubuntu-22.04"]' + default: '["ubuntu-latest"]' arch: description: 'Architecture target' required: true diff --git a/.github/workflows/python-wheels-test.yml b/.github/workflows/python-wheels-test.yml index e8fea72b..b6393946 100644 --- a/.github/workflows/python-wheels-test.yml +++ b/.github/workflows/python-wheels-test.yml @@ -7,7 +7,7 @@ on: description: 'Host OS' required: false type: string - default: '["ubuntu-22.04"]' + default: '["ubuntu-latest"]' arch: description: 'Architecture target' required: true diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 5bfaa6c0..9596085f 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -46,7 +46,7 @@ jobs: name: Build Linux_x86_64 uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master with: - os: '["ubuntu-22.04"]' + os: '["ubuntu-latest"]' arch: "x86_64" secrets: inherit diff --git a/.github/workflows/python-wrapper.yml b/.github/workflows/python-wrapper.yml index 84233a22..60c59672 100644 --- a/.github/workflows/python-wrapper.yml +++ b/.github/workflows/python-wrapper.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-latest] steps: - uses: actions/checkout@v5 diff --git a/tests/math_tests.cpp b/tests/math_tests.cpp index 3897b1dc..1f8039cd 100644 --- a/tests/math_tests.cpp +++ b/tests/math_tests.cpp @@ -25,37 +25,37 @@ template struct IsCloseMatcher : Catch::Matchers::MatcherGenericBase { IsCloseMatcher( - const Eigen::Ref a, + const DerivedA& a, const typename DerivedA::RealScalar rtol = Eigen::NumTraits::dummy_precision(), const typename DerivedA::RealScalar atol = Eigen::NumTraits::epsilon()) - : a(a) - , rtol(rtol) - , atol(atol) + : _a(a) + , _rtol(rtol) + , _atol(atol) { } template - bool match(const Eigen::DenseBase& b) const + bool match(const DerivedB& b) const { - return ((a.derived() - b.derived()).array().abs() <= - (atol + rtol * b.derived().array().abs())) + return ((_a.derived() - b.derived()).array().abs() <= + (_atol + _rtol * b.derived().array().abs())) .all(); } std::string describe() const override { std::stringstream ss; - ss << "Is close to: " << Catch::StringMaker::convert(a) - << "\nrtol = " << rtol << ", atol = " << atol; + ss << "Is close to: " << Catch::StringMaker::convert(_a) + << "\nrtol = " << _rtol << ", atol = " << _atol; return ss.str(); } private: - const Eigen::Ref a; - const typename DerivedA::RealScalar rtol; - const typename DerivedA::RealScalar atol; + const DerivedA _a; + const typename DerivedA::RealScalar _rtol; + const typename DerivedA::RealScalar _atol; }; template @@ -72,13 +72,12 @@ using namespace md; TEST_CASE("getH gives the cross product matrix") { - vec testVec; - testVec << 1, 2, 3; - + vec testVec{ 1.0, 2.0, 3.0 }; vec v{ 0.3, 0.2, 0.1 }; // getH() should create a matrix that replicates the behavior of the cross // product such that getH(v) * a == -v.cross(a) - REQUIRE_THAT(getH(v) * testVec, IsClose(v.cross(-testVec))); + vec ref = v.cross(-testVec); + REQUIRE_THAT(getH(v) * testVec, IsClose(ref)); } TEST_CASE("translateMass linear acceleration")