CI #338
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
# run once a month (on the 3rd) | |
- cron: "5 6 3 * *" | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
coq_version: "8.20" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: coq-community/docker-coq-action@v1 | |
with: | |
opam_file: "seplogic-demo.opam" | |
coq_version: ${{ env.coq_version }} | |
before_script: | | |
sudo chown -R coq:coq . # workaround a permission issue | |
install: | | |
startGroup Install dependencies | |
sudo apt-get update | |
sudo apt-get install -y python3 pipx | |
opam install -y coq-serapi | |
pipx install git+https://github.com/cpitclaudel/alectryon.git | |
pipx ensurepath | |
endGroup | |
startGroup Add Iris repo | |
opam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git | |
endGroup | |
startGroup Print opam config | |
opam config list; opam repo list; opam list | |
endGroup | |
startGroup Build dependencies | |
opam pin add -n -y -k path $PACKAGE $WORKDIR | |
opam update -y | |
opam install -y -j 2 $PACKAGE --deps-only | |
endGroup | |
script: | | |
startGroup Build | |
make -k all | |
endGroup | |
startGroup Alectryon docs | |
make -k doc | |
endGroup | |
# skip uninstall since we need docs/ for upload | |
uninstall: "" | |
- name: Revert permissions | |
if: ${{ always() }} | |
run: sudo chown -R 1001:116 . | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
path: ./docs | |
# Deployment job | |
deploy: | |
needs: build | |
environment: | |
name: "github-pages" | |
url: ${{ steps.deployment.outputs.page_url }} | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |