Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: HEP-CE Code Coverage
# Schema: https://json.schemastore.org/github-action.json

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
name: Calculate Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout Respond Repository
uses: actions/checkout@v6

- name: Install Boost
uses: MarkusJx/install-boost@v2
id: install-boost
with:
boost_version: 1.84.0
toolset: gcc

- name: Install gcovr
run: pip install gcovr

- name: Build and Test Project
run: >
cmake --preset coverage && cmake --build --preset coverage && ctest --preset coverage
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}

- name: Generate gcovr report HTML
run: |
gcovr -r . --filter src --html coverage.html

- name: Generate gcovr report XML
run: |
gcovr -r . --filter src --xml-pretty -o coverage.xml

- name: Upload Code Coverage Report
uses: actions/upload-artifact@v7
with:
name: code-coverage-report
path: coverage.*

- name: Generate Coverage Badge
uses: GaelGirodon/ci-badges-action@v1
with:
gist-id: 10e746e28df5d23e91689b01493435a0
token: ${{secrets.GIST_BADGE_TOKEN}}
90 changes: 50 additions & 40 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,55 @@ name: Docs
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: ["main"]
workflow_dispatch:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: write
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y wget graphviz rsync
shell: bash

- name: Install Doxygen v1.9.6
run: |
transformed_version=$(echo "1.9.6" | tr '.' '_')
wget https://github.com/doxygen/doxygen/releases/download/Release_${transformed_version}/doxygen-1.9.6.linux.bin.tar.gz
tar -xzf doxygen-1.9.6.linux.bin.tar.gz
sudo mv doxygen-1.9.6/bin/doxygen /usr/local/bin/doxygen
shell: bash

- name: Generate Doxygen Documentation
run: doxygen Doxyfile
shell: bash

- name: Create .nojekyll (ensures pages with underscores work on gh pages)
run: touch docs/doxygen/html/.nojekyll
shell: bash

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: SyndemicsLab/hep-ce
branch: gh-pages
folder: docs/doxygen/html
target-folder: ./
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: "true"

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y wget graphviz rsync
shell: bash

- name: Install Doxygen v1.9.6
run: |
transformed_version=$(echo "1.9.6" | tr '.' '_')
wget https://github.com/doxygen/doxygen/releases/download/Release_${transformed_version}/doxygen-1.9.6.linux.bin.tar.gz
tar -xzf doxygen-1.9.6.linux.bin.tar.gz
sudo mv doxygen-1.9.6/bin/doxygen /usr/local/bin/doxygen
shell: bash

- name: Configure Project
run: cmake --preset docs

- name: Generate Doxygen Documentation
run: doxygen Doxyfile
shell: bash

- name: Remove polyfill references from generated HTML
run: |
find docs/doxygen/html -type f -name '*.html' -print0 |
xargs -0 sed -i '/polyfill\.io\/v3\/polyfill\.min\.js/d'
shell: bash

- name: Create .nojekyll (ensures pages with underscores work on gh pages)
run: touch docs/doxygen/html/.nojekyll
shell: bash

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: SyndemicsLab/hep-ce
branch: gh-pages
folder: docs/doxygen/html
target-folder: ./
38 changes: 38 additions & 0 deletions .github/workflows/linux-unit-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Linux HEP-CE Unit Tests
# Schema: https://json.schemastore.org/github-action.json

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
unit-testing:
name: Testing ${{ matrix.os }} ${{matrix.build-variant}} build
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
matrix:
os: [ubuntu-latest] # macos-latest
build-variant: [shared, static]
steps:
- name: Checkout HEP-CE
uses: actions/checkout@v6

- name: Install Boost
uses: MarkusJx/install-boost@v2
id: install-boost
with:
boost_version: 1.84.0
toolset: gcc

- name: Run Testing Workflow
continue-on-error: true
run: cmake --workflow --preset test-debug-${{matrix.build-variant}}
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
timeout-minutes: 10
74 changes: 0 additions & 74 deletions .github/workflows/unit-tests.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/windows-unit-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Windows HEP-CE Unit Tests
# Schema: https://json.schemastore.org/github-action.json

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
unit-testing:
name: Testing ${{ matrix.os }} ${{matrix.build-variant}} build
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh

strategy:
matrix:
os: [windows-latest] # macos-latest
build-variant: [shared, static]
steps:
- name: Checkout HEP-CE
uses: actions/checkout@v6

- name: Install Boost
uses: MarkusJx/install-boost@v2
id: install-boost
with:
boost_version: 1.84.0
toolset: mingw

- name: Run Testing Workflow
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
$env:Path = "C:\mingw64\bin;$env:Path"
cmake --workflow --preset test-debug-${{ matrix.build-variant }}
timeout-minutes: 10
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.log
Doxyfile

CMakeLists.txt.user
CMakeCache.txt
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,18 @@ target_sources(hepce_model
#-------------------------------------------------------------------------------
include(${PRIVATE_MODULE_PATH}/MakeDependenciesAvailable.cmake)

find_package(SQLiteCpp REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Boost REQUIRED)


set(private_deps spdlog::spdlog OpenMP::OpenMP_CXX)
if (HEPCE_CALCULATE_COVERAGE)
list(APPEND private_deps gcov)
endif()

target_link_libraries(hepce_model
PUBLIC
Boost::boost
Boost::headers
SQLiteCpp
PRIVATE
${private_deps}
Expand Down
Loading
Loading