Add Script to automate bisect testing #310
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CEFI-MOM6-CI Workflow | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| # Build mom6sis2 (debug mode) | |
| build_mom6sis2_debug: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/noaa-gfdl/cefi-regional-mom6/1d_mom6_cobalt:base | |
| options: --user=builder | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Ensure full history to prevent detached HEAD issues | |
| ref: ${{ github.event.pull_request.head.ref || github.ref_name }} # Handle fork and same-repo branches | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} # Use forked repo if available | |
| submodules: recursive | |
| - name: Build mom6sis2 | |
| working-directory: ./builds | |
| run: | | |
| echo "Building mom6sis2 in debug mode..." | |
| ./linux-build.bash -m docker -p linux-gnu -t debug -f mom6sis2 | |
| - name: Upload mom6sis2 executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mom6sis2_debug | |
| path: ./builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 | |
| # Trigger 1D-cobalt test workflow AFTER build_mom6sis2_debug completes successfully | |
| run-1d-cobalt-workflow: | |
| needs: build_mom6sis2_debug # Ensure dependency | |
| uses: ./.github/workflows/ci-test-mom6-cobalt.yaml | |
| # Trigger dumbbell workflow AFTER build_mom6sis2_debug completes successfully | |
| run-dumbbell-workflow: | |
| needs: build_mom6sis2_debug # Ensure dependency | |
| uses: ./.github/workflows/ci-test-mom6-dumbbell.yaml | |
| # Build mom6solo (repro mode) simultaneously | |
| build_mom6solo_repro: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/noaa-gfdl/cefi-regional-mom6/1d_mom6_cobalt:base | |
| options: --user=builder | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Ensure full history to prevent detached HEAD issues | |
| ref: ${{ github.event.pull_request.head.ref || github.ref_name }} # Handle fork and same-repo branches | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} # Use forked repo if available | |
| submodules: recursive | |
| - name: Build mom6solo | |
| working-directory: ./builds | |
| run: | | |
| echo "Building mom6solo in repro mode..." | |
| ./linux-build.bash -m docker -p linux-gnu -t repro -f mom6solo | |
| - name: Upload mom6solo executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mom6solo_repro | |
| path: ./builds/build/docker-linux-gnu/ocean_only/repro/MOM6 | |
| # Trigger 2D-tide test workflow AFTER build_mom6sis2_debug completes successfully | |
| run-2d-tide-workflow: | |
| needs: build_mom6solo_repro # Ensure dependency | |
| uses: ./.github/workflows/ci-test-mom6-tide.yaml |