Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 33 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,40 @@ jobs:
actions: write
contents: read
steps:
# 1. Check out your code
- uses: actions/checkout@v4
# # 2. Install dependencies (if using vcpkg, Conan, etc.)
# - name: Install dependencies
# run: sudo apt update && sudo apt install -y cmake g++ make
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build --parallel
- run: ctest --test-dir build --output-on-failure --verbose --no-compress-output

docs:
name: Generate and Deploy Docs
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4

- name: Install Doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen

# Runs on every push and PR to verify Doxygen doesn't crash
- name: Generate Documentation
run: doxygen Doxyfile

# Only upload the artifact if merging into main
- name: Upload GitHub Pages Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: './docs/html'

# Only deploy the site if merging into main
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ build/
# debug information files
*.dwo

lattice_files/expand.pals.yaml
lattice_files/expand.pals.yaml
docs/html/
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,31 @@ enable_testing()
include(FetchContent)

FetchContent_Declare(
yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG yaml-cpp-0.9.0
rapidyaml
GIT_REPOSITORY https://github.com/biojppm/rapidyaml.git
GIT_TAG v0.11.1
GIT_SHALLOW FALSE
)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.2
)

FetchContent_MakeAvailable(yaml-cpp)
FetchContent_MakeAvailable(rapidyaml)
FetchContent_MakeAvailable(Catch2)

add_subdirectory(tests)

file(COPY ${CMAKE_SOURCE_DIR}/lattice_files/
DESTINATION ${CMAKE_BINARY_DIR}/lattice_files/)

add_library(yaml_c_wrapper SHARED src/yaml_c_wrapper.cpp)
target_link_libraries(yaml_c_wrapper PUBLIC yaml-cpp)
target_link_libraries(yaml_c_wrapper PUBLIC ryml)

add_executable(example_rw examples/example_rw.cpp)
target_link_libraries(example_rw yaml_c_wrapper yaml-cpp)
target_link_libraries(example_rw yaml_c_wrapper ryml)

add_executable(get_lattices src/get_lattices.cpp)
target_link_libraries(get_lattices yaml_c_wrapper yaml-cpp)
target_link_libraries(get_lattices yaml_c_wrapper ryml)
Loading