Skip to content

Commit

Permalink
Merge branch 'main' into franziska-wegner/2024/january/tests/IO/Geojs…
Browse files Browse the repository at this point in the history
…onWriter-activate
  • Loading branch information
franziska-wegner committed Jan 3, 2024
2 parents 305affa + cb587f8 commit c1019ff
Show file tree
Hide file tree
Showing 10 changed files with 217 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
name: CMake on Multiple Platforms

on:
push:
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/code-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Code Documentation

on:
workflow_run:
workflows: [ "CMake on Multiple Platforms" ]
# branches: [ "main" ]
types: [ "completed" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release, Debug]
c_compiler: [gcc, clang, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: gcc
cpp_compiler: g++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: cl

steps:
- uses: actions/checkout@v3

- name: Download Build Directory
uses: actions/download-artifact@main
with:
name: cmake-build-artifact-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cpp_compiler }}
path: ${{ steps.strings.outputs.build-output-dir }}

# Compared to Window and MacOS best option with stable ~2 min installation time.
- name: Install LaTeX (Linux)
if: startsWith(matrix.os,'ubuntu-')
run: |
sudo apt update --fix-missing
sudo apt upgrade
sudo apt update
sudo apt-get install texlive texlive-latex-recommended texlive-extra-utils texlive-latex-extra texlive-font-utils
shell: bash

# Takes too long > 13 min
# - name: Install LaTeX (MacOS)
# if: startsWith(matrix.os,'macos-')
# run: |
# brew update
# brew install --cask mactex;
# echo "/Library/TeX/texbin/" >> $GITHUB_PATH
# shell: bash

# Takes too long >> 25 min
# - name: Install LaTeX (Windows)
# if: startsWith(matrix.os, 'windows-')
# uses: teatimeguest/setup-texlive-action@v3
# with:
# packages: >-
# scheme-medium
# collection-latexextra
# babel-dutch
# cjk
# bibtex

# For Doxygen installation use action from https://github.com/marketplace/actions/doxygen-install.
- name: doxygen-install
uses: ssciwr/[email protected]

- name: Generate documentation
if: startsWith(matrix.os,'ubuntu-')
shell: sudo cmake -P {0}
run: |
execute_process(
COMMAND cmake --build build --target doc
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Building documentation failed")
endif()
# See https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-deploy-to-external-repository-external_repository
# for more information on the parameters.
- name: Publish Documentation to Github Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && startsWith(matrix.os,'ubuntu-') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: documentation/html
force_orphan: true
commit_message: ${{ github.event.head_commit.message }}
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
4 changes: 2 additions & 2 deletions src/Runnables/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#include <QApplication>
#include <QCommandLineParser>

#include <memory>
#include <cassert>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <memory>
#include <type_traits>

#include "DataStructures/Networks/PowerGrid.hpp"
Expand Down
4 changes: 2 additions & 2 deletions tests/Algorithms/PathFinding/TestDominatingThetaPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TEST_F ( TestDTPEmptyGraph
auto assertionString = buildAssertionString ( "DominatingThetaPath.hpp"
, "DominatingThetaPath"
, "Source"
, "source < labelSets_.size\\(\\)");
, R"(source < labelSets_.size\(\))");

ASSERT_DEATH ( {dtp_.Source(0);}, assertionString );
}
Expand All @@ -59,7 +59,7 @@ TEST_F ( TestDTPEmptyGraph
auto assertionString = buildAssertionString ( "DominatingThetaPath.hpp"
, "DominatingThetaPath"
, "Source"
, "source < labelSets_.size\\(\\)");
, R"(source < labelSets_.size\(\))");

try {
dtp_.Source(0);
Expand Down
28 changes: 14 additions & 14 deletions tests/DataStructures/Container/TestBinaryHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "Top"
, "!Empty\\(\\)");
, R"(!Empty\(\))");
ASSERT_DEATH( {heapConst_.Top();}, assertionString );
}
#else
Expand All @@ -71,7 +71,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "Top"
, "!Empty\\(\\)");
, R"(!Empty\(\))");
try {
heapConst_.Top();
} catch ( std::runtime_error const & error ) {
Expand Down Expand Up @@ -221,7 +221,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DecreaseKey"
, "index < Size\\(\\)" );
, R"(index < Size\(\))" );

TElement p = -1;

Expand All @@ -235,7 +235,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DecreaseKey"
, "index < Size\\(\\)" );
, R"(index < Size\(\))" );
TElement p = -1;

try {
Expand All @@ -257,7 +257,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "ChangeKey"
, "index < Size\\(\\)");
, R"(index < Size\(\))");

TElement p = -1;

Expand All @@ -271,7 +271,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "ChangeKey"
, "index < Size\\(\\)");
, R"(index < Size\(\))");
TElement p = -1;

try {
Expand Down Expand Up @@ -339,7 +339,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "Pop"
, "Size\\(\\) > 0");
, R"(Size\(\) > 0)");
ASSERT_DEATH( {heap_.Pop();}, assertionString );
}
#else
Expand All @@ -350,7 +350,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "Pop"
, "Size\\(\\) > 0");
, R"(Size\(\) > 0)");
try {
heap_.Pop();
} catch ( std::runtime_error const & error ) {
Expand All @@ -370,7 +370,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DeleteTop"
, "Size\\(\\) > 0");
, R"(Size\(\) > 0)");

ASSERT_DEATH( {heap_.DeleteTop();}, assertionString );
}
Expand All @@ -382,7 +382,7 @@ TEST_F( TestBinaryHeap,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DeleteTop"
, "Size\\(\\) > 0");
, R"(Size\(\) > 0)");
try {
heap_.DeleteTop();
} catch ( std::runtime_error const & error ) {
Expand Down Expand Up @@ -718,7 +718,7 @@ TEST_F (TestBinaryHeapWithOneIntegerElement,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DecreaseKey"
, "index < Size\\(\\)" );
, R"(index < Size\(\))" );

ASSERT_DEATH( {heap_.DecreaseKey(7, 123);}, assertionString );
}
Expand All @@ -730,7 +730,7 @@ TEST_F (TestBinaryHeapWithOneIntegerElement,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "DecreaseKey"
, "index < Size\\(\\)" );
, R"(index < Size\(\))" );
try {
heap_.DecreaseKey(7, 123);
} catch ( std::runtime_error const & error ) {
Expand Down Expand Up @@ -785,7 +785,7 @@ TEST_F (TestBinaryHeapWithOneIntegerElement,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "ChangeKey"
, "index < Size\\(\\)");
, R"(index < Size\(\))");

ASSERT_DEATH( {heap_.ChangeKey(7, 123);}, assertionString );
}
Expand All @@ -797,7 +797,7 @@ TEST_F (TestBinaryHeapWithOneIntegerElement,
auto assertionString = buildAssertionString ( "BinaryHeap.hpp"
, "BinaryHeap"
, "ChangeKey"
, "index < Size\\(\\)");
, R"(index < Size\(\))");
try {
heap_.ChangeKey(7, 123);
} catch ( std::runtime_error const & error ) {
Expand Down
Loading

0 comments on commit c1019ff

Please sign in to comment.