# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc

trigger:
- master
- to-publish

pool:
  vmImage: 'ubuntu-24.04'

steps:
  - script: |
      bash -c "sudo apt-get update && sudo apt-get install libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-thread-dev libsodium-dev libntl-dev python3-gmpy2 python3-networkx"
  - script: |
      make setup
  - script:
      echo USE_NTL=1 >> CONFIG.mine
  - script:
      echo MY_CFLAGS += -DFEWER_PRIMES >> CONFIG.mine
  - script:
      echo MY_CFLAGS += -DFEWER_RINGS >> CONFIG.mine
  - script:
      echo MY_CFLAGS += -DCOMP_SEC=10 >> CONFIG.mine
  - script:
      echo CXX = clang++ >> CONFIG.mine
  - script:
      make replicated-{ring,field}-party.x rep4-ring-party.x shamir mascot-party.x sy spdz2k-party.x semi-he yao semi2k-party.x semi-party.x dealer-ring-party.x cowgear-party.x chaigear-party.x fd
  - script:
      Scripts/setup-ssl.sh 4
  - script:
      skip_binary=1 slim=1 Scripts/test_tutorial.sh -X
