diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aef10dcd..1af39614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,47 +40,47 @@ jobs: run: | sudo apt update sudo apt install -y libeigen3-dev - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Display config run: | echo "OS:" && $RUNNER_OS && echo "" echo "Compiler:" && $CC && $CXX && echo "" echo "Eigen:" && apt-cache policy libeigen3-dev | grep Installed - name: Configure - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test build-mac: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-12, macos-13, macos-14] + os: [macos-13, macos-14, macos-15] steps: - name: Checkout uses: actions/checkout@v4 - name: Setup run: | brew install eigen - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Display config run: | echo "OS:" && $RUNNER_OS && echo "" echo "Compiler:" && clang -v && echo "" echo "Eigen:" && brew info eigen - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test build-win: @@ -102,7 +102,7 @@ jobs: - name: Setup run: | vcpkg install eigen3:x64-windows - cd ${{runner.workspace}} + cd ${{ runner.workspace }} mkdir build - name: Display config shell: bash @@ -111,13 +111,13 @@ jobs: echo "Eigen:" && vcpkg list - name: Configure CMake shell: bash - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -G"${{ matrix.combinations.cmake_generator }}" -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake --build . --config Release - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: ctest . -C Release cppcheck: @@ -130,15 +130,15 @@ jobs: sudo apt update sudo apt install -y libunwind-dev sudo apt install -y libceres-dev cppcheck - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DENABLE_CPPCHECK=ON -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make run-cppcheck valgrind: @@ -152,15 +152,15 @@ jobs: sudo apt update sudo apt install -y libunwind-dev sudo apt install -y libceres-dev valgrind - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DENABLE_VALGRIND=ON -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: ctest -T memcheck codecov: @@ -174,18 +174,18 @@ jobs: sudo apt update sudo apt install -y libunwind-dev sudo apt install -y libceres-dev - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test - name: Upload coverage - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: bash <(curl -s https://codecov.io/bash) -R $GITHUB_WORKSPACE ceres: @@ -205,15 +205,15 @@ jobs: sudo apt update sudo apt install -y libunwind-dev sudo apt install -y libceres-dev - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test autodiff: @@ -226,31 +226,31 @@ jobs: run: | sudo apt update sudo apt install -y libeigen3-dev - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build # Install autodiff - name: Checkout autodiff - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: autodiff/autodiff ref: main path: 'autodiff' - name: Setup autodiff - run: mkdir ${{runner.workspace}}/build_autodiff + run: mkdir ${{ runner.workspace }}/build_autodiff - name: Configure CMake autodiff - working-directory: ${{runner.workspace}}/build_autodiff + working-directory: ${{ runner.workspace }}/build_autodiff run: cmake $GITHUB_WORKSPACE/autodiff -DAUTODIFF_BUILD_TESTS=OFF -DAUTODIFF_BUILD_PYTHON=OFF -DAUTODIFF_BUILD_EXAMPLES=OFF -DAUTODIFF_BUILD_DOCS=OFF - name: Install autodiff - working-directory: ${{runner.workspace}}/build_autodiff + working-directory: ${{ runner.workspace }}/build_autodiff run: sudo cmake --build . --target install # Build/test manif autodiff - name: Configure CMake - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING=ON - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test pybind11-pip: @@ -290,7 +290,7 @@ jobs: needs: [build-ubuntu, build-mac] strategy: matrix: - platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest] + platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] runs-on: ${{ matrix.platform }} steps: - name: Checkout @@ -304,18 +304,18 @@ jobs: run: | sudo apt update sudo apt install -y libeigen3-dev pybind11-dev python3-pytest python3-numpy - mkdir ${{runner.workspace}}/build + mkdir ${{ runner.workspace }}/build - name: Configure - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=ON -DBUILD_PYTHON_BINDINGS=ON -DCMAKE_BUILD_TYPE=Release - name: Build - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make -j2 - name: Test - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: make test - name: Install - working-directory: ${{runner.workspace}}/build + working-directory: ${{ runner.workspace }}/build run: sudo make install - name: Test Import run: python3 -c 'import manifpy' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0febc476..cabc66de 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,7 @@ jobs: # Build manifpy - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 with: @@ -39,7 +39,7 @@ jobs: # needs: [pybind11] # steps: # - name: Checkout - # uses: actions/checkout@v2 + # uses: actions/checkout@v4 # - name: Set up Python # uses: actions/setup-python@v2 @@ -60,35 +60,35 @@ jobs: - name: Fetch Python deps run: python -m pip install jinja2 Pygments docutils - name: Fetch m.css - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mosra/m.css path: docs/m.css - name: Build Python docs - working-directory: ${{runner.workspace}}/manif/docs + working-directory: ${{ runner.workspace }}/manif/docs run: python m.css/documentation/python.py conf_python.py - name: Build C++ docs - working-directory: ${{runner.workspace}}/manif/docs + working-directory: ${{ runner.workspace }}/manif/docs run: | mkdir -p site/cpp python m.css/documentation/doxygen.py conf_cpp.py - name: Build site - working-directory: ${{runner.workspace}}/manif/docs + working-directory: ${{ runner.workspace }}/manif/docs run: python m.css/documentation/doxygen.py conf.py - name: Latex equation white color - working-directory: ${{runner.workspace}}/manif/docs + working-directory: ${{ runner.workspace }}/manif/docs run: ./fix_latex_color.sh - name: Archive artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: site path: docs/site deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: [build] # todo: deploy if new tag/release if: | @@ -96,13 +96,12 @@ jobs: github.event_name == 'push' && github.ref == 'refs/heads/devel' steps: - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: site path: site - name: Deploy - uses: JamesIves/github-pages-deploy-action@3.7.1 + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: site + branch: gh-pages + folder: site diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6c4ea1a..3bf3f1b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,13 +15,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - run: git fetch --prune --unshallow - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.12 - name: Setup apt run: | @@ -40,7 +40,7 @@ jobs: run: python3 -m build --wheel -o dist/ - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist path: dist/* @@ -53,7 +53,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: dist path: dist diff --git a/examples/bundle_sam.cpp b/examples/bundle_sam.cpp index 06c63d41..8c0d43a7 100644 --- a/examples/bundle_sam.cpp +++ b/examples/bundle_sam.cpp @@ -335,7 +335,6 @@ int main() add_beacon_factor<2, 2>(X, measurements[2][2], S, r.segment(row), J.block(row, 0)); row += Dim; add_beacon_factor<2, 4>(X, measurements[2][4], S, r.segment(row), J.block(row, 0)); - row += Dim; // 4. Solve ----------------------------------------------------------------- diff --git a/examples/se2_localization_ukfm.cpp b/examples/se2_localization_ukfm.cpp index 87d856f9..1e78133a 100644 --- a/examples/se2_localization_ukfm.cpp +++ b/examples/se2_localization_ukfm.cpp @@ -142,10 +142,10 @@ struct Weights w0 = m / (ml) + Scalar(3) - alpha * alpha; } - Scalar sqrt_d_lambda; - Scalar wj; - Scalar wm; - Scalar w0; + Scalar sqrt_d_lambda = Scalar(0); + Scalar wj = Scalar(0); + Scalar wm = Scalar(0); + Scalar w0 = Scalar(0); }; using Weightsd = Weights;