Skip to content

Commit

Permalink
Add CI using GitHub Actions
Browse files Browse the repository at this point in the history
The Travis CI build in this repository no longer works but GitHub provides
its own CI/CD infrastructure which is free for public repositories, quote
from [1]:

  "GitHub Actions usage is free for standard GitHub-hosted runners in public
   repositories [...]"

The list of standard GitHub-hosted runners for public repositories can
be found at the following URL:

  https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

[1] https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions
  • Loading branch information
andre-schulz committed Aug 31, 2024
1 parent 3eb318d commit 048e0bb
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 1 deletion.
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

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

0 comments on commit 048e0bb

Please sign in to comment.