Main workflow #309
This file contains hidden or 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: Main workflow | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| # Prime the caches every Monday | |
| - cron: 0 1 * * MON | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: coq-community/docker-coq-action@v1 | |
| with: | |
| custom_image: "rocq/rocq-prover:9.0.1-ocaml-4.14.2-flambda" | |
| before_install: | | |
| startGroup "Workaround permission issue" | |
| sudo chown -R rocq:rocq . /usr/local | |
| endGroup | |
| # https://github.com/coq-community/docker-coq-action#permissions | |
| install: | | |
| startGroup "Install coq2html" | |
| git clone https://github.com/xavierleroy/coq2html | |
| cd coq2html | |
| make | |
| make install | |
| cd - | |
| rm -rf coq2html | |
| endGroup | |
| # requires opam install coq-serapi, | |
| # not available for rocq 9 yet | |
| #startGroup "Install Alectryon" | |
| # sudo apt-get update | |
| # sudo apt-get install -y pipx python3-pip | |
| # pipx install alectryon | |
| #endGroup | |
| startGroup "Install Graphviz" | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz | |
| endGroup | |
| script: | | |
| startGroup "Build project" | |
| make | |
| make docs | |
| #make alectryon | |
| endGroup | |
| # why does this take so long? | |
| - name: Revert permissions | |
| # to avoid a warning at cleanup time | |
| if: ${{ always() }} | |
| run: | | |
| # sudo chown -R 1001:116 . /usr/local | |
| sudo chown -R 1001:116 . | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs | |
| force_orphan: true |