From 58fbede219b14cbc554739790e5a51efdbc98105 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Fri, 20 Mar 2026 10:13:48 +0100 Subject: [PATCH 1/3] Bump macOS target --- CMakeLists.txt | 2 +- xdf.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79b7fe0..fc0b680 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.7) -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) +set(CMAKE_OSX_DEPLOYMENT_TARGET 11) project(libxdf VERSION 0.99.8 diff --git a/xdf.pro b/xdf.pro index a8b2788..6cfccf9 100644 --- a/xdf.pro +++ b/xdf.pro @@ -32,5 +32,5 @@ unix { } macx { - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 11 } From 98fa5d3b7d7795be10d77d76609c7094eea1c393 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Fri, 20 Mar 2026 10:29:01 +0100 Subject: [PATCH 2/3] Bump actions (#49) * Bump actions * Add Dependabot * Clean up workflows * Shorter release name * Format --- .github/dependabot.yml | 6 ++ .github/workflows/cppcmake.yml | 104 +++++++++++++++++---------------- 2 files changed, 60 insertions(+), 50 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/cppcmake.yml b/.github/workflows/cppcmake.yml index 7353f90..4a10df7 100644 --- a/.github/workflows/cppcmake.yml +++ b/.github/workflows/cppcmake.yml @@ -2,75 +2,79 @@ name: C/C++ CI on: push: + branches: + - main tags: - - v*.* + - v*.* pull_request: branches: - - main + - main jobs: build: name: ${{ matrix.config.name }} + permissions: + contents: read runs-on: ${{ matrix.config.os }} strategy: matrix: config: - - {name: "ubuntu-latest", os: ubuntu-latest, cmake_extra: ""} - - {name: "windows-x64", os: windows-latest, cmake_extra: "-T v143"} - - {name: "windows-32", os: windows-latest, cmake_extra: "-T v143 -A Win32"} - - {name: "macOS-latest", os: macOS-latest, cmake_extra: ""} + - { name: "ubuntu-latest", os: ubuntu-latest, cmake_extra: "" } + - { name: "windows-x64", os: windows-latest, cmake_extra: "-T v143" } + - { + name: "windows-x32", + os: windows-latest, + cmake_extra: "-T v143 -A Win32", + } + - { name: "macOS-latest", os: macos-latest, cmake_extra: "" } fail-fast: false - + steps: - - uses: actions/checkout@v3 - - - name: CMake version - run: cmake --version - - - name: Configure CMake - shell: bash - run: | - cmake -S . -B build ${{ matrix.config.cmake_extra }} -DCMAKE_INSTALL_PREFIX=${PWD}/build/install -DCPACK_PACKAGE_DIRECTORY=${PWD}/build/package -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON - - - name: Make - run: cmake --build build --config Release -j - - - name: Install - run: cmake --build build --config Release -j --target install - - - name: Package - run: cmake --build build --config Release -j --target package - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - # if: "!startsWith(github.ref, 'refs/heads')" - with: - name: pkg-${{ matrix.config.name }} - path: | + - uses: actions/checkout@v6 + + - name: CMake version + run: cmake --version + + - name: Configure CMake + shell: bash + run: | + cmake -S . -B build ${{ matrix.config.cmake_extra }} -DCMAKE_INSTALL_PREFIX=${PWD}/build/install -DCPACK_PACKAGE_DIRECTORY=${PWD}/build/package -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON + + - name: Make + run: cmake --build build --config Release -j + + - name: Install + run: cmake --build build --config Release -j --target install + + - name: Package + run: cmake --build build --config Release -j --target package + + - name: Upload Artifact + uses: actions/upload-artifact@v7 + with: + name: pkg-${{ matrix.config.name }} + path: | build/package/*.deb build/package/*.tar.bz2 build/package/*.zip - release: needs: build + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest + permissions: + contents: write steps: - - - name: Download Artifacts - if: startsWith(github.ref, 'refs/tags/') - uses: actions/download-artifact@v3 - - - name: Create Release - if: startsWith(github.ref, 'refs/tags/') - id: create_release - uses: softprops/action-gh-release@v1 - env: + - name: Download Artifacts + uses: actions/download-artifact@v8 + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v2 + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # tag_name: ${{ github.ref }} # ${{ github.ref }} is default - name: Release ${{ github.ref }} - draft: false - prerelease: false - # body_path: CHANGELOG.txt - files: 'pkg-*/*' + with: + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: "pkg-*/*" From 1c2165df93ceafb794db1f05b0cbe3952b2cc278 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Fri, 20 Mar 2026 10:40:54 +0100 Subject: [PATCH 3/3] Format CMakeLists and bump minimum version (#50) --- CMakeLists.txt | 58 +++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc0b680..9683218 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,17 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.10) set(CMAKE_OSX_DEPLOYMENT_TARGET 11) -project(libxdf - VERSION 0.99.8 - DESCRIPTION "C++ library for loading multimodal, multi-rate signals stored in XDF files." - HOMEPAGE_URL https://xdf-modules.github.io/libxdf/) +project( + libxdf + VERSION 0.99.8 + DESCRIPTION "C++ library for loading multimodal, multi-rate signals stored in XDF files" + HOMEPAGE_URL https://xdf-modules.github.io/libxdf/ +) option(XDF_NO_SYSTEM_PUGIXML "Force use of bundled pugixml" OFF) -set(SOURCES +set( + SOURCES xdf.h xdf.cpp smarc/filtering.h @@ -29,19 +32,20 @@ add_library(xdf ${SOURCES}) find_package(pugixml 1.9 QUIET) if(TARGET pugixml AND NOT XDF_NO_SYSTEM_PUGIXML) - message(STATUS "Using system pugixml") - target_link_libraries(xdf PRIVATE pugixml) + message(STATUS "Using system pugixml") + target_link_libraries(xdf PRIVATE pugixml) else() - message(STATUS "Using bundled pugixml") - target_sources(xdf PRIVATE pugixml/pugixml.cpp) - target_include_directories(xdf PRIVATE pugixml) + message(STATUS "Using bundled pugixml") + target_sources(xdf PRIVATE pugixml/pugixml.cpp) + target_include_directories(xdf PRIVATE pugixml) endif() target_compile_features(xdf PUBLIC cxx_std_20) set_target_properties(xdf PROPERTIES OUTPUT_NAME xdf PUBLIC_HEADER xdf.h) -target_include_directories(xdf PUBLIC - $ - $ +target_include_directories( + xdf PUBLIC + $ + $ ) include(CMakePackageConfigHelpers) include(GNUInstallDirs) @@ -50,24 +54,25 @@ configure_package_config_file( ${CMAKE_CURRENT_BINARY_DIR}/libxdfConfig.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) -install(TARGETS xdf - EXPORT "${PROJECT_NAME}Targets" - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +install( + TARGETS xdf + EXPORT "${PROJECT_NAME}Targets" + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) -install(EXPORT "${PROJECT_NAME}Targets" - COMPONENT ${PROJECT_NAME} - NAMESPACE "XDF::" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} +install( + EXPORT "${PROJECT_NAME}Targets" + COMPONENT ${PROJECT_NAME} + NAMESPACE "XDF::" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxdfConfig.cmake +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxdfConfig.cmake COMPONENT ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) -# set(CPACK_STRIP_FILES ON) -# set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_PACKAGE_CONTACT "yida.lin@outlook.com") if(APPLE) set(CPACK_GENERATOR TBZ2) @@ -79,4 +84,3 @@ elseif(UNIX) set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) endif() include(CPack) -