swh:1:snp:a009335c9ad61a15b4ffe398f445dd601942b68c
Raw File
Tip revision: 56a393d6ae4961a5d8fbaa80ffe08cdeb3510de1 authored by Pierre-Yves Strub on 06 May 2022, 06:44:04 UTC
[github-action]: push docker images
Tip revision: 56a393d
ci.yml
name: EasyCrypt compilation & check

on: [push,pull_request]

env:
  HOME: /home/charlie
  OPAMYES: true
  OPAMJOBS: 2

jobs:
  compile:
    name: EasyCrypt compilation
    runs-on: ubuntu-20.04
    container:
      image: easycryptpa/ec-build-box
    steps:
    - uses: actions/checkout@v2
    - name: Update OPAM & EasyCrypt dependencies
      run: |
        opam update
        opam pin add -n easycrypt .
        opam install --deps-only easycrypt
    - name: Compile EasyCrypt
      run: opam config exec -- make

  check:
    name: Check EasyCrypt Libraries
    needs: compile
    runs-on: ubuntu-20.04
    container:
      image: easycryptpa/ec-build-box
    strategy:
      fail-fast: false
      matrix:
        target: [stdlib, examples]
    steps:
    - uses: actions/checkout@v2
    - name: Update OPAM & EasyCrypt dependencies
      run: |
        opam update
        opam pin add -n easycrypt .
        opam install --deps-only easycrypt
    - name: Compile EasyCrypt
      run: opam config exec -- make
    - name: Detect SMT provers
      run: |
        rm -f ~/.why3.conf
        opam config exec -- ./ec.native why3config -why3 ~/.why3.conf
    - name: Compile Library (${{ matrix.target }})
      env:
        TARGET: ${{ matrix.target }}
      run: opam config exec -- make $TARGET
    - uses: actions/upload-artifact@v2
      name: Upload report.log
      if: always()
      with:
        name: report.log (${{ matrix.target }})
        path: report.log
        if-no-files-found: ignore

  notification:
    name: Notification
    needs: [compile, check]
    if: |
      (github.event_name == 'push') ||
      (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
    runs-on: ubuntu-20.04
    steps:
    - uses: technote-space/workflow-conclusion-action@v2
    - uses: zulip/github-actions-zulip/send-message@v1
      with:
        api-key: ${{ secrets.ZULIP_APIKEY }}
        email: ${{ secrets.ZULIP_EMAIL }}
        organization-url: 'https://formosa-crypto.zulipchat.com'
        type: 'stream'
        to: 'GitHub notifications'
        topic: 'EasyCrypt / CI'
        content: |
          **Build status**: ${{ env.WORKFLOW_CONCLUSION }} ${{ env.WORKFLOW_CONCLUSION == 'success' && ':check_mark:' || ':cross_mark:' }}
          **Author**: [${{ github.actor }}](${{ github.server_url }}/${{ github.actor }})
          **Event**: ${{ github.event_name }} on ${{ github.ref }}
          **Commit**: [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
          **Details**: [Build log](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}/checks)
back to top