Skip to content

Commit

Permalink
Set up CI for UnitTest and doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
MasWag committed Jul 31, 2023
1 parent ee96a7e commit a3e82e1
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 108 deletions.
129 changes: 129 additions & 0 deletions .github/workflows/boosttest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Boost.Test

on:
push:

jobs:
build:
runs-on: ubuntu-latest
container: maswag/monaa-test-env
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: default build
run: |
mkdir -p build
cd build && cmake .. && make
gcc_unit_test:
runs-on: ubuntu-latest
container: maswag/monaa-test-env
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: set gcc env
run: |
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
- name: build and test
run: |
mkdir -p gcc_build
cd gcc_build && cmake .. && make unit_test && make test
clang_unit_test:
runs-on: ubuntu-latest
container: maswag/monaa-test-env
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: set clang env
run: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
- name: build and test
run: |
mkdir -p clang_build
cd clang_build && cmake .. && make unit_test && make test
ubuntu_focal:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install required packages
run: sudo apt-get update && sudo apt-get install cmake libeigen3-dev libboost-all-dev -y
- name: build and test
run: |
mkdir -p build
cd build && cmake .. && make unit_test && make test
ubuntu_jammy:
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install required packages
run: sudo apt-get update && sudo apt-get install build-essential cmake libeigen3-dev libboost-all-dev -y
- name: build and test
run: |
mkdir -p build
cd build && cmake .. && make unit_test && make test
macOS_BigSur:
runs-on: macos-11
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install required packages
run: brew install eigen boost
- name: build and test
run: |
mkdir -p build
cd build && cmake .. && make unit_test && ./unit_test
macOS_Monterey:
runs-on: macos-12
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install required packages
run: brew install eigen boost
- name: build and test
run: |
mkdir -p build
cd build && cmake .. && make unit_test && ./unit_test
arch_linux:
runs-on: ubuntu-latest
container: archlinux:base-devel
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
- name: Install required packages
run: pacman -Syu cmake eigen boost tbb doxygen --noconfirm
- name: build and test
run: |
mkdir -p build
cd build && cmake .. && make unit_test && ./unit_test
33 changes: 33 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update Doxygen

on:
push:
branches:
- master
paths-ignore:
- '.github/workflows/boosttest.yml'
- 'doc/*'
- 'examples/*'

jobs:
doxygen:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: install_dependencies
run: sudo apt-get update -y && sudo apt-get install build-essential libeigen3-dev libboost-all-dev cmake doxygen graphviz -y
- name: build_doxygen
run: |
mkdir -p /tmp/build && cd /tmp/build
cmake $OLDPWD && make doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: /tmp/build/doc/html
destination_dir: doxygen
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Quantitative Timed Pattern Matching
===================================

[![wercker status](https://app.wercker.com/status/f1121fad1e4e172db519adf0da6d07f4/s/master "wercker status")](https://app.wercker.com/project/byKey/f1121fad1e4e172db519adf0da6d07f4)
[![Boost.Test](https://github.com/MasWag/qtpm/actions/workflows/boosttest.yml/badge.svg?branch=master)](https://github.com/MasWag/qtpm/actions/workflows/boosttest.yml)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE)
![Doxygen](https://img.shields.io/badge/docs-Doxygen-deepgreen.svg)](https://maswag.github.io/qtpm/doxygen/index.html)

This is our experimental implementation of *Quantitative Timed Pattern Matching*.
See [FORMATS2019.md](./experiments/README.md) for the experiments in our FORMATS 2019 paper.
Expand Down Expand Up @@ -32,7 +33,7 @@ Usage
Installation
------------

This software is tested on Arch Linux and Mac OSX 10.13.5
This software is tested on Ubuntu 20.04, Ubuntu 22.04, macOS 11, macOS 12, macOS 13, and Arch Linux.

### Requirements

Expand Down
2 changes: 2 additions & 0 deletions src/warshall_froid.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <unordered_map>

#include <boost/graph/adjacency_list.hpp>

#include "weighted_graph.hh"

/*!
Expand Down
3 changes: 3 additions & 0 deletions test/bellman_ford_test.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#include <array>
#include <queue>
#include <iostream>

#include <boost/test/unit_test.hpp>
#include <boost/mpl/list.hpp>

#include "../src/bellman_ford.hh"

BOOST_AUTO_TEST_SUITE(BellmanFordTest)
Expand Down
61 changes: 0 additions & 61 deletions test/dbm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,65 +191,4 @@ BOOST_AUTO_TEST_CASE( MergeTest )
BOOST_TEST((B.toTuple() == Bold.toTuple()));
}

// BOOST_AUTO_TEST_CASE( findDurationTest )
// {
// DBM orig, guard;
// orig = DBM::zero(3);
// guard = DBM::zero(3);

// // 1 \le x \le 2
// // 3 \le y \le 4
// orig.value << \
// Bounds(0, true), Bounds(-1, true), Bounds(-3,true), \
// Bounds(2, true), Bounds(0, true), Bounds(std::numeric_limits<double>::infinity(), false), \
// Bounds(4, true), Bounds(std::numeric_limits<double>::infinity(), false), Bounds(0, true);

// // 7 \le x \le 8
// // 9 \le y \le 10
// guard.value << \
// Bounds(0, true), Bounds(-7, true), Bounds(-9,true), \
// Bounds(8, true), Bounds(0, true), Bounds(std::numeric_limits<double>::infinity(), false), \
// Bounds(10, true), Bounds(std::numeric_limits<double>::infinity(), false), Bounds(0, true);

// Bounds lower, upper;
// orig.findDuration(guard, lower, upper);

// BOOST_CHECK_EQUAL(lower.first, -5);
// BOOST_CHECK_EQUAL(lower.second, true);
// BOOST_CHECK_EQUAL(upper.first, 7);
// BOOST_CHECK_EQUAL(upper.second, true);
// }

// BOOST_AUTO_TEST_CASE( findDurationTest2 )
// {
// DBM orig, guard;
// orig = DBM::zero(2);
// guard = DBM::zero(2);

// // 3 < x < 5
// orig.value << Bounds(0, true), Bounds(-3, false), Bounds(5, false), Bounds(0, true);

// // 4 < x < 6
// guard.value << Bounds(0, true), Bounds(-4, false), Bounds(6, false), Bounds(0, true);

// Bounds lower, upper;
// orig.findDuration(guard, lower, upper);

// BOOST_CHECK_EQUAL(lower.first, 0);
// BOOST_CHECK_EQUAL(lower.second, false);
// BOOST_CHECK_EQUAL(upper.first, 3);
// BOOST_CHECK_EQUAL(upper.second, false);
// }

// BOOST_AUTO_TEST_CASE( constraintToDBMTest )
// {
// DBM guard;
// guard = DBM::zero(2);

// constraintsToDBM({TimedAutomaton::X(0) < 10}, guard);

// BOOST_CHECK_EQUAL(guard.value(1, 0).first, 10);
// BOOST_CHECK_EQUAL(guard.value(1, 0).second, false);
// }

BOOST_AUTO_TEST_SUITE_END()
3 changes: 3 additions & 0 deletions test/timed_automaton_test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include <array>

#include <boost/test/unit_test.hpp>

#include "../src/timed_automaton.hh"

BOOST_AUTO_TEST_SUITE(timedAutomatonParserTests)
Expand Down
3 changes: 3 additions & 0 deletions test/warshall_froid_test.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include <array>
#include <iostream>

#include <boost/test/unit_test.hpp>
#include <boost/mpl/list.hpp>

#include "../src/warshall_froid.hh"

BOOST_AUTO_TEST_SUITE(WarshallFroidTest)
Expand Down
45 changes: 0 additions & 45 deletions wercker.yml

This file was deleted.

0 comments on commit a3e82e1

Please sign in to comment.