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.

77 lines
2.9 KiB

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