Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

azure-pipelines-linux.yml 4.1 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
  1. # Template for Linux steps in Azure Pipelines
  2. steps:
  3. - bash: bash ci/install-dependencies-linux.sh
  4. displayName: Install GMT dependencies
  5. - bash: |
  6. echo "##vso[task.prependpath]${HOME}/.local/bin"
  7. displayName: Add sphinx to PATH
  8. condition: eq(variables['BUILD_DOCS'], true)
  9. - bash: |
  10. echo "##vso[task.setvariable variable=INSTALLDIR]$BUILD_SOURCESDIRECTORY/gmt-install-dir"
  11. echo "##vso[task.setvariable variable=COASTLINEDIR]$BUILD_SOURCESDIRECTORY/coastline"
  12. displayName: Set install location and coastline location
  13. - bash: echo "##vso[task.prependpath]$INSTALLDIR/bin"
  14. displayName: Set PATH
  15. - task: Cache@2
  16. inputs:
  17. key: coastline | ci/download-coastlines.sh
  18. path: $(COASTLINEDIR)
  19. cacheHitVar: CACHE_COASTLINE_RESTORED
  20. displayName: Cache GSHHG and DCW data
  21. - bash: ci/download-coastlines.sh
  22. displayName: Download coastlines
  23. condition: ne(variables['CACHE_COASTLINE_RESTORED'], true)
  24. - bash: ci/config-gmt-unix.sh
  25. displayName: Configure GMT
  26. - bash: |
  27. mkdir -p build
  28. cd build
  29. cmake -G Ninja ..
  30. cmake --build .
  31. displayName: Compile GMT
  32. # Cache the ${HOME}/.gmt directory, for docs and testing
  33. - task: Cache@2
  34. inputs:
  35. key: cachedata | 20200820-3
  36. path: $(HOME)/.gmt
  37. cacheHitVar: CACHE_CACHEDATA_RESTORED
  38. displayName: Cache GMT remote data for testing
  39. - bash: |
  40. set -x -e
  41. cd build
  42. cmake --build . --target docs_depends
  43. cmake --build . --target optimize_images
  44. cmake --build . --target animation
  45. cmake --build . --target docs_html
  46. # if html.log isn't empty (i.e., sphinx raise warnings), return 1
  47. ! [ -s doc/rst/html.log ]
  48. cmake --build . --target docs_man
  49. # if man.log isn't empty (i.e., sphinx raise warnings), return 1
  50. ! [ -s doc/rst/man.log ]
  51. displayName: Build documentations
  52. condition: eq(variables['BUILD_DOCS'], true)
  53. - bash: |
  54. cd build
  55. cmake --build . --target install
  56. displayName: Install GMT
  57. - bash: |
  58. set -x -e
  59. gmt --version
  60. gmt-config --all
  61. gmt defaults -Vd
  62. gmt pscoast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -P -Vd > test.ps
  63. gmt begin && gmt coast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -Vd && gmt end
  64. gmt grdimage @earth_relief_01d -JH10c -Baf -pdf map
  65. gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd
  66. displayName: Check a few simple commands
  67. # Download remote files, if not already cached [Linux agents always fail]
  68. - bash: |
  69. set -x -e
  70. exit 1
  71. displayName: Download remote data
  72. condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)
  73. # Run the full tests, and rerun failed tests
  74. - bash: |
  75. set -x -e
  76. cd build
  77. ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed || ctest ${CTEST_ARGS} --rerun-failed
  78. displayName: Full tests
  79. env:
  80. CTEST_ARGS: "--output-on-failure --force-new-ctest-process -j4 --timeout 480"
  81. condition: eq(variables['RUN_TESTS'], true)
  82. # Publish the whole build directory for debugging purpose
  83. - task: CopyFiles@2
  84. inputs:
  85. contents: 'build/**/*'
  86. targetFolder: $(Build.ArtifactStagingDirectory)
  87. condition: failed()
  88. - task: PublishBuildArtifacts@1
  89. inputs:
  90. pathToPublish: $(Build.ArtifactStagingDirectory)
  91. artifactName: BuildDirectory-Linux
  92. displayName: Publish build directory
  93. condition: failed()
  94. # Upload test coverage even if build fails. Keep separate to make sure this task fails
  95. # if the tests fail.
  96. - bash: |
  97. set -x -e
  98. bash <(curl -s https://codecov.io/bash)
  99. env:
  100. CODECOV_TOKEN: $(codecov.token)
  101. condition: and(eq(variables['RUN_TESTS'], true), succeededOrFailed())
  102. displayName: Upload test coverage
  103. - bash: bash ci/deploy-gh-pages.sh
  104. displayName: Deploy documentations
  105. env:
  106. HTML_BUILDDIR: "build/doc/rst/html"
  107. GITHUB_TOKEN: $(github.token)
  108. # only deploy if on master and 6.0 branches
  109. condition: and(eq(variables['DEPLOY_DOCS'], true), in(variables['Build.SourceBranchName'], 'master', '6.1', '6.2', '6.3', '6.4', '6.5'))
  110. - bash: |
  111. set -x -e
  112. cd build
  113. cmake --build . --target gmt_release
  114. cmake --build . --target gmt_release_tar
  115. shasum -a 256 gmt-*.tar.gz gmt-*.tar.xz
  116. displayName: Package GMT
  117. condition: eq(variables['PACKAGE'], true)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...