Skip to content

Commit

Permalink
Rainer/ci (RainerKuemmerle#527)
Browse files Browse the repository at this point in the history
* Activate Github actions
  • Loading branch information
RainerKuemmerle authored Jun 27, 2021
1 parent a49abaf commit e28160d
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 81 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- master
pull_request:
release:

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC",
os: ubuntu-latest,
build_type: "Debug",
do_coverage: "ON",
}
- {
name: "macOS Latest Clang",
os: macos-latest,
build_type: "Debug",
do_coverage: "OFF",
}
#- {
#name: "Windows Latest MSVC",
#os: windows-latest,
#build_type: "Debug",
#environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
#generators: "Visual Studio 16 2019"
#do_coverage: "OFF",
#}


steps:
- uses: actions/checkout@v2
with:
fetch-depth: 25

- name: Print env
run: |
echo github.ref: ${{github.ref}}
echo github.event.action: ${{github.event.action}}
echo github.event_name: ${{github.event_name}}
echo runner.os: ${{runner.os}}
- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libeigen3-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5 libsuitesparse-dev lcov
- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: brew install cmake eigen

#- name: Install dependencies on Windows
#if: runner.os == 'Windows'
#run: brew install cmake eigen

- name: Configure CMake
run: |
cmake --version
cmake -B ${{github.workspace}}/build -DBUILD_UNITTESTS=ON -DBUILD_CODE_COVERAGE=${{matrix.config.do_coverage}} -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.build_type}} -j 2

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.config.build_type}} --extra-verbose --output-on-failure

- name: Coverage
if: matrix.config.do_coverage == 'ON'
run: bash ${{github.workspace}}/build/codecov.sh
72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# g2o - General Graph Optimization

Linux: [![Build Status](https://travis-ci.org/RainerKuemmerle/g2o.svg?branch=master)](https://travis-ci.org/RainerKuemmerle/g2o)
Linux: [![CI](https://github.com/RainerKuemmerle/g2o/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/RainerKuemmerle/g2o/actions/workflows/ci.yml)
Windows: [![Build status](https://ci.appveyor.com/api/projects/status/9w0cpb9krc6t4nt7/branch/master?svg=true)](https://ci.appveyor.com/project/RainerKuemmerle/g2o/branch/master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e87df92948b747d58591372dd425fc59)](https://app.codacy.com/manual/rainer.kuemmerle/g2o?utm_source=github.com&utm_medium=referral&utm_content=RainerKuemmerle/g2o&utm_campaign=Badge_Grade_Dashboard)

Expand Down
18 changes: 10 additions & 8 deletions g2o/types/sba/types_six_dof_expmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@

namespace g2o {

// clang-format off
G2O_REGISTER_TYPE_GROUP(expmap);
G2O_REGISTER_TYPE(VERTEX_SE3 : EXPMAP, VertexSE3Expmap);
G2O_REGISTER_TYPE(EDGE_SE3 : EXPMAP, EdgeSE3Expmap);
G2O_REGISTER_TYPE(EDGE_PROJECT_XYZ2UV : EXPMAP, EdgeProjectXYZ2UV);
G2O_REGISTER_TYPE(EDGE_PROJECT_XYZ2UVU : EXPMAP, EdgeProjectXYZ2UVU);
G2O_REGISTER_TYPE(EDGE_SE3_PROJECT_XYZ : EXPMAP, EdgeSE3ProjectXYZ);
G2O_REGISTER_TYPE(EDGE_SE3_PROJECT_XYZONLYPOSE : EXPMAP, EdgeSE3ProjectXYZOnlyPose);
G2O_REGISTER_TYPE(EDGE_STEREO_SE3_PROJECT_XYZ : EXPMAP, EdgeStereoSE3ProjectXYZ);
G2O_REGISTER_TYPE(EDGE_STEREO_SE3_PROJECT_XYZONLYPOSE : EXPMAP, EdgeStereoSE3ProjectXYZOnlyPose);
G2O_REGISTER_TYPE(VERTEX_SE3:EXPMAP, VertexSE3Expmap);
G2O_REGISTER_TYPE(EDGE_SE3:EXPMAP, EdgeSE3Expmap);
G2O_REGISTER_TYPE(EDGE_PROJECT_XYZ2UV:EXPMAP, EdgeProjectXYZ2UV);
G2O_REGISTER_TYPE(EDGE_PROJECT_XYZ2UVU:EXPMAP, EdgeProjectXYZ2UVU);
G2O_REGISTER_TYPE(EDGE_SE3_PROJECT_XYZ:EXPMAP, EdgeSE3ProjectXYZ);
G2O_REGISTER_TYPE(EDGE_SE3_PROJECT_XYZONLYPOSE:EXPMAP, EdgeSE3ProjectXYZOnlyPose);
G2O_REGISTER_TYPE(EDGE_STEREO_SE3_PROJECT_XYZ:EXPMAP, EdgeStereoSE3ProjectXYZ);
G2O_REGISTER_TYPE(EDGE_STEREO_SE3_PROJECT_XYZONLYPOSE:EXPMAP, EdgeStereoSE3ProjectXYZOnlyPose);
G2O_REGISTER_TYPE(PARAMS_CAMERAPARAMETERS, CameraParameters);
// clang-format on

} // namespace g2o

0 comments on commit e28160d

Please sign in to comment.