|
74 | 74 | shell: bash |
75 | 75 | run: bash .github/scripts/misc_setup |
76 | 76 |
|
77 | | - - name: Install LLVM Flang |
| 77 | + - name: Install LLVM Flang on non-Windows; treat timeout as SUCCESS (exit 0), which may happen on macos-intel. |
| 78 | + if: runner.os != 'Windows' |
| 79 | + uses: equipez/run-bash-command@v2 |
| 80 | + with: |
| 81 | + timelimit: 320m |
| 82 | + command: | |
| 83 | + bash .github/scripts/install_llvm \ |
| 84 | + || { echo "Warning: LLVM Flang installation failed!!" >&2; exit 0; } |
| 85 | + - name: Install LLVM Flang on Windows |
| 86 | + if: runner.os == 'Windows' |
78 | 87 | shell: bash |
79 | 88 | run: | |
80 | 89 | bash .github/scripts/install_llvm \ |
@@ -143,6 +152,18 @@ jobs: |
143 | 152 | fi |
144 | 153 | ########################################################################################## |
145 | 154 |
|
| 155 | + # On macos-intel, the installation of LLVM Flang with Homebrew may fail. If so and if the |
| 156 | + # current day is not divisible by 3, then we skip the test. |
| 157 | + if ! type flang >/dev/null 2>&1 ; then |
| 158 | + if [[ ${{ runner.os }} == macOS && ${{ runner.arch }} == X64 && $(( $(date +%-d) % 3 )) -ne 0 ]] ; then |
| 159 | + echo "Warning: flang not found!! Skipping the test." >&2 |
| 160 | + exit 0 |
| 161 | + else |
| 162 | + echo "Error: flang not found!! Skipping the test." >&2 |
| 163 | + exit 1 |
| 164 | + fi |
| 165 | + fi |
| 166 | +
|
146 | 167 | export FFLAGS=${{ matrix.fflags }} |
147 | 168 | export TESTDIM=${{ matrix.testdim }} |
148 | 169 | IK=i$(( 2**(1 + $(date +%-d) % 3) )) |
@@ -175,5 +196,3 @@ jobs: |
175 | 196 | if: always() # Always run even if the workflow is canceled manually or due to overtime. |
176 | 197 | shell: bash # Important; otherwise, `rm -rf` will not work on Windows. |
177 | 198 | run: rm -rf ${{ env.TEST_DIR }} |
178 | | - |
179 | | - |
|
0 commit comments