Update ci.yml #15
Workflow file for this run
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: Coq CI & Coqdoc Deploy | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up OCaml and OPAM | |
| uses: ocaml/setup-ocaml@v2 | |
| with: | |
| ocaml-compiler: 4.14.0 | |
| - name: Prepare OPAM and install dependencies | |
| run: | | |
| opam switch create vlsm-ci 4.14.0 | |
| eval $(opam env) | |
| opam repo add coq-released https://coq.inria.fr/opam/released | |
| opam update | |
| opam install -y \ | |
| coq.8.18.0 \ | |
| coq-stdpp.1.9.0 \ | |
| coq-itauto \ | |
| coq-equations \ | |
| coq-vlsm.1.3 | |
| - name: Build Coq project | |
| run: | | |
| eval $(opam env) | |
| make | |
| - name: Generate Coqdoc | |
| run: | | |
| eval $(opam env) | |
| mkdir -p doc | |
| coqdoc -utf8 -html -d doc -R src VLSM_SC src/*.v | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coqdoc-html | |
| path: doc/ | |
| deploy: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Download built documentation | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coqdoc-html | |
| path: doc/ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./doc |