Skip to content

Commit

Permalink
Merge pull request #575 from andre-schulz/github_ci
Browse files Browse the repository at this point in the history
Replace Travis CI with GitHub Actions
  • Loading branch information
simonfuhrmann authored Sep 1, 2024
2 parents 335bfe4 + 1014e8f commit 24a3f7a
Show file tree
Hide file tree
Showing 28 changed files with 171 additions and 71 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: MVE GitHub Actions CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false

matrix:
platform:
- { name: "Ubuntu 20.04, GCC, x86_64", os: ubuntu-20.04, cpp_compiler: g++, qmake_spec: linux-g++ }
- { name: "Ubuntu 20.04, Clang, x86_64", os: ubuntu-20.04, cpp_compiler: clang++, qmake_spec: linux-clang }
- { name: "Ubuntu 22.04, GCC, x86_64", os: ubuntu-22.04, cpp_compiler: g++, qmake_spec: linux-g++ }
- { name: "Ubuntu 22.04, Clang, x86_64", os: ubuntu-22.04, cpp_compiler: clang++, qmake_spec: linux-clang }
- { name: "Ubuntu 24.04, GCC, x86_64", os: ubuntu-24.04, cpp_compiler: g++, qmake_spec: linux-g++ }
- { name: "Ubuntu 24.04, Clang, x86_64", os: ubuntu-24.04, cpp_compiler: clang++, qmake_spec: linux-clang }
- { name: "macOS 12, Clang, x86_64", os: macos-12, cpp_compiler: clang++, qmake_spec: macx-clang }
- { name: "macOS 13, Clang, x86_64", os: macos-13, cpp_compiler: clang++, qmake_spec: macx-clang }
- { name: "macOS 14, Clang, arm64", os: macos-14, cpp_compiler: clang++, qmake_spec: macx-clang }

env:
CXX: ${{ matrix.platform.cpp_compiler }}
QMAKE_SPEC: ${{ matrix.platform.qmake_spec }}

steps:
- uses: actions/checkout@v4

- name: Install Ubuntu dependencies
if: runner.os == 'Linux'
run: |
echo "::group::apt-get update"
sudo apt-get update
echo "::endgroup::"
echo "::group::apt-get upgrade"
sudo apt-get upgrade -y
echo "::endgroup::"
echo "::group::apt-get install"
sudo apt-get install \
build-essential \
clang \
libgl-dev \
libgtest-dev \
libjpeg-turbo8-dev \
libomp-dev \
libpng-dev \
libqt5opengl5-dev \
libtiff-dev \
pkg-config \
zlib1g-dev
echo "::endgroup::"
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
echo "::group::brew update"
brew update
echo "::endgroup::"
echo "::group::brew install"
brew install -q \
googletest \
jpeg-turbo \
libpng \
libtiff \
qt@5
echo "::endgroup::"
echo "::group::brew link"
brew link qt@5
echo "::endgroup::"
- name: Build (U)MVE on Linux/macOS
run: |
${CXX} --version
if [ "`uname`" = "Darwin" ]; then
export NUM_CPU_CORES="`sysctl -n hw.ncpu`"
else
export NUM_CPU_CORES="`nproc`"
fi
echo "::group::Build MVE"
make -j${NUM_CPU_CORES}
echo "::endgroup"::
echo "::group::Build UMVE"
qmake -v
pushd apps/umve
qmake -spec ${QMAKE_SPEC}
make -j${NUM_CPU_CORES}
popd
echo "::endgroup::"
echo "::group::Build tests"
make -j${NUM_CPU_CORES} test
echo "::endgroup::"
- name: Run tests
run: ./tests/test

37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

12 changes: 11 additions & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CXX ?= g++
CXXWARNINGS ?= -Wall -Wextra -Wundef -pedantic
CXXINTRINSICS ?= -march=native
CXXFEATURES ?= -funsafe-math-optimizations -fno-math-errno -std=c++11
CXXFEATURES ?= -funsafe-math-optimizations -fno-math-errno -std=c++14
CXXFLAGS ?= ${CXXWARNINGS} ${CXXINTRINSICS} ${CXXFEATURES} -g -O3

# Delete this if OpenMP is not available (e.g., OS X without gcc)
Expand All @@ -13,9 +13,19 @@ CXXFLAGS += -pthread

UNAME = $(shell uname)
ifeq (${UNAME},Darwin)
CXXFLAGS += -DGL_SILENCE_DEPRECATION=1
OPENMP =
endif

LIBJPEG_CFLAGS = `pkg-config --cflags libjpeg`
LIBJPEG_LDFLAGS = `pkg-config --libs libjpeg`

LIBPNG_CFLAGS = `pkg-config --cflags libpng`
LIBPNG_LDFLAGS = `pkg-config --libs libpng`

LIBTIFF_CFLAGS = `pkg-config --cflags libtiff-4`
LIBTIFF_LDFLAGS = `pkg-config --libs libtiff-4`

COMPILE.cc = ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
LINK.o = ${CXX} ${LDFLAGS}
.DEFAULT_GOAL := ${TARGET}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MVE -- The Multi-View Environemnt

![Build Status](https://travis-ci.org/simonfuhrmann/mve.svg?branch=master)
[![Build Status](https://github.com/simonfuhrmann/mve/actions/workflows/main.yml/badge.svg)](https://github.com/simonfuhrmann/mve/actions/workflows/main.yml)

The Multi-View Environment, MVE, is an implementation of a complete
end-to-end pipeline for image-based geometry reconstruction. It features
Expand Down
2 changes: 1 addition & 1 deletion apps/bundle2pset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/dmrecon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_dmrecon.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/featurerecon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_sfm.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/fssrecon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_fssr.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/makescene/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/mesh2pset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_fssr.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/meshalign/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_fssr.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/meshclean/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_fssr.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/meshconvert/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/prebundle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_sfm.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/scene2pset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/sceneupgrade/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_sfm.a libmve.a libmve_util.a
Expand Down
2 changes: 1 addition & 1 deletion apps/sfmrecon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := $(shell basename `pwd`)
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o} libmve_sfm.a libmve.a libmve_util.a
Expand Down
5 changes: 3 additions & 2 deletions apps/umve/umve.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MVE_ROOT = ../..

CONFIG += qt release c++11
CONFIG += link_pkgconfig qt release c++11
PKGCONFIG += libjpeg libpng libtiff-4
QT += concurrent opengl

QMAKE_LFLAGS += -rdynamic -fopenmp
Expand All @@ -13,7 +14,7 @@ TARGET = umve

INCLUDEPATH += $${MVE_ROOT}/libs
DEPENDPATH += $${MVE_ROOT}/libs
LIBS = $${MVE_ROOT}/libs/dmrecon/libmve_dmrecon.a $${MVE_ROOT}/libs/mve/libmve.a $${MVE_ROOT}/libs/ogl/libmve_ogl.a $${MVE_ROOT}/libs/util/libmve_util.a -lpng -ljpeg -ltiff
LIBS = $${MVE_ROOT}/libs/dmrecon/libmve_dmrecon.a $${MVE_ROOT}/libs/mve/libmve.a $${MVE_ROOT}/libs/ogl/libmve_ogl.a $${MVE_ROOT}/libs/util/libmve_util.a
QMAKE_LIBDIR_QT =

OBJECTS_DIR = build
Expand Down
2 changes: 0 additions & 2 deletions libs/dmrecon/patch_optimization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ PatchOptimization::optimizeDepthAndNormal()
math::Vec3d ATb(0.f);
Samples const & mCol = sampler->getMasterColorSamples();
IndexSet::const_iterator id;
std::size_t row = 0;
for (id = neighIDs.begin(); id != neighIDs.end(); ++id)
{
Samples nCol, nDeriv;
Expand Down Expand Up @@ -341,7 +340,6 @@ PatchOptimization::optimizeDepthAndNormal()
ATA(1,2) += a_i[1] * a_i[2];
ATA(2,2) += a_i[2] * a_i[2];
ATb += a_i * b_i;
++row;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/fssr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := libmve_fssr.a
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -fPIC -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg ${OPENMP}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS} ${OPENMP}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o}
Expand Down
4 changes: 2 additions & 2 deletions libs/mve/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ TARGET := libmve.a
include ${MVE_ROOT}/Makefile.inc

# Position independent code (-fPIC) is required for the UMVE plugin system.
CXXFLAGS += -fPIC -I${MVE_ROOT}/libs
LDLIBS += -lpng -ltiff -ljpeg
CXXFLAGS += -fPIC -I${MVE_ROOT}/libs ${LIBJPEG_CFLAGS} ${LIBPNG_CFLAGS} ${LIBTIFF_CFLAGS}
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o}
Expand Down
2 changes: 0 additions & 2 deletions libs/mve/bundle_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ load_colmap_points_3D_txt(std::string const& points3D_filename,
Bundle::Features& features = bundle->get_features();

std::size_t num_views = bundle->get_cameras().size();
int num_points_3d = 0;
std::string point_3d_line;
while (std::getline(in_points3D, point_3d_line))
{
Expand Down Expand Up @@ -798,7 +797,6 @@ load_colmap_points_3D_txt(std::string const& points3D_filename,
}
feature_3d.refs = refs;
features.push_back(feature_3d);
++num_points_3d;
}
in_points3D.close();
}
Expand Down
2 changes: 1 addition & 1 deletion libs/mve/image_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ void
tiff_error_handler (char const* /*module*/, char const* fmt, va_list ap)
{
char msg[2048];
::vsprintf(msg, fmt, ap);
::vsnprintf(msg, 2048, fmt, ap);
throw util::Exception(msg);
}

Expand Down
2 changes: 1 addition & 1 deletion libs/sfm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGET := libmve_sfm.a
include ${MVE_ROOT}/Makefile.inc

CXXFLAGS += -I${MVE_ROOT}/libs ${OPENMP}
LDLIBS += -lpng -ltiff -ljpeg
LDLIBS += ${LIBJPEG_LDFLAGS} ${LIBPNG_LDFLAGS} ${LIBTIFF_LDFLAGS}

SOURCES := $(wildcard [^_]*.cc)
${TARGET}: ${SOURCES:.cc=.o}
Expand Down
2 changes: 1 addition & 1 deletion libs/sfm/cascade_hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ CascadeHashing::oneway_match (Matching::Options const& matching_opts,

top_candidates.reserve(max_num_candidates);

std::unique_ptr<T> tmp(new T[max_num_candidates * descriptor_length]);
std::unique_ptr<T[]> tmp(new T[max_num_candidates * descriptor_length]);
NearestNeighbor<T> nn;
nn.set_elements(tmp.get());
nn.set_element_dimensions(descriptor_length);
Expand Down
Loading

0 comments on commit 24a3f7a

Please sign in to comment.