Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 110 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
os:
- ubuntu-22.04
- ubuntu-22.04-arm
- ubuntu-24.04
- ubuntu-24.04-arm
- ubuntu-26.04
- ubuntu-26.04-arm
build_type: [Release, Debug]
compiler: [
{
Expand All @@ -35,23 +41,31 @@ jobs:
CXX: ${{ matrix.compiler.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libeigen3-dev
sudo apt install -y libeigen3-dev libgtest-dev
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
echo "OS: RUNNER_OS=$RUNNER_OS" && echo ""
echo "Compiler: CC=$CC CXX=$CXX" && echo ""
echo "Eigen: $(apt-cache policy libeigen3-dev | grep Installed)"
- name: Configure
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
run: |
RELEASE_FLAGS=""
# GCC 15 -O3 miscompiles manif's bundle Generator code (bundle tests
# fail intermittently). -fno-guess-branch-probability keeps -O3 and
# avoids the bad codegen path. Only apply to gcc + Release.
if [ "${{ matrix.compiler.cc }}" = "gcc" ] && [ "${{ matrix.build_type }}" = "Release" ]; then
RELEASE_FLAGS="-fno-guess-branch-probability"
fi
cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS_RELEASE="$RELEASE_FLAGS"
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand All @@ -60,13 +74,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-15]
os: [macos-14, macos-15, macos-15-intel, macos-26, macos-26-intel]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
brew install eigen
brew install eigen googletest
mkdir ${{ runner.workspace }}/build
- name: Display config
run: |
Expand All @@ -78,7 +92,7 @@ jobs:
run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand All @@ -95,10 +109,10 @@ jobs:
]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
vcpkg install eigen3:x64-windows
vcpkg install eigen3:x64-windows gtest
cd ${{ runner.workspace }}
mkdir build
- name: Display config
Expand All @@ -117,23 +131,71 @@ jobs:
working-directory: ${{ runner.workspace }}/build
run: ctest . -C Release

eigen3-5:
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
compiler: [
{
"cc": "gcc",
"cxx": "g++"
}, {
"cc": "clang",
"cxx": "clang++"
}
]
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libblas3 curl tar libgtest-dev
curl -sL https://gitlab.com/libeigen/eigen/-/archive/5.0.0/eigen-5.0.0.tar.gz | tar -xzf -
cd eigen-5.0.0
cmake -S . -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
mkdir ${{ runner.workspace }}/build
- name: Configure CMake
working-directory: ${{ runner.workspace }}/build
run: |
RELEASE_FLAGS=""
# GCC 15 -O3 miscompiles manif's bundle Generator code (bundle tests
# fail intermittently). -fno-guess-branch-probability keeps -O3 and
# avoids the bad codegen path. Only apply to gcc + Release.
if [ "${{ matrix.compiler.cc }}" = "gcc" ] && [ "${{ matrix.build_type }}" = "Release" ]; then
RELEASE_FLAGS="-fno-guess-branch-probability"
fi
cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS_RELEASE="$RELEASE_FLAGS"
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest . -C ${{ matrix.build_type }}

cppcheck:
needs: [build-ubuntu]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libunwind-dev
sudo apt install -y libceres-dev cppcheck
sudo apt install -y libceres-dev libunwind-dev cppcheck libgtest-dev
mkdir ${{ runner.workspace }}/build
- name: Configure CMake
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
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make run-cppcheck
Expand All @@ -143,19 +205,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libunwind-dev
sudo apt install -y libceres-dev valgrind
sudo apt install -y libceres-dev libunwind-dev valgrind libgtest-dev
mkdir ${{ runner.workspace }}/build
- name: Configure CMake
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DENABLE_VALGRIND=ON -DBUILD_TESTING=ON
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest -T memcheck
Expand All @@ -165,19 +226,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libunwind-dev
sudo apt install -y libceres-dev
sudo apt install -y libceres-dev libunwind-dev libgtest-dev
mkdir ${{ runner.workspace }}/build
- name: Configure CMake
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand All @@ -187,28 +247,21 @@ jobs:

ceres:
needs: [build-ubuntu]
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# Test for both Ceres pre/post 2.2
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libunwind-dev
sudo apt install -y libceres-dev
sudo apt install -y libceres-dev libunwind-dev libgtest-dev
mkdir ${{ runner.workspace }}/build
- name: Configure CMake
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING=ON
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand All @@ -218,15 +271,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Setup
run: |
sudo apt update
sudo apt install -y libeigen3-dev
sudo apt install -y libeigen3-dev libgtest-dev
mkdir ${{ runner.workspace }}/build
# Install autodiff
- name: Checkout autodiff
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
repository: autodiff/autodiff
ref: main
Expand All @@ -245,7 +298,7 @@ jobs:
run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING=ON
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand All @@ -256,14 +309,14 @@ jobs:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest] #windows-latest,
python-version: ['3.8', '3.9', '3.10', '3.12']
python-version: ['3.10', '3.12', '3.14']
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- run: git fetch --prune --unshallow
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup apt
Expand All @@ -287,27 +340,31 @@ jobs:
needs: [build-ubuntu, build-mac]
strategy:
matrix:
platform: [ubuntu-22.04, ubuntu-24.04]
platform: [ubuntu-22.04, ubuntu-24.04, ubuntu-26.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- run: git fetch --prune --unshallow
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
- name: Setup apt
run: |
sudo apt update
sudo apt install -y libeigen3-dev pybind11-dev python3-pytest python3-numpy
sudo apt install -y libeigen3-dev pybind11-dev python3-pytest python3-numpy libgtest-dev
mkdir ${{ runner.workspace }}/build
- name: Configure
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=ON -DBUILD_PYTHON_BINDINGS=ON -DCMAKE_BUILD_TYPE=Release
run: |
RELEASE_FLAGS=""
# GCC 15 -O3 miscompiles manif's bundle Generator code (bundle tests
# fail intermittently). -fno-guess-branch-probability keeps -O3 and
# avoids the bad codegen path. Only apply to gcc + Release.
if [ "${{ matrix.platform }}" = "ubuntu-26.04" ]; then
RELEASE_FLAGS="-fno-guess-branch-probability"
fi
cmake $GITHUB_WORKSPACE -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=ON -DBUILD_PYTHON_BINDINGS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="$RELEASE_FLAGS"
- name: Build
working-directory: ${{ runner.workspace }}/build
run: make -j2
run: make -j$(nproc)
- name: Test
working-directory: ${{ runner.workspace }}/build
run: make test
Expand Down
Loading
Loading