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-mac.yml 4.8 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
  1. # Template for macOS steps in Azure Pipelines
  2. steps:
  3. - bash: bash ci/install-dependencies-macos.sh
  4. displayName: Install GMT dependencies
  5. - bash: echo "##vso[task.prependpath]$HOME/Library/Python/3.8/bin"
  6. displayName: Add sphinx to PATH
  7. condition: eq(variables['BUILD_DOCS'], true)
  8. - bash: |
  9. echo "##vso[task.setvariable variable=INSTALLDIR]$BUILD_SOURCESDIRECTORY/gmt-install-dir"
  10. echo "##vso[task.setvariable variable=COASTLINEDIR]$BUILD_SOURCESDIRECTORY/coastline"
  11. displayName: Set install location and coastline location
  12. - bash: echo "##vso[task.prependpath]$INSTALLDIR/bin"
  13. displayName: Set PATH
  14. - task: Cache@2
  15. inputs:
  16. key: coastline | ci/download-coastlines.sh
  17. path: $(COASTLINEDIR)
  18. cacheHitVar: CACHE_COASTLINE_RESTORED
  19. displayName: Cache GSHHG and DCW data
  20. - bash: ci/download-coastlines.sh
  21. displayName: Download coastlines
  22. condition: ne(variables['CACHE_COASTLINE_RESTORED'], true)
  23. - bash: ci/config-gmt-unix.sh
  24. displayName: Configure GMT
  25. - bash: |
  26. mkdir -p build
  27. cd build
  28. cmake -G Ninja ..
  29. cmake --build .
  30. displayName: Compile GMT
  31. # Cache the ${HOME}/.gmt directory, for docs and testing
  32. - task: Cache@2
  33. inputs:
  34. key: cachedata | 20200820-3
  35. path: $(HOME)/.gmt
  36. cacheHitVar: CACHE_CACHEDATA_RESTORED
  37. displayName: Cache GMT remote data for testing
  38. - bash: |
  39. set -x -e
  40. cd build
  41. cmake --build . --target docs_depends
  42. cmake --build . --target optimize_images
  43. cmake --build . --target animation
  44. cmake --build . --target docs_html
  45. # if html.log isn't empty (i.e., sphinx raise warnings), return 1
  46. ! [ -s doc/rst/html.log ]
  47. cmake --build . --target docs_man
  48. # if man.log isn't empty (i.e., sphinx raise warnings), return 1
  49. ! [ -s doc/rst/man.log ]
  50. displayName: Build documentations
  51. condition: eq(variables['BUILD_DOCS'], true)
  52. - bash: |
  53. cd build
  54. cmake --build . --target install
  55. displayName: Install GMT
  56. - bash: |
  57. set -x -e
  58. gmt --version
  59. gmt-config --all
  60. gmt defaults -Vd
  61. gmt pscoast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -P -Vd > test.ps
  62. gmt begin && gmt coast -R0/10/0/10 -JM6i -Ba -Ggray -ENG+p1p,blue -Vd && gmt end
  63. gmt grdimage @earth_relief_01d -JH10c -Baf -pdf map
  64. gmt earthtide -T2018-06-18T12:00:00 -Gsolid_tide_up.grd
  65. displayName: Check a few simple commands
  66. # Download remote files, if not already cached
  67. - bash: |
  68. set -x -e
  69. # list of datasets used in tests
  70. data="@earth_relief_01d \
  71. @earth_relief_30m \
  72. @earth_relief_20m \
  73. @earth_relief_15m \
  74. @earth_relief_10m @earth_relief_10m_g \
  75. @earth_relief_06m \
  76. @earth_relief_05m @earth_relief_05m_g \
  77. @earth_relief_04m \
  78. @earth_relief_02m
  79. @earth_relief_01m \
  80. @earth_day_01d \
  81. @earth_day_20m \
  82. @earth_night_20m \
  83. @earth_age_06m \
  84. @earth_mask_05m"
  85. # Download remote data and cache files
  86. # download remote data multiple times to make sure all are downloaded
  87. gmt which -Ga $data
  88. gmt which -Ga $data
  89. gmt which -Ga $data
  90. gmt get -Dcache
  91. displayName: Download remote data
  92. condition: ne(variables['CACHE_CACHEDATA_RESTORED'], true)
  93. # Run the full tests, and rerun failed tests
  94. - bash: |
  95. set -x -e
  96. cd build
  97. ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed
  98. displayName: Full tests
  99. env:
  100. CTEST_ARGS: "--output-on-failure --force-new-ctest-process -j4 --timeout 360"
  101. condition: eq(variables['RUN_TESTS'], true)
  102. # Publish the whole build directory for debugging purpose
  103. - task: CopyFiles@2
  104. inputs:
  105. contents: 'build/**/*'
  106. targetFolder: $(Build.ArtifactStagingDirectory)
  107. condition: failed()
  108. - task: PublishBuildArtifacts@1
  109. inputs:
  110. pathToPublish: $(Build.ArtifactStagingDirectory)
  111. artifactName: BuildDirectory-macOS
  112. displayName: Publish build directory
  113. condition: failed()
  114. # Upload test coverage even if build fails. Keep separate to make sure this task fails
  115. # if the tests fail.
  116. - bash: |
  117. set -x -e
  118. bash <(curl -s https://codecov.io/bash)
  119. env:
  120. CODECOV_TOKEN: $(codecov.token)
  121. condition: and(eq(variables['RUN_TESTS'], true), succeededOrFailed())
  122. displayName: Upload test coverage
  123. - bash: |
  124. set -x -e
  125. cd build
  126. cmake --build . --target gmt_release
  127. cmake --build . --target gmt_release_tar
  128. cpack -G Bundle
  129. shasum -a 256 gmt-*.tar.gz gmt-*.tar.xz gmt-*.dmg
  130. displayName: Package GMT
  131. condition: eq(variables['PACKAGE'], true)
  132. # Publish the macOS bundle
  133. - bash: |
  134. cp build/gmt-*.dmg ${BUILD_ARTIFACTSTAGINGDIRECTORY}/gmt-${BUILD_SOURCEBRANCHNAME}-$(date +%Y%m%d)-nightly.dmg
  135. displayName: Copy macOS bundle
  136. condition: eq(variables['PACKAGE'], true)
  137. - publish: $(Build.ArtifactStagingDirectory)/
  138. artifact: GMT-macOS-bundle
  139. displayName: Publish macOS Bundle
  140. condition: eq(variables['PACKAGE'], true)
Tip!

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

Comments

Loading...