|
53 | 53 | strategy: |
54 | 54 | fail-fast: false |
55 | 55 | matrix: |
56 | | - os: [ubuntu-latest, macos-latest] |
57 | | - # os: [ubuntu-latest, macos-latest, windows-latest] |
| 56 | + os: [ubuntu-latest, macos-latest, windows-latest] |
58 | 57 | # Is it a draft Pull Request (true or false)? |
59 | 58 | isDraft: |
60 | 59 | - ${{ github.event.pull_request.draft }} |
@@ -136,10 +135,27 @@ jobs: |
136 | 135 | python -m pip install dist/* |
137 | 136 |
|
138 | 137 | - name: Build the HTML documentation |
139 | | - run: make -C doc clean html |
| 138 | + run: | |
| 139 | + log_file="${RUNNER_TEMP}/sphinx-html.log" |
| 140 | + make -C doc clean html 2>&1 | tee "${log_file}" |
| 141 | + exit_code=${PIPESTATUS[0]} |
| 142 | + if [[ "${RUNNER_OS}" == "Windows" && "${exit_code}" -eq 2 ]] && grep -q "make: .* Error 2816" "${log_file}"; then |
| 143 | + echo "Sphinx HTML build exited with make error 2816 (segmentation fault) on Windows; allowing workflow to continue." |
| 144 | + exit 0 |
| 145 | + fi |
| 146 | + exit "${exit_code}" |
140 | 147 |
|
141 | 148 | - name: Build the PDF documentation |
142 | | - run: make -C doc pdf |
| 149 | + run: | |
| 150 | + log_file="${RUNNER_TEMP}/sphinx-latex.log" |
| 151 | + make -C doc latex 2>&1 | tee "${log_file}" |
| 152 | + exit_code=${PIPESTATUS[0]} |
| 153 | + if [[ "${RUNNER_OS}" == "Windows" && "${exit_code}" -eq 2 ]] && grep -q "make: .* Error 2816" "${log_file}"; then |
| 154 | + echo "Sphinx LaTeX build exited with make error 2816 (segmentation fault) on Windows; continuing to PDF compilation." |
| 155 | + elif [[ "${exit_code}" -ne 0 ]]; then |
| 156 | + exit "${exit_code}" |
| 157 | + fi |
| 158 | + tectonic -X compile doc/_build/latex/pygmt.tex |
143 | 159 |
|
144 | 160 | - name: Create the HTML ZIP archive and rename the PDF file |
145 | 161 | run: | |
|
0 commit comments