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

tests.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
  1. #
  2. # Run full tests
  3. #
  4. name: Tests
  5. on:
  6. # pull_request:
  7. push:
  8. branches:
  9. - master
  10. - 6.[0-9]+
  11. paths:
  12. - 'src/**'
  13. - 'test/**'
  14. - 'share/**'
  15. - 'doc/examples/**'
  16. - 'doc/scripts/**'
  17. - '.github/workflows/**'
  18. - 'ci/**'
  19. defaults:
  20. run:
  21. # default to use bash shell
  22. shell: bash
  23. jobs:
  24. test:
  25. name: ${{ matrix.name }}
  26. runs-on: ${{ matrix.os }}
  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. # Run full tests
  34. BUILD_DOCS : false
  35. PACKAGE : false
  36. RUN_TESTS : true
  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. env:
  66. EXCLUDE_OPTIONAL: ${{ matrix.EXCLUDE_OPTIONAL }}
  67. - name: Cache GSHHG and DCW data
  68. uses: actions/cache@v2
  69. id: cache-coastline
  70. with:
  71. path: ${{ env.COASTLINEDIR }}
  72. key: coastline-${{ hashFiles('ci/download-coastlines.sh') }}
  73. - name: Download coastlines
  74. run: bash ci/download-coastlines.sh
  75. if: steps.cache-coastline.outputs.cache-hit != 'true'
  76. - name: Configure GMT
  77. run: |
  78. if [ "$RUNNER_OS" != "Windows" ]; then
  79. bash ci/config-gmt-unix.sh
  80. else
  81. bash ci/config-gmt-windows.sh
  82. fi
  83. - name: Compile GMT (Linux/macOS)
  84. run: |
  85. mkdir build
  86. cd build
  87. cmake -G Ninja ..
  88. cmake --build .
  89. if: runner.os != 'Windows'
  90. - name: Compile GMT (Windows)
  91. shell: cmd
  92. run: |
  93. mkdir build
  94. cd build
  95. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  96. cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
  97. cmake --build .
  98. if: runner.os == 'Windows'
  99. - name: Download cached GMT remote data from GitHub Artifacts
  100. uses: dawidd6/action-download-artifact@v2.15.0
  101. with:
  102. workflow: ci-caches.yml
  103. name: gmt-cache
  104. path: .gmt
  105. # Move downloaded files to ~/.gmt directory and list them
  106. - name: Move and list downloaded remote files
  107. run: |
  108. mkdir -p ~/.gmt
  109. mv .gmt/* ~/.gmt
  110. ls -lRh ~/.gmt
  111. - name: Install GMT
  112. run: |
  113. cd build
  114. cmake --build . --target install
  115. # Add GMT PATH to bin
  116. echo "${INSTALLDIR}/bin" >> $GITHUB_PATH
  117. - name: Check a few simple commands
  118. run: bash ci/simple-gmt-tests.sh
  119. - name: Check a few simple commands (Windows)
  120. shell: cmd
  121. run: call ci/simple-gmt-tests.bat
  122. if: runner.os == 'Windows'
  123. # Run full tests and rerun failed tests
  124. - name: Run full tests
  125. run: |
  126. set -x -e
  127. cd build
  128. # Disable MinGW's path conversion, see #1035.
  129. if [ "$RUNNER_OS" == "Windows" ]; then export MSYS_NO_PATHCONV=1; fi
  130. # Run tests
  131. ctest ${CTEST_ARGS} || ctest ${CTEST_ARGS} --rerun-failed || ctest ${CTEST_ARGS} --rerun-failed
  132. # show the slowest tests
  133. sort -k3nr Testing/Temporary/CTestCostData.txt > /tmp/cost.txt
  134. head -n 30 /tmp/cost.txt | awk 'NF==3 {printf("%50-s %d %5.1f\n", $1, $2, $3)}'
  135. env:
  136. CTEST_ARGS : "--output-on-failure --force-new-ctest-process -j4 --timeout 480"
  137. - name: Run DOS batch examples (Windows)
  138. shell: cmd
  139. run: |
  140. cd doc/examples
  141. call do_examples.bat
  142. if: runner.os == 'Windows'
  143. - name: Upload build directory if failed
  144. uses: actions/upload-artifact@v2
  145. with:
  146. name: BuildDirectory-${{ runner.os }}
  147. path: build/
  148. if: failure()
  149. - name: Upload test coverage
  150. run: bash <(curl -s https://codecov.io/bash)
  151. if: ${{ always() }}
Tip!

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

Comments

Loading...