doc: adding dispersal example for graph construction and edges initialization #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Get Apt packages | |
run: > | |
sudo apt-get update -y && | |
sudo apt-get install -y --no-install-recommends | |
vim | |
git | |
gcc-13 | |
g++-13 | |
build-essential | |
cmake | |
unzip | |
tar | |
ca-certificates | |
doxygen | |
graphviz | |
python3-pip | |
- name: Conan installation | |
run: pip install conan==2.0.13 | |
- name: Conan version | |
run: echo "${{ steps.conan.outputs.version }}" | |
# - name: Conan profile configuration | |
# run: | | |
# conan profile detect --name profile | |
# conan profile update settings.compiler="gcc" profile | |
# conan profile update settings.build_type="Release" profile | |
# conan profile update settings.compiler.version=12 profile | |
# conan profile update settings.compiler.cppstd=20 profile | |
# conan profile update settings.compiler.libcxx="libstdc++11" profile | |
# conan profile update env.CC=[/usr/bin/gcc-12] profile | |
# conan profile update env.CXX=[/usr/bin/g++-12] profile | |
- name: Conan install dependencies | |
run: > | |
conan install conanfile.py --profile:build=conan/profiles/linux-x86-gcc12-debug --profile:host=conan/profiles/linux-x86-gcc12-debug --build=missing --output-folder=build | |
- name: CMake configuration | |
run: > | |
cmake | |
-B ${{github.workspace}}/build | |
-S . | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
-DBUILD_TESTS=ON | |
--toolchain ${{github.workspace}}/build/conan_toolchain.cmake | |
- name: CMake build | |
run: > | |
cmake | |
--build ${{github.workspace}}/build | |
--config ${{env.BUILD_TYPE}} | |
- name: CMake test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure | |
- name: Doxygen documentation generation | |
working-directory: ${{github.workspace}}/build | |
run: make docs | |
# - name: Moving Files | |
# run: | | |
# mv ${{github.workspace}}/build/docs/html ./docs/api | |
- name: Deploy to Github Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{github.workspace}}/build/docs/html |