You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.7 KiB

  1. name: Doxygen
  2. # Builds and deploys storms doxygen documentation
  3. on:
  4. push:
  5. branches:
  6. - master
  7. # needed to trigger the workflow manually
  8. workflow_dispatch:
  9. env:
  10. BASE_IMG: "movesrwth/carl:ci-release"
  11. STORM_GIT_URL: "${{ github.server_url }}/${{ github.repository }}.git"
  12. STORM_BRANCH: "master"
  13. # github runners currently have two cores
  14. NR_JOBS: "2"
  15. jobs:
  16. deploy:
  17. name: Create documentation
  18. runs-on: ubuntu-latest
  19. steps:
  20. - name: Init Docker
  21. run: sudo docker run -d -it --name storm --privileged ${BASE_IMG}
  22. # We should not do partial updates :/
  23. # but we need to install some dependencies
  24. # Surely we can find a better way to do this at some point
  25. - name: Update base system
  26. run: |
  27. sudo docker exec storm apt-get update
  28. sudo docker exec storm apt-get upgrade -qqy
  29. - name: install dependencies
  30. run: sudo docker exec storm apt-get install -qq -y doxygen graphviz
  31. - name: Git clone storm
  32. run: sudo docker exec storm git clone --depth 1 --branch $STORM_BRANCH $STORM_GIT_URL /opt/storm
  33. - name: Run cmake
  34. run: sudo docker exec storm bash -c "mkdir /opt/storm/build; cd /opt/storm/build; cmake .."
  35. - name: Build doxygen
  36. run: sudo docker exec storm bash -c "cd /opt/storm/build; make doc -j ${NR_JOBS}"
  37. - name: Copy doxygen
  38. run: sudo docker cp storm:/opt/storm/build/doc/html .
  39. - name: Deploy doxygen
  40. uses: peaceiris/actions-gh-pages@v3
  41. with:
  42. deploy_key: ${{ secrets.DOC_DEPLOY_KEY }}
  43. publish_dir: ./html
  44. external_repository: moves-rwth/storm-doc
  45. publish_branch: master
  46. force_orphan: true
  47. notify:
  48. name: Email notification
  49. runs-on: ubuntu-latest
  50. needs: [deploy]
  51. if: always() # set always
  52. steps:
  53. - uses: technote-space/workflow-conclusion-action@v2
  54. - uses: dawidd6/action-send-mail@v2
  55. with:
  56. server_address: ${{ secrets.STORM_CI_MAIL_SERVER }}
  57. server_port: 587
  58. username: ${{ secrets.STORM_CI_MAIL_USERNAME }}
  59. password: ${{ secrets.STORM_CI_MAIL_PASSWORD }}
  60. subject: "[You broke it] Doxygen generation failed for ${{ github.repository }}"
  61. body:
  62. "CI job of ${{ github.repository }} has failed for commit ${{ github.sha }}.\n\
  63. The error type is: ${{ env.WORKFLOW_CONCLUSION }}.\n\n\
  64. For more information, see https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
  65. to: ${{ secrets.STORM_CI_MAIL_RECIPIENTS }}
  66. from: Github Actions <you-broke-it@stormchecker.org>
  67. if: env.WORKFLOW_CONCLUSION != 'success' # notify only if failure