diff --git a/.github/workflows/build_and_run_tests.yml b/.github/workflows/build_and_run_tests.yml index ce356b8..cd9cc80 100644 --- a/.github/workflows/build_and_run_tests.yml +++ b/.github/workflows/build_and_run_tests.yml @@ -28,7 +28,7 @@ jobs: name: Build and Tests strategy: matrix: - os: [ ubuntu-20.04, ubuntu-22.04 ] + os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ] runs-on: ${{ matrix.os }} steps: - run: | @@ -45,7 +45,7 @@ jobs: uses: robinraju/release-downloader@v1.6 with: repository: "mesonbuild/meson" - tag: "0.53.2" + tag: "1.7.0" fileName: "*.tar.gz" - name: Unpack meson tar ball and remove downloaded file run: | @@ -61,14 +61,14 @@ jobs: - name: Configure build directories run: | - ./meson.py --buildtype=release build.release - ./meson.py --buildtype=debug build.asan -Db_sanitize=address + ./meson.py setup --buildtype=release build.release + ./meson.py setup --buildtype=debug build.asan -Db_sanitize=address - name: Build and run release tests id: buildnormal run: ./meson.py test -C build.release - name: Save error logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.buildnormal.outcome == 'failure' }} with: name: Meson-logs-${{ matrix.os }} @@ -79,7 +79,7 @@ jobs: run: ./meson.py test -C build.asan - name: Save error logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.buildasan.outcome == 'failure' }} with: name: Meson-logs-${{ matrix.os }} diff --git a/debian/control b/debian/control index c75e159..0d66995 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Jannik Woehnert Standards-Version: 4.6.0 -Build-Depends: dev-doocs-libgul14 | libgul14-dev, meson (>=0.50.0), pkg-config, debhelper-compat (=12), libgit2-dev +Build-Depends: dev-doocs-libgul14 | libgul14-dev, meson (>=0.50.0), pkg-config, debhelper-compat (=12), catch2 (>=3.4.0) | libcatch2, libgit2-dev Package: libgit4cpp-0-4-8 Section: libs diff --git a/subprojects/catch2.wrap b/subprojects/catch2.wrap new file mode 100644 index 0000000..3068d40 --- /dev/null +++ b/subprojects/catch2.wrap @@ -0,0 +1,9 @@ +[wrap-git] +directory = catch2 +url = https://github.com/catchorg/Catch2.git +revision = v3.8.0 + +[provide] +dependency_names = catch2_dep, catch2_with_main_dep +catch2 = catch2_dep +catch2_with_main = catch2_with_main_dep diff --git a/tests/meson.build b/tests/meson.build index e92e8e6..49bf604 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -11,7 +11,10 @@ test_src = files( test('all', executable(meson.project_name() + '_test', test_src, - dependencies : libgit4cpp_dep, + dependencies : [ + dependency('catch2', version : '>=3.4.0'), + libgit4cpp_dep, + ], ), workdir : meson.current_build_dir(), timeout : 10, diff --git a/tests/test_Error.cc b/tests/test_Error.cc index 511130b..bea9ea8 100644 --- a/tests/test_Error.cc +++ b/tests/test_Error.cc @@ -1,9 +1,10 @@ /** - * \file test_Error.cc - * \date Created on January 23, 2024 - * \brief Test suite for the git::Error exception class. + * \file test_Error.cc + * \authors Fini Jastrow, Lars Fröhlich + * \date Created on January 23, 2024 + * \brief Test suite for the git::Error exception class. * - * \copyright Copyright 2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2024-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -23,7 +24,7 @@ #include -#include +#include #include "libgit4cpp/Error.h" diff --git a/tests/test_Remote.cc b/tests/test_Remote.cc index ca6c6d9..b22d9fe 100644 --- a/tests/test_Remote.cc +++ b/tests/test_Remote.cc @@ -4,7 +4,7 @@ * \date Created on January 15, 2024 * \brief Test suite for the Remote class. * - * \copyright Copyright 2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2024-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -25,8 +25,8 @@ #include #include +#include #include -#include #include #include "libgit4cpp/Error.h" diff --git a/tests/test_Repository.cc b/tests/test_Repository.cc index dd8e80d..f875da5 100644 --- a/tests/test_Repository.cc +++ b/tests/test_Repository.cc @@ -4,7 +4,7 @@ * \date Created on March 22, 2023 * \brief Test suite for the Repository class. * - * \copyright Copyright 2023-2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2023-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -26,8 +26,8 @@ #include #include +#include #include -#include #include #include "libgit4cpp/Error.h" diff --git a/tests/test_main.cc b/tests/test_main.cc index 9d0ebfa..1f11fd2 100644 --- a/tests/test_main.cc +++ b/tests/test_main.cc @@ -4,7 +4,7 @@ * \date Created on November 26, 2019 * \brief Test suite for libgit4cpp * - * \copyright Copyright 2019-2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2019-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -24,8 +24,7 @@ #include -#define CATCH_CONFIG_RUNNER -#include +#include #include "test_main.h"