build-linux.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. parameters:
  2. name: 'BuildLinux'
  3. vmImage: 'ubuntu-16.04'
  4. jobs:
  5. - job: ${{ parameters.name }}
  6. pool:
  7. vmImage: ${{ parameters.vmImage }}
  8. variables:
  9. OPAMYES: 1
  10. ADD_REVISION: 1
  11. steps:
  12. - checkout: self
  13. submodules: recursive
  14. - script: |
  15. set -ex
  16. sudo add-apt-repository ppa:avsm/ppa -y # provides newer version of OCaml and OPAM
  17. sudo apt-get update -qqy
  18. sudo apt-get install -qqy ocaml-nox camlp5 opam libpcre3-dev zlib1g-dev libgtk2.0-dev ninja-build
  19. curl -sSL -o "$(Agent.TempDirectory)/libuv-1.31.0.tar.gz" --retry 3 https://github.com/libuv/libuv/archive/v1.31.0.tar.gz
  20. tar -xf $(Agent.TempDirectory)/libuv-1.31.0.tar.gz -C $(Agent.TempDirectory)
  21. pushd $(Agent.TempDirectory)/libuv-1.31.0
  22. sh autogen.sh
  23. ./configure
  24. make
  25. sudo make install
  26. popd
  27. displayName: Install dependencies
  28. - template: install-neko-snapshot.yaml
  29. parameters:
  30. platform: linux64
  31. - script: |
  32. set -ex
  33. opam init
  34. opam update
  35. opam pin add haxe . --no-action
  36. opam install haxe --deps-only
  37. opam list
  38. ocamlopt -v
  39. displayName: Install OCaml libraries
  40. - script: |
  41. set -ex
  42. opam config exec -- make -s -j`nproc` STATICLINK=1 haxe
  43. opam config exec -- make -s haxelib
  44. make -s package_bin
  45. ls -l out
  46. ldd -v ./haxe
  47. ldd -v ./haxelib
  48. displayName: Build Haxe
  49. - task: PublishPipelineArtifact@0
  50. inputs:
  51. artifactName: 'linuxBinaries'
  52. targetPath: out