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

docs.yml 4.9 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
  1. #
  2. # Build GMT documentation and deploy
  3. #
  4. name: Docs
  5. on:
  6. # pull_request:
  7. push:
  8. branches:
  9. - master
  10. - 6.[0-9]+
  11. paths:
  12. - 'doc/**'
  13. - '.github/workflows/**'
  14. - 'ci/**'
  15. release:
  16. types:
  17. - published
  18. defaults:
  19. run:
  20. # default to use bash shell
  21. shell: bash
  22. jobs:
  23. docs:
  24. name: ${{ matrix.name }}
  25. runs-on: ${{ matrix.os }}
  26. timeout-minutes: 45
  27. env:
  28. # directories
  29. COASTLINEDIR: ${{ github.workspace }}/coastline
  30. INSTALLDIR: ${{ github.workspace }}/gmt-install-dir
  31. # disable auto-display of GMT plots
  32. GMT_END_SHOW: off
  33. # Build documentation
  34. BUILD_DOCS : true
  35. PACKAGE : true
  36. RUN_TESTS : false
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. include:
  41. - name: Linux
  42. os: ubuntu-latest
  43. - name: macOS
  44. os: macos-latest
  45. - name: Windows
  46. os: windows-latest
  47. steps:
  48. - name: Cancel Previous Runs
  49. uses: styfle/cancel-workflow-action@0.9.1
  50. - name: Checkout
  51. uses: actions/checkout@v2
  52. - name: Setup vcpkg (Windows)
  53. uses: dawidd6/action-download-artifact@v2.15.0
  54. with:
  55. workflow: ci-caches.yml
  56. name: vcpkg-cache
  57. path: C:\vcpkg\installed\
  58. if: runner.os == 'Windows'
  59. - name: Install GMT dependencies
  60. run: |
  61. # $RUNNER_OS can be Linux, macOS or Windows
  62. # The following command converts $RUNNER_OS to lowercase
  63. os=$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]')
  64. bash ci/install-dependencies-${os}.sh
  65. - name: Cache GSHHG and DCW data
  66. uses: actions/cache@v2
  67. id: cache-coastline
  68. with:
  69. path: ${{ env.COASTLINEDIR }}
  70. key: coastline-${{ hashFiles('ci/download-coastlines.sh') }}
  71. - name: Download coastlines
  72. run: bash ci/download-coastlines.sh
  73. if: steps.cache-coastline.outputs.cache-hit != 'true'
  74. - name: Configure GMT
  75. run: |
  76. if [ "$RUNNER_OS" != "Windows" ]; then
  77. bash ci/config-gmt-unix.sh
  78. else
  79. bash ci/config-gmt-windows.sh
  80. fi
  81. - name: Compile GMT (Linux/macOS)
  82. run: |
  83. mkdir build
  84. cd build
  85. cmake -G Ninja ..
  86. cmake --build .
  87. if: runner.os != 'Windows'
  88. - name: Compile GMT (Windows)
  89. shell: cmd
  90. run: |
  91. mkdir build
  92. cd build
  93. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  94. cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
  95. cmake --build .
  96. if: runner.os == 'Windows'
  97. - name: Download cached GMT remote data from GitHub Artifacts
  98. uses: dawidd6/action-download-artifact@v2.15.0
  99. with:
  100. workflow: ci-caches.yml
  101. name: gmt-cache
  102. path: .gmt
  103. # Move downloaded files to ~/.gmt directory and list them
  104. - name: Move and list downloaded remote files
  105. run: |
  106. mkdir -p ~/.gmt
  107. mv .gmt/* ~/.gmt
  108. ls -lRh ~/.gmt
  109. - name: Build documentation
  110. run: |
  111. set -x -e
  112. cd build
  113. cmake --build . --target docs_depends
  114. cmake --build . --target optimize_images
  115. if [ "$RUNNER_OS" != "Windows" ]; then
  116. cmake --build . --target animation
  117. fi
  118. cmake --build . --target docs_html
  119. # if html.log isn't empty (i.e., sphinx raise warnings), return 1
  120. ! [ -s doc/rst/html.log ]
  121. cmake --build . --target docs_man
  122. - name: Install GMT
  123. run: |
  124. cd build
  125. cmake --build . --target install
  126. # Add GMT PATH to bin
  127. echo "${INSTALLDIR}/bin" >> $GITHUB_PATH
  128. - name: Checkout the gh-pages branch in a separate folder
  129. uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b
  130. with:
  131. ref: gh-pages
  132. # Checkout to this folder instead of the current one
  133. path: deploy
  134. # Download the entire history
  135. fetch-depth: 0
  136. if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
  137. - name: Deploy documentation to GitHub
  138. run: bash ci/deploy-gh-pages.sh
  139. if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
  140. - name: Package GMT
  141. run: |
  142. set -x -e
  143. cd build
  144. cmake --build . --target gmt_release
  145. cmake --build . --target gmt_release_tar
  146. if [ "$RUNNER_OS" = "macOS" ]; then
  147. # Create macOS bundle
  148. cpack -G Bundle
  149. elif [ "$RUNNER_OS" = "Windows" ]; then
  150. # Don't use cpack here. Chocolatey also provides a cpack command.
  151. cmake --build . --target package
  152. fi
Tip!

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

Comments

Loading...