azure-pipelines.yml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. variables:
  2. - group: variables-haxe
  3. - name: AZURE_PIPELINES_REPO_URL
  4. value: $(Build.Repository.Uri)
  5. - name: AZURE_PIPELINES_BRANCH
  6. value: $(Build.SourceBranchName)
  7. stages:
  8. - stage: BuildAndTest
  9. jobs:
  10. - job: BuildLinux
  11. pool:
  12. vmImage: 'ubuntu-16.04'
  13. variables:
  14. OPAMYES: 1
  15. ADD_REVISION: 1
  16. steps:
  17. - checkout: self
  18. submodules: recursive
  19. - script: |
  20. set -ex
  21. sudo add-apt-repository ppa:avsm/ppa -y # provides newer version of OCaml and OPAM
  22. sudo apt-get update -qqy
  23. sudo apt-get install -qqy ocaml-nox camlp4-extra opam libpcre3-dev zlib1g-dev libgtk2.0-dev ninja-build
  24. displayName: Install dependencies
  25. - script: |
  26. set -ex
  27. unset MACHINE RELEASE SYSTEM VERSION # https://marc.info/?l=gentoo-commits&m=155026142713994
  28. mkdir $HOME/neko
  29. pushd $HOME/neko
  30. git clone --recursive https://github.com/HaxeFoundation/neko.git .
  31. cmake . -DSTATIC_DEPS=all -G Ninja
  32. ninja download_static_deps || ninja download_static_deps || ninja download_static_deps
  33. ninja
  34. sudo ninja install
  35. popd
  36. displayName: Install Neko
  37. - script: |
  38. set -ex
  39. opam init
  40. opam update
  41. opam pin add haxe . --no-action
  42. opam install haxe --deps-only
  43. opam list
  44. ocamlopt -v
  45. displayName: Install OCaml libraries
  46. - script: |
  47. set -ex
  48. opam config exec -- make -s STATICLINK=1 libs
  49. opam config exec -- make -s STATICLINK=1 prebuild
  50. opam config exec -- make -s -j`nproc` STATICLINK=1 haxe
  51. opam config exec -- make -s haxelib
  52. make -s package_bin
  53. ls -l out
  54. ldd -v ./haxe
  55. ldd -v ./haxelib
  56. displayName: Build Haxe
  57. - task: PublishPipelineArtifact@0
  58. inputs:
  59. artifactName: 'linuxBinaries'
  60. targetPath: out
  61. - script: |
  62. set -ex
  63. make -s xmldoc
  64. cat >extra/doc/info.json <<EOL
  65. {
  66. "commit": "$(Build.SourceVersion)",
  67. "branch": "$(Build.SourceBranchName)"
  68. }
  69. EOL
  70. displayName: Build xmldoc
  71. - task: PublishPipelineArtifact@0
  72. inputs:
  73. artifactName: 'xmldoc'
  74. targetPath: extra/doc
  75. - job: BuildMac
  76. pool:
  77. vmImage: 'macOS-10.13'
  78. variables:
  79. OPAMYES: 1
  80. ADD_REVISION: 1
  81. steps:
  82. - checkout: self
  83. submodules: recursive
  84. - script: |
  85. set -ex
  86. brew update
  87. brew bundle --file=tests/Brewfile --no-upgrade
  88. displayName: Install dependencies
  89. - script: |
  90. set -ex
  91. mkdir $HOME/neko
  92. pushd $HOME/neko
  93. git clone --recursive https://github.com/HaxeFoundation/neko.git .
  94. cmake . -DSTATIC_DEPS=all -G Ninja
  95. ninja download_static_deps || ninja download_static_deps || ninja download_static_deps
  96. ninja -j 4
  97. sudo ninja install
  98. popd
  99. displayName: Install Neko
  100. - script: |
  101. set -ex
  102. opam init
  103. opam update
  104. opam pin add haxe . --no-action
  105. opam install haxe --deps-only
  106. opam list
  107. ocamlopt -v
  108. displayName: Install OCaml libraries
  109. - script: |
  110. set -ex
  111. opam config exec -- make -s STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" libs
  112. opam config exec -- make -s STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" prebuild
  113. opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" haxe
  114. opam config exec -- make -s haxelib
  115. make -s package_bin package_installer_mac
  116. ls -l out
  117. otool -L ./haxe
  118. otool -L ./haxelib
  119. displayName: Build Haxe
  120. - task: PublishPipelineArtifact@0
  121. inputs:
  122. artifactName: 'macBinaries'
  123. targetPath: out
  124. - job: BuildWindows
  125. pool:
  126. vmImage: 'windows-2019'
  127. variables:
  128. OPAMYES: 1
  129. ADD_REVISION: 1
  130. CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
  131. strategy:
  132. matrix:
  133. x64:
  134. ARCH: 64
  135. MINGW_ARCH: x86_64
  136. CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe
  137. CYG_ROOT: C:/cygwin64
  138. x86:
  139. ARCH: 32
  140. MINGW_ARCH: i686
  141. CYGWIN_SETUP: https://cygwin.com/setup-x86.exe
  142. CYG_ROOT: C:/cygwin
  143. steps:
  144. - checkout: self
  145. submodules: recursive
  146. - powershell: |
  147. Set-PSDebug -Trace 1
  148. choco install --no-progress nsis.portable --version 3.02 -y
  149. choco install --no-progress curl wget 7zip.portable -y
  150. displayName: Install dependencies
  151. - powershell: |
  152. Set-PSDebug -Trace 1
  153. choco install --no-progress neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
  154. neko -version
  155. Set-PSDebug -Trace 0
  156. Write-Host "##vso[task.setvariable variable=NEKOPATH]C:/ProgramData/chocolatey/lib/neko"
  157. displayName: Install Neko
  158. - powershell: |
  159. Set-PSDebug -Trace 1
  160. curl.exe -fsSL -o cygwin-setup.exe --retry 3 $(CYGWIN_SETUP)
  161. Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $(CYG_ROOT) -l C:/tmp -s $(CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre-devel -P mingw64-$(MINGW_ARCH)-zlib -P mingw64-$(MINGW_ARCH)-gcc-core -P mingw64-$(MINGW_ARCH)-pcre" -Wait
  162. curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$(ARCH).tar.xz
  163. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"')
  164. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz')
  165. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam$(ARCH)/install.sh')
  166. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw$(ARCH)c --switch 4.07.0+mingw$(ARCH)c --auto-setup --yes 2>&1')
  167. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1')
  168. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1')
  169. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1')
  170. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list')
  171. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v')
  172. displayName: Install OCaml and OCaml libraries
  173. - powershell: Write-Host "##vso[task.prependpath]${env:CYG_ROOT}/usr/$(MINGW_ARCH)-w64-mingw32/sys-root/mingw/bin"
  174. displayName: Expose mingw dll files
  175. - powershell: |
  176. Set-PSDebug -Trace 1
  177. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win libs prebuild 2>&1')
  178. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win -j`nproc` haxe 2>&1')
  179. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win haxelib 2>&1')
  180. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -f Makefile.win echo_package_files package_bin package_installer_win package_choco 2>&1')
  181. dir out
  182. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxe.exe')
  183. & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe')
  184. displayName: Build Haxe
  185. - task: PublishPipelineArtifact@0
  186. inputs:
  187. artifactName: 'win$(ARCH)Binaries'
  188. targetPath: out
  189. - job: TestLinux
  190. dependsOn: BuildLinux
  191. pool:
  192. vmImage: 'ubuntu-16.04'
  193. strategy:
  194. matrix:
  195. macro:
  196. TEST: macro
  197. neko:
  198. TEST: neko
  199. hl:
  200. TEST: hl
  201. APT_PACKAGES: cmake ninja-build
  202. cpp:
  203. TEST: cpp
  204. HXCPP_COMPILE_CACHE: ~/hxcache
  205. APT_PACKAGES: gcc-multilib g++-multilib
  206. java:
  207. TEST: java,jvm
  208. cs:
  209. TEST: cs
  210. js:
  211. TEST: js
  212. SAUCE: 1
  213. SAUCE_TUNNEL_ID: $(Agent.JobName)
  214. SAUCE_BUILD: $(Build.BuildNumber)
  215. php:
  216. TEST: php
  217. flash:
  218. TEST: flash9,as3
  219. APT_PACKAGES: libglib2.0 libfreetype6 xvfb
  220. DISPLAY: ':99.0'
  221. AUDIODEV: 'null'
  222. python:
  223. TEST: python
  224. lua:
  225. TEST: lua
  226. steps:
  227. - script: |
  228. set -ex
  229. sudo add-apt-repository -y ppa:haxe/snapshots
  230. sudo apt-get update -qqy
  231. sudo apt-get install -qqy neko
  232. displayName: Setup Neko
  233. - task: DownloadPipelineArtifact@0
  234. inputs:
  235. artifactName: 'linuxBinaries'
  236. targetPath: linuxBinaries
  237. - script: |
  238. set -ex
  239. tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1
  240. sudo mkdir -p /usr/local/bin/
  241. sudo mkdir -p /usr/local/share/haxe/
  242. sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe
  243. sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib
  244. sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
  245. displayName: Setup Haxe
  246. - script: haxe -version
  247. displayName: Print Haxe version
  248. - script: |
  249. set -ex
  250. mkdir ~/haxelib
  251. haxelib setup ~/haxelib
  252. displayName: Setup haxelib
  253. - script: |
  254. set -ex
  255. sudo apt update -qqy
  256. sudo apt install -qqy $APT_PACKAGES
  257. condition: and(succeeded(), variables['APT_PACKAGES'])
  258. displayName: Install apt packages
  259. - script: haxe RunCi.hxml
  260. workingDirectory: $(Build.SourcesDirectory)/tests
  261. env:
  262. SAUCE_USERNAME: $(SAUCE_USERNAME)
  263. SAUCE_ACCESS_KEY: $(SAUCE_ACCESS_KEY)
  264. displayName: Test
  265. - job: TestMac
  266. dependsOn: BuildMac
  267. pool:
  268. vmImage: 'macOS-10.13'
  269. strategy:
  270. matrix:
  271. macro:
  272. TEST: macro
  273. neko:
  274. TEST: neko
  275. hl:
  276. TEST: hl
  277. BREW_PACKAGES: ninja
  278. cpp:
  279. TEST: cpp
  280. HXCPP_COMPILE_CACHE: ~/hxcache
  281. java:
  282. TEST: java,jvm
  283. cs:
  284. TEST: cs
  285. js:
  286. TEST: js
  287. php:
  288. TEST: php
  289. flash:
  290. TEST: flash9,as3
  291. python:
  292. TEST: python
  293. lua:
  294. TEST: lua
  295. steps:
  296. - script: |
  297. set -ex
  298. brew update
  299. brew install neko --HEAD
  300. displayName: Setup Neko
  301. - task: DownloadPipelineArtifact@0
  302. inputs:
  303. artifactName: 'macBinaries'
  304. targetPath: macBinaries
  305. - script: |
  306. set -ex
  307. tar -xf macBinaries/*_bin.tar.gz -C macBinaries --strip-components=1
  308. sudo mkdir -p /usr/local/bin/
  309. sudo mkdir -p /usr/local/share/haxe/
  310. sudo ln -s `pwd`/macBinaries/haxe /usr/local/bin/haxe
  311. sudo ln -s `pwd`/macBinaries/haxelib /usr/local/bin/haxelib
  312. sudo ln -s `pwd`/macBinaries/std /usr/local/share/haxe/std
  313. displayName: Setup Haxe
  314. - script: haxe -version
  315. displayName: Print Haxe version
  316. - script: |
  317. set -ex
  318. mkdir ~/haxelib
  319. haxelib setup ~/haxelib
  320. displayName: Setup haxelib
  321. - script: brew install $BREW_PACKAGES
  322. condition: and(succeeded(), variables['BREW_PACKAGES'])
  323. displayName: Install homebrew packages
  324. - script: haxe RunCi.hxml
  325. workingDirectory: $(Build.SourcesDirectory)/tests
  326. displayName: Test
  327. - job: TestWindows64
  328. dependsOn: BuildWindows
  329. pool:
  330. vmImage: 'windows-2019'
  331. variables:
  332. HAXELIB_ROOT: C:/haxelib
  333. HAXE_ARCH: 64
  334. strategy:
  335. matrix:
  336. macro:
  337. TEST: macro
  338. neko:
  339. TEST: neko
  340. hl:
  341. TEST: hl
  342. cpp:
  343. TEST: cpp
  344. HXCPP_COMPILE_CACHE: C:/hxcache
  345. java:
  346. TEST: java,jvm
  347. cs:
  348. TEST: cs
  349. js:
  350. TEST: js
  351. # https://github.com/microsoft/azure-pipelines-image-generation/issues/990
  352. # php:
  353. # TEST: php
  354. # TODO. flash has never been enabled on our AppVeyor builds.
  355. # flash:
  356. # TEST: flash9,as3
  357. python:
  358. TEST: python
  359. # TODO. Lua has never been enabled on our AppVeyor builds.
  360. # lua:
  361. # TEST: lua
  362. steps:
  363. - powershell: |
  364. Set-PSDebug -Trace 1
  365. choco install neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
  366. Set-PSDebug -Trace 0
  367. Write-Host "##vso[task.setvariable variable=NEKOPATH]C:/ProgramData/chocolatey/lib/neko"
  368. displayName: Setup Neko
  369. - task: DownloadPipelineArtifact@0
  370. inputs:
  371. artifactName: 'win64Binaries'
  372. targetPath: win64Binaries
  373. - powershell: |
  374. Set-PSDebug -Trace 1
  375. 7z x win64Binaries/*_bin.zip -owin64Binaries
  376. $dir = Get-ChildItem win64Binaries/* -Name -Directory
  377. Rename-Item win64Binaries/$dir haxe
  378. $dir = '' + ( get-location ) + '\win64Binaries\haxe'
  379. dir $dir
  380. Set-PSDebug -Trace 0
  381. Write-Host "##vso[task.prependpath]$dir"
  382. displayName: Setup Haxe
  383. - script: haxe -version
  384. displayName: Print Haxe version
  385. - task: UsePythonVersion@0
  386. inputs:
  387. versionSpec: '3.7'
  388. - powershell: |
  389. Set-PSDebug -Trace 1
  390. $pypath = python -c "import sys; print(sys.executable)"
  391. $py3path = $pypath.replace("python.exe","python3.exe")
  392. cmd /c mklink $py3path $pypath
  393. python3 -V
  394. displayName: "Make Python 3 be available as python3 in the cmdline"
  395. - script: |
  396. mkdir "$(HAXELIB_ROOT)"
  397. haxelib setup "$(HAXELIB_ROOT)"
  398. displayName: Setup haxelib
  399. - script: haxe RunCi.hxml
  400. workingDirectory: $(Build.SourcesDirectory)/tests
  401. displayName: Test
  402. - stage: Deploy
  403. condition: and(succeeded(), not(variables['System.PullRequest.PullRequestId']))
  404. jobs:
  405. - job: S3
  406. condition: and(succeeded(), variables['AWS_ACCESS_KEY_ID'], variables['S3_HXBUILDS_ADDR'])
  407. pool:
  408. vmImage: 'ubuntu-16.04'
  409. steps:
  410. - task: DownloadPipelineArtifact@0
  411. inputs:
  412. artifactName: 'linuxBinaries'
  413. targetPath: linuxBinaries
  414. - task: DownloadPipelineArtifact@0
  415. inputs:
  416. artifactName: 'macBinaries'
  417. targetPath: macBinaries
  418. - task: DownloadPipelineArtifact@0
  419. inputs:
  420. artifactName: 'win64Binaries'
  421. targetPath: win64Binaries
  422. - task: DownloadPipelineArtifact@0
  423. inputs:
  424. artifactName: 'win32Binaries'
  425. targetPath: win32Binaries
  426. - script: |
  427. set -ex
  428. sudo add-apt-repository -y ppa:haxe/snapshots
  429. sudo apt-get update -qqy
  430. sudo apt-get install -qqy neko
  431. displayName: Setup Neko
  432. - script: |
  433. set -ex
  434. tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1
  435. sudo mkdir -p /usr/local/bin/
  436. sudo mkdir -p /usr/local/share/haxe/
  437. sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe
  438. sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib
  439. sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
  440. displayName: Setup Haxe
  441. - script: |
  442. set -ex
  443. sudo apt-get update -qqy
  444. sudo apt-get install -qqy awscli
  445. displayName: "Install awscli"
  446. - script: |
  447. set -ex
  448. aws s3 cp linuxBinaries/*_bin.tar.gz $(S3_HXBUILDS_ADDR)/linux64/ --dryrun
  449. aws s3 cp macBinaries/*_bin.tar.gz $(S3_HXBUILDS_ADDR)/mac/ --dryrun
  450. aws s3 cp win64Binaries/*_bin.zip $(S3_HXBUILDS_ADDR)/windows64/ --dryrun
  451. aws s3 cp win64Binaries/*_installer.zip $(S3_HXBUILDS_ADDR)/windows64-installer/ --dryrun
  452. aws s3 cp win32Binaries/*_bin.zip $(S3_HXBUILDS_ADDR)/windows/ --dryrun
  453. aws s3 cp win32Binaries/*_installer.zip $(S3_HXBUILDS_ADDR)/windows-installer/ --dryrun
  454. env:
  455. AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
  456. displayName: Upload binaries
  457. - script: |
  458. set -ex
  459. aws s3 cp linuxBinaries/*_bin.tar.gz $(S3_HXBUILDS_ADDR)/linux64/haxe_latest.tar.gz --dryrun
  460. aws s3 cp macBinaries/*_bin.tar.gz $(S3_HXBUILDS_ADDR)/mac/haxe_latest.tar.gz --dryrun
  461. aws s3 cp win64Binaries/*_bin.zip $(S3_HXBUILDS_ADDR)/windows64/haxe_latest.zip --dryrun
  462. aws s3 cp win64Binaries/*_installer.zip $(S3_HXBUILDS_ADDR)/windows64-installer/haxe_latest.zip --dryrun
  463. aws s3 cp win32Binaries/*_bin.zip $(S3_HXBUILDS_ADDR)/windows/haxe_latest.zip --dryrun
  464. aws s3 cp win32Binaries/*_installer.zip $(S3_HXBUILDS_ADDR)/windows-installer/haxe_latest.zip --dryrun
  465. env:
  466. AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
  467. condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'development'))
  468. displayName: Update "latest"
  469. - script: |
  470. set -ex
  471. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/linux64
  472. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/linux64/ --dryrun
  473. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/mac
  474. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/mac/ --dryrun
  475. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/windows64
  476. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/windows64/ --dryrun
  477. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/windows64-installer
  478. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/windows64-installer/ --dryrun
  479. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/windows
  480. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/windows/ --dryrun
  481. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)/windows-installer
  482. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/windows-installer/ --dryrun
  483. haxe --run runci.Indexer $(S3_HXBUILDS_ADDR)
  484. aws s3 cp index.html $(S3_HXBUILDS_ADDR)/ --dryrun
  485. workingDirectory: $(Build.SourcesDirectory)/tests
  486. env:
  487. AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
  488. displayName: Update indices
  489. - job: ApiHaxeOrg
  490. condition: and(succeeded(), variables['GHP_USERNAME'], variables['GHP_EMAIL'])
  491. pool:
  492. vmImage: 'ubuntu-16.04'
  493. steps:
  494. - checkout: none
  495. - script: |
  496. set -ex
  497. sudo add-apt-repository -y ppa:haxe/snapshots
  498. sudo apt-get update -qqy
  499. sudo apt-get install -qqy neko
  500. displayName: Setup Neko
  501. - task: DownloadPipelineArtifact@0
  502. inputs:
  503. artifactName: 'linuxBinaries'
  504. targetPath: linuxBinaries
  505. - script: |
  506. set -ex
  507. tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1
  508. sudo mkdir -p /usr/local/bin/
  509. sudo mkdir -p /usr/local/share/haxe/
  510. sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe
  511. sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib
  512. sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
  513. displayName: Setup Haxe
  514. - task: DownloadPipelineArtifact@0
  515. inputs:
  516. artifactName: 'xmldoc'
  517. targetPath: xmldoc
  518. - script: |
  519. set -ex
  520. LOCAL="`pwd`/extra/api.haxe.org"
  521. git clone "${GHP_REMOTE}" "${LOCAL}"
  522. haxe --cwd "${LOCAL}" --run ImportXml "`pwd`/xmldoc"
  523. env:
  524. GHP_REMOTE: $(GHP_REMOTE)
  525. displayName: Deploy to api.haxe.org