Skip to content

Commit

Permalink
Merge pull request #70 from eseiler/infra/refactor2
Browse files Browse the repository at this point in the history
[INFRA] More refactoring
  • Loading branch information
eseiler committed Jan 30, 2024
2 parents ec22c1e + 0d9328c commit 8081b56
Show file tree
Hide file tree
Showing 26 changed files with 264 additions and 722 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -j2 gtest_main benchmark_main yaml-cpp
make -j2 -k gtest_main yaml-cpp
- name: Build tests
env:
CCACHE_IGNOREOPTIONS: "-fprofile-abs-path"
run: |
ccache -z
cd build
CMAKE_BUILD_PARALLEL_LEVEL=2 cmake --build . -- -k test
make -j2 -k check
ccache -sv
- name: Generate coverage report
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/ci_documentation.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ jobs:
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
make -j2 gtest_main benchmark_main yaml-cpp
make -j2 -k gtest_main yaml-cpp
- name: Build application
run: |
cd build
CMAKE_BUILD_PARALLEL_LEVEL=2 cmake --build . -- -k
make -j2 -k
- name: Build and run tests
run: |
cd build
CMAKE_BUILD_PARALLEL_LEVEL=2 cmake --build . -- -k test
make -j2 -k check
6 changes: 3 additions & 3 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ jobs:
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
make -j3 gtest_main benchmark_main yaml-cpp
make -j3 -k gtest_main yaml-cpp
- name: Build application
run: |
cd build
CMAKE_BUILD_PARALLEL_LEVEL=3 cmake --build . -- -k
make -j3 -k
- name: Build and run tests
run: |
cd build
CMAKE_BUILD_PARALLEL_LEVEL=3 cmake --build . -- -k test
make -j3 -k check
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint

on:
workflow_dispatch:

env:
TZ: Europe/Berlin

defaults:
run:
shell: bash -Eeuxo pipefail {0}

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false

- name: Run clang-format
uses: DoozyX/[email protected]
with:
clangFormatVersion: 17
inplace: True

- name: Run cmake-format
uses: PuneetMatharu/[email protected]
with:
args: --config-files .cmake-format.yaml --in-place

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: '[MISC] Automatic linting'
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
body: Automatic linting
signoff: false
branch: actions/lint
delete-branch: true
title: '[MISC] Automatic linting'
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ string (ASCII 27 Esc)
set (FontBold "${Esc}[1m")
set (FontReset "${Esc}[m")

# Allow to include CMake scripts from the app-template.
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

# Use ccache.
include (ccache)
require_ccache ()

# Add packages.
set (CPM_INDENT " CMake Package Manager CPM: ")
include (CPM)
include (CPMGetSystemPackage)
Expand All @@ -40,20 +42,11 @@ CPMUsePackageLock (${CMAKE_CURRENT_LIST_DIR}/cmake/package-lock.cmake)
CPMGetSystemPackage (sharg)
CPMGetSystemPackage (seqan3)

# Allow to include CMake scripts from seqan3.
list (APPEND CMAKE_MODULE_PATH "${seqan3_SOURCE_DIR}/test/cmake/")
# Allow to include CMake scripts from the app-template.
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/test/cmake/")

# Add the application.
add_subdirectory (src)
message (STATUS "${FontBold}You can run `make` to build the application.${FontReset}")

## DOCUMENTATION

add_subdirectory (doc EXCLUDE_FROM_ALL)

## TEST

list (APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") # Must be before `enable_testing ()`.
enable_testing ()
add_subdirectory (test EXCLUDE_FROM_ALL)
10 changes: 0 additions & 10 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ CPMDeclarePackage (seqan3
SYSTEM TRUE
OPTIONS "INSTALL_SEQAN3 OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING"
)
# benchmark
set (BENCHMARK_VERSION 1.8.3)
CPMDeclarePackage (benchmark
NAME benchmark
VERSION ${BENCHMARK_VERSION}
GITHUB_REPOSITORY google/benchmark
SYSTEM TRUE
OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF"
"CMAKE_MESSAGE_LOG_LEVEL WARNING"
)
# googletest
set (GOOGLETEST_VERSION 1.14.0)
CPMDeclarePackage (googletest
Expand Down
27 changes: 0 additions & 27 deletions doc/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/README.md

This file was deleted.

Loading

0 comments on commit 8081b56

Please sign in to comment.