diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index 6461bd9c63327243eb85428ac64dcacf9fd28005..71fcbb3c4c94fabe3eaecbfc74defd4186d5a61c 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -1,6 +1,10 @@ name: linux-eic-shell -on: [push, pull_request] +on: + push: + pull_request: + schedule: + - cron: '41 4 * * 0' jobs: build-test: @@ -18,9 +22,56 @@ jobs: - uses: actions/upload-artifact@v3 with: name: build-eic-shell + path: build/ + if-no-files-found: error + - uses: actions/upload-artifact@v3 + with: + name: install-eic-shell path: install/ if-no-files-found: error + build-docs: + runs-on: ubuntu-latest + needs: build-test + container: alpine:latest + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v3 + with: + name: build-eic-shell + path: build/ + - run: | + apk add doxygen graphviz + doxygen build/Doxyfile + - uses: actions/upload-artifact@v3 + with: + name: docs-eic-shell + path: build/docs/html/ + if-no-files-found: error + - run: | + apk add bash + # FIXME tracking https://github.com/actions/upload-pages-artifact/pull/14 + - uses: actions/upload-pages-artifact@v1 + if: github.ref == 'refs/heads/master' + with: + path: build/docs/html/ + retention-days: 7 + + deploy-docs: + needs: build-docs + if: github.ref == 'refs/heads/master' + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 + trigger-juggler: runs-on: ubuntu-latest needs: build-test diff --git a/.github/workflows/linux-lcg.yml b/.github/workflows/linux-lcg.yml deleted file mode 100644 index 74c87d3f122dbe4381a3022270530f78491409b1..0000000000000000000000000000000000000000 --- a/.github/workflows/linux-lcg.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: linux-lcg - -on: - push: - branches: - - master - -jobs: - build-lcg-docs: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - LCG: ["LCG_101/x86_64-ubuntu2004-gcc9-opt"] - steps: - - uses: actions/checkout@v3 - - uses: cvmfs-contrib/github-action-cvmfs@v2 - with: - cvmfs_repositories: 'sft.cern.ch,geant4.cern.ch' - - uses: aidasoft/run-lcg-view@v1 - with: - release-platform: ${{ matrix.LCG }} - run: | - PREFIX=${PWD}/install - cmake -B build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} - cmake --build build -- install - cmake --build build -- docs - - uses: actions/upload-artifact@v3 - with: - name: build-lcg-docs - path: build/docs/html/ - if-no-files-found: error diff --git a/CMakeLists.txt b/CMakeLists.txt index 75a36b406054b0f03a0e54ec644c17fab731b24e..302b11186222ba93c19cfb52b563aa7f05d13c00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,14 +68,17 @@ install(FILES # ------------------------- # install class documentation +cmake_path(RELATIVE_PATH CMAKE_CURRENT_BINARY_DIR + OUTPUT_VARIABLE CMAKE_CURRENT_BINARY_RELATIVE_DIR) +configure_file( + ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY) + find_package(Doxygen COMPONENTS dot) if(DOXYGEN_FOUND) - configure_file( - ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in - ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - @ONLY) add_custom_target(docs ALL - COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM) diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 571d0aea07fe961a2192fcf23358f7c2b775d740..aa7ebee0ee1fb26a31a0cdd0bb4edf4f83c9b376 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -58,7 +58,7 @@ PROJECT_BRIEF = "EIC data model" # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/docs +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_RELATIVE_DIR@/docs # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -865,9 +865,9 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = README.md \ - @CMAKE_CURRENT_BINARY_DIR@/src \ - @CMAKE_CURRENT_BINARY_DIR@/eicd \ - @CMAKE_CURRENT_BINARY_DIR@/utils + @CMAKE_CURRENT_BINARY_RELATIVE_DIR@/src \ + @CMAKE_CURRENT_BINARY_RELATIVE_DIR@/eicd \ + @CMAKE_CURRENT_BINARY_RELATIVE_DIR@/utils # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses