Codebase list coq / e7236048-92ea-4cdf-8ac0-eb3875e0aff8/main azure-pipelines.yml
e7236048-92ea-4cdf-8ac0-eb3875e0aff8/main

Tree @e7236048-92ea-4cdf-8ac0-eb3875e0aff8/main (Download .tar.gz)

azure-pipelines.yml @e7236048-92ea-4cdf-8ac0-eb3875e0aff8/mainraw · history · blame

# NB: image names can be found at
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted

variables:
  NJOBS: "2"

jobs:
- job: Windows
  pool:
    vmImage: 'vs2017-win2016'

  # Equivalent to allow_failure: true
  # continueOnError: true

  steps:
  - checkout: self
    fetchDepth: 10

  # cygwin package list not checked for minimality
  - script: |
      powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'setup-x86_64.exe')"
      SET CYGROOT=C:\cygwin64
      SET CYGCACHE=%CYGROOT%\var\cache\setup
      setup-x86_64.exe -qnNdO -R %CYGROOT% -l %CYGCACHE% -s %CYGMIRROR% -P rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P time -P wget -P curl -P git -P mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pkg-config,mingw64-x86_64-windows_default_manifest -P mingw64-x86_64-headers,mingw64-x86_64-runtime,mingw64-x86_64-pthreads,mingw64-x86_64-zlib -P python3

      SET TARGET_ARCH=x86_64-w64-mingw32
      SET CD_MFMT=%cd:\=/%
      SET RESULT_INSTALLDIR_CFMT=%CD_MFMT:C:/=/cygdrive/c/%
      C:\cygwin64\bin\bash -l %cd%\dev\build\windows\configure_profile.sh
    displayName: 'Install cygwin'
    env:
      CYGMIRROR: "http://mirror.cs.vt.edu/pub/cygwin/cygwin"

  - script: C:\cygwin64\bin\bash -l %cd%\dev\ci\azure-opam.sh
    displayName: 'Install opam'

  - script: C:\cygwin64\bin\bash -l %cd%\dev\ci\azure-build.sh
    displayName: 'Build Coq'

  # We are hitting a bug where Dune is rebuilding Coq to run the
  # test-suite, also it seems to time out, so we just build for now
  #
  # - script: C:\cygwin64\bin\bash -l %cd%\dev\ci\azure-test.sh
  #   displayName: 'Test Coq'

  - publish: _build/log
    artifact: Dune Build Log
    condition: always()

- job: macOS
  pool:
    vmImage: 'macOS-10.14'

  variables:
    MACOSX_DEPLOYMENT_TARGET: '10.11'

  steps:

  - checkout: self
    fetchDepth: 10

  - script: |
      set -e
      brew update
      (cd $(brew --repository)/Library/Taps/homebrew/homebrew-core/ && git fetch --shallow-since=${HBCORE_DATE} && git checkout ${HBCORE_REF})
      brew install gnu-time opam pkg-config gtksourceview3 adwaita-icon-theme || true
      # || true: workaround #12657, see also #12672 and commit message for this line
      pip3 install macpack
    displayName: 'Install system dependencies'
    env:
      HOMEBREW_NO_AUTO_UPDATE: "1"
      HBCORE_DATE: "2019-09-03"
      HBCORE_REF: "44ee64cf4b9f2d2bf000758d356db0c77425e42e"

  - script: |
      set -e
      export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
      opam init -a -j "$NJOBS" --compiler=ocaml-variants.$COMPILER
      opam switch set ocaml-variants.$COMPILER
      eval $(opam env)
      opam update
      opam install -j "$NJOBS" num ocamlfind${FINDLIB_VER} ounit lablgtk3-sourceview3
      opam list
    displayName: 'Install OCaml dependencies'
    env:
      COMPILER: "4.07.1+flambda"
      FINDLIB_VER: ".1.8.1"
      OPAMYES: "true"

  - script: |
      set -e

      eval $(opam env)
      ./configure -prefix '$(Build.BinariesDirectory)' -warn-error yes -native-compiler no -coqide opt
      make -j "$NJOBS" byte
      make -j "$NJOBS"
    displayName: 'Build Coq'

  - script: |
      eval $(opam env)
      export OCAMLPATH=$(pwd):"$OCAMLPATH"
      make -j "$NJOBS" test-suite PRINT_LOGS=1
    displayName: 'Run Coq Test Suite'

  - script: |
      make install
    displayName: 'Install Coq'

  - script: |
      set -e
      eval $(opam env)
      export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
      ./dev/build/osx/make-macos-dmg.sh
      mv _build/*.dmg "$(Build.ArtifactStagingDirectory)/"
    displayName: 'Create the dmg bundle'
    env:
      OUTDIR: '$(Build.BinariesDirectory)'

  - task: PublishBuildArtifacts@1
    inputs:
      pathtoPublish: '$(Build.ArtifactStagingDirectory)'
      artifactName: coq-macOS-installer