|
98 | 98 | - name: Clone |
99 | 99 | uses: actions/checkout@v4 |
100 | 100 |
|
| 101 | + - name: Restore Build Cache |
| 102 | + uses: actions/cache@v4 |
| 103 | + with: |
| 104 | + path: build |
| 105 | + key: mfc-build-${{ matrix.os }}-${{ matrix.mpi }}-${{ matrix.debug }}-${{ matrix.precision }}-${{ matrix.intel }}-${{ hashFiles('CMakeLists.txt', 'toolchain/dependencies/**', 'toolchain/cmake/**', 'src/**/*.fpp', 'src/**/*.f90') }} |
| 106 | + |
101 | 107 | - name: Setup MacOS |
102 | 108 | if: matrix.os == 'macos' |
103 | 109 | run: | |
@@ -131,32 +137,20 @@ jobs: |
131 | 137 | printenv | sort > /tmp/env_after |
132 | 138 | diff /tmp/env_before /tmp/env_after | grep '^>' | sed 's/^> //' >> $GITHUB_ENV |
133 | 139 |
|
134 | | - - name: Get system info for cache key |
135 | | - id: sys-info |
136 | | - run: | |
137 | | - { |
138 | | - uname -m |
139 | | - cat /proc/cpuinfo 2>/dev/null | grep 'model name' | head -1 || sysctl -n machdep.cpu.brand_string 2>/dev/null || true |
140 | | - if command -v ifx &>/dev/null; then ifx --version 2>/dev/null | head -1; else ${FC:-gfortran} --version 2>/dev/null | head -1 || true; fi |
141 | | - ${CC:-gcc} --version 2>/dev/null | head -1 || true |
142 | | - } | (sha256sum 2>/dev/null || shasum -a 256) | cut -c1-16 > /tmp/sys-hash |
143 | | - echo "sys-hash=$(cat /tmp/sys-hash)" >> "$GITHUB_OUTPUT" |
144 | | -
|
145 | | - - name: Restore Build Cache |
146 | | - uses: actions/cache@v4 |
| 140 | + - name: Set up Python 3.14 |
| 141 | + uses: actions/setup-python@v5 |
147 | 142 | with: |
148 | | - path: build |
149 | | - key: mfc-build-${{ matrix.os }}-${{ matrix.mpi }}-${{ matrix.debug }}-${{ matrix.precision }}-${{ matrix.intel }}-${{ steps.sys-info.outputs.sys-hash }}-${{ hashFiles('CMakeLists.txt', 'toolchain/dependencies/**', 'toolchain/cmake/**', 'src/**/*.fpp', 'src/**/*.f90') }} |
| 143 | + python-version: '3.14' |
150 | 144 |
|
151 | 145 | - name: Build |
152 | 146 | run: | |
153 | | - /bin/bash mfc.sh test -v --dry-run -j "$(nproc)" --${{ matrix.debug }} --${{ matrix.mpi }} $PRECISION $TEST_ALL |
| 147 | + /bin/bash mfc.sh test -v --dry-run -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} --${{ matrix.precision }} $TEST_ALL |
154 | 148 | env: |
155 | 149 | TEST_ALL: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} |
156 | | - PRECISION: ${{ matrix.precision != '' && format('--{0}', matrix.precision) || '' }} |
157 | 150 |
|
158 | 151 | - name: Test |
159 | | - run: bash .github/scripts/run-tests-with-retry.sh -v --max-attempts 3 -j "$(nproc)" $TEST_ALL $TEST_PCT |
| 152 | + run: | |
| 153 | + /bin/bash mfc.sh test -v --max-attempts 3 -j $(nproc) $TEST_ALL $TEST_PCT |
160 | 154 | env: |
161 | 155 | TEST_ALL: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} |
162 | 156 | TEST_PCT: ${{ matrix.debug == 'debug' && '-% 20' || '' }} |
@@ -186,7 +180,7 @@ jobs: |
186 | 180 | cluster_name: 'Georgia Tech | Phoenix' |
187 | 181 | device: 'cpu' |
188 | 182 | interface: 'none' |
189 | | - # Frontier (ORNL) — build on login node, GPU tests sharded for batch partition |
| 183 | + # Frontier (ORNL) — CCE |
190 | 184 | - runner: 'frontier' |
191 | 185 | cluster: 'frontier' |
192 | 186 | cluster_name: 'Oak Ridge | Frontier' |
@@ -243,21 +237,30 @@ jobs: |
243 | 237 | - name: Clone |
244 | 238 | uses: actions/checkout@v4 |
245 | 239 | with: |
246 | | - clean: false |
| 240 | + clean: true |
247 | 241 |
|
248 | 242 | - name: Build |
249 | 243 | if: matrix.cluster != 'phoenix' |
250 | 244 | uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 |
251 | 245 | with: |
252 | | - max_attempts: 3 |
| 246 | + max_attempts: 2 |
253 | 247 | retry_wait_seconds: 60 |
254 | 248 | timeout_minutes: 60 |
255 | 249 | command: bash .github/workflows/${{ matrix.cluster }}/build.sh ${{ matrix.device }} ${{ matrix.interface }} |
256 | | - on_retry_command: ./mfc.sh clean |
| 250 | + on_retry_command: rm -rf build |
257 | 251 |
|
258 | 252 | - name: Test |
259 | 253 | run: bash .github/workflows/${{ matrix.cluster }}/submit.sh .github/workflows/${{ matrix.cluster }}/test.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.shard }} |
260 | 254 |
|
| 255 | + - name: Cancel SLURM Jobs |
| 256 | + if: cancelled() |
| 257 | + run: | |
| 258 | + find . -name "*.slurm_job_id" | while read -r f; do |
| 259 | + job_id=$(cat "$f") |
| 260 | + echo "Cancelling SLURM job $job_id" |
| 261 | + scancel "$job_id" 2>/dev/null || true |
| 262 | + done |
| 263 | +
|
261 | 264 | - name: Compute Log Slug |
262 | 265 | if: always() |
263 | 266 | id: log |
@@ -321,25 +324,28 @@ jobs: |
321 | 324 | - name: Clone |
322 | 325 | uses: actions/checkout@v4 |
323 | 326 | with: |
324 | | - clean: false |
| 327 | + clean: true |
325 | 328 |
|
326 | 329 | - name: Pre-Build (SLURM) |
327 | 330 | if: matrix.cluster == 'phoenix' |
328 | 331 | run: bash .github/workflows/phoenix/submit.sh .github/scripts/prebuild-case-optimization.sh ${{ matrix.device }} ${{ matrix.interface }} |
329 | 332 |
|
330 | 333 | - name: Pre-Build (login node) |
331 | 334 | if: matrix.cluster != 'phoenix' |
332 | | - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 |
333 | | - with: |
334 | | - max_attempts: 3 |
335 | | - retry_wait_seconds: 60 |
336 | | - timeout_minutes: 120 |
337 | | - command: bash .github/scripts/prebuild-case-optimization.sh ${{ matrix.cluster }} ${{ matrix.device }} ${{ matrix.interface }} |
338 | | - on_retry_command: ./mfc.sh clean |
| 335 | + run: bash .github/scripts/prebuild-case-optimization.sh ${{ matrix.cluster }} ${{ matrix.device }} ${{ matrix.interface }} |
339 | 336 |
|
340 | 337 | - name: Run Case-Optimization Tests |
341 | 338 | run: bash .github/workflows/${{ matrix.cluster }}/submit.sh .github/scripts/run_case_optimization.sh ${{ matrix.device }} ${{ matrix.interface }} |
342 | 339 |
|
| 340 | + - name: Cancel SLURM Jobs |
| 341 | + if: cancelled() |
| 342 | + run: | |
| 343 | + find . -name "*.slurm_job_id" | while read -r f; do |
| 344 | + job_id=$(cat "$f") |
| 345 | + echo "Cancelling SLURM job $job_id" |
| 346 | + scancel "$job_id" 2>/dev/null || true |
| 347 | + done |
| 348 | +
|
343 | 349 | - name: Print Logs |
344 | 350 | if: always() |
345 | 351 | run: | |
|
0 commit comments