enable cuda tests #115
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: hpcReactCI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| get_docker_image_tag_hash: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| DOCKER_IMAGE_TAG_HASH: ${{ steps.extract_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }} | |
| steps: | |
| - name: Extract docker image tag hash | |
| id: extract_docker_image_tag_hash | |
| run: | | |
| echo "DOCKER_IMAGE_TAG_HASH=d70ac785bd9f9bd8c85a60026669a5fa861f3842" >> "$GITHUB_OUTPUT" | |
| # code_style: | |
| # needs: [check_pull_request_is_not_a_draft] | |
| # runs-on: ubuntu-24.04 | |
| # steps: | |
| # - name: Checkout Repository | |
| # uses: actions/[email protected] | |
| # with: | |
| # submodules: true | |
| # lfs: false | |
| # - name: Check style | |
| # env: | |
| # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 | |
| # CMAKE_BUILD_TYPE: Release | |
| # BUILD_AND_TEST_ARGS: --test-code-style | |
| # run: ./scripts/ci_build_and_test.sh | |
| doxygen_check: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - get_docker_image_tag_hash | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| lfs: false | |
| - name: Check doxygen | |
| env: | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }} | |
| HOST_CONFIG: hostconfigs/environment.cmake | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Release | |
| BUILD_AND_TEST_ARGS: --test-doxygen | |
| run: ./scripts/ci_build_and_test.sh | |
| code_checks: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - get_docker_image_tag_hash | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| lfs: false | |
| - name: code_checks | |
| env: | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }} | |
| HOST_CONFIG: hostconfigs/environment.cmake | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Release | |
| BUILD_AND_TEST_ARGS: --code-checks | |
| run: ./scripts/ci_build_and_test.sh | |
| linux_builds: | |
| name: ${{matrix.name}} | |
| runs-on: ${{matrix.RUNS_ON}} | |
| needs: | |
| - get_docker_image_tag_hash | |
| strategy: | |
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: ubuntu24-gcc11-dbg (ubuntu-24, gcc 11.4.0, Release) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-gcc | |
| RUNS_ON: ubuntu-24.04 | |
| CMAKE_CXX_COMPILER: /usr/bin/g++ | |
| CMAKE_C_COMPILER: /usr/bin/gcc | |
| CMAKE_BUILD_TYPE: Debug | |
| - name: ubuntu24-gcc11-rel (ubuntu-24, gcc 11.4.0, Release) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-gcc | |
| RUNS_ON: ubuntu-24.04 | |
| CMAKE_CXX_COMPILER: /usr/bin/g++ | |
| CMAKE_C_COMPILER: /usr/bin/gcc | |
| CMAKE_BUILD_TYPE: Release | |
| - name: ubuntu24-clang18-dbg (ubuntu-24, clang-18.0.0, Debug) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-clang | |
| RUNS_ON: ubuntu-24.04 | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Debug | |
| - name: ubuntu24-clang18-rel (ubuntu-24, clang-18.0.0, Release) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-clang | |
| RUNS_ON: ubuntu-24.04 | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Release | |
| - name: ubuntu24-gcc11-cuda11-rel (ubuntu-24, gcc 11.4.0, cuda-12.8.0, Release) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-gcc-cuda12.8 | |
| RUNS_ON: streak2 | |
| CMAKE_CXX_COMPILER: /usr/bin/g++ | |
| CMAKE_C_COMPILER: /usr/bin/gcc | |
| CMAKE_BUILD_TYPE: Release | |
| ENABLE_CUDA: ON | |
| CMAKE_CUDA_ARCHITECTURES: "86" | |
| NPROC: 4 | |
| DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all" | |
| - name: ubuntu24-gcc11-cuda11-dbg (ubuntu-24, gcc 11.4.0, cuda-12.8.0, Debug) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-gcc-cuda12.8 | |
| RUNS_ON: streak2 | |
| CMAKE_CXX_COMPILER: /usr/bin/g++ | |
| CMAKE_C_COMPILER: /usr/bin/gcc | |
| CMAKE_BUILD_TYPE: Debug | |
| ENABLE_CUDA: ON | |
| CMAKE_CUDA_ARCHITECTURES: "86" | |
| NPROC: 4 | |
| DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all" | |
| - name: ubuntu24-clang14-cuda11-rel (ubuntu-24, clang-14.0.0, cuda-12.8.0, Release) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-cuda12.8 | |
| RUNS_ON: streak2 | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Release | |
| ENABLE_CUDA: ON | |
| CMAKE_CUDA_ARCHITECTURES: "86" | |
| NPROC: 4 | |
| DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all" | |
| - name: ubuntu24-clang14-cuda11-dbg (ubuntu-24, clang-14.0.0, cuda-12.8.0, Debug) | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-cuda12.8 | |
| RUNS_ON: streak2 | |
| CMAKE_CXX_COMPILER: /usr/bin/clang++ | |
| CMAKE_C_COMPILER: /usr/bin/clang | |
| CMAKE_BUILD_TYPE: Debug | |
| ENABLE_CUDA: ON | |
| CMAKE_CUDA_ARCHITECTURES: "86" | |
| NPROC: 4 | |
| DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all" | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| lfs: false | |
| - name: Print environment | |
| run: printenv | |
| - name: Build and test | |
| env: | |
| DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }} | |
| CMAKE_CXX_COMPILER: ${{ matrix.CMAKE_CXX_COMPILER }} | |
| CMAKE_C_COMPILER: ${{ matrix.CMAKE_C_COMPILER }} | |
| CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }} | |
| ENABLE_CUDA: ${{ matrix.ENABLE_CUDA }} | |
| CMAKE_CUDA_ARCHITECTURES: ${{ matrix.CMAKE_CUDA_ARCHITECTURES }} | |
| NPROC: ${{ matrix.NPROC }} | |
| BUILD_AND_TEST_ARGS: ${{ matrix.BUILD_AND_TEST_ARGS }} --build-exe | |
| DOCKER_RUN_ARGS: ${{ matrix.DOCKER_RUN_ARGS }} | |
| HOST_CONFIG: hostconfigs/environment.cmake | |
| run: ./scripts/ci_build_and_test.sh | |
| code_coverage: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - get_docker_image_tag_hash | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/[email protected] | |
| with: | |
| submodules: true | |
| lfs: false | |
| - name: run code coverage | |
| env: | |
| DOCKER_REPOSITORY: geosx/ubuntu:24.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }} | |
| HOST_CONFIG: hostconfigs/environment.cmake | |
| CMAKE_CXX_COMPILER: /usr/bin/g++ | |
| CMAKE_C_COMPILER: /usr/bin/gcc | |
| CMAKE_BUILD_TYPE: Debug | |
| BUILD_AND_TEST_ARGS: "--build-exe --code-coverage" | |
| run: ./scripts/ci_build_and_test.sh | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: hpcReact_coverage.info.cleaned | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| check_that_all_jobs_succeeded: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - get_docker_image_tag_hash | |
| - linux_builds | |
| - doxygen_check | |
| - code_checks | |
| if: ${{ always() }} | |
| env: | |
| RETURN_VAL: | | |
| ${{ | |
| needs.linux_builds.result == 'success' && | |
| needs.doxygen_check.result == 'success' && | |
| needs.code_checks.result == 'success' | |
| }} | |
| steps: | |
| - name: PR Success | |
| if: ${{ contains(env.RETURN_VAL, 'true') }} | |
| run: "true" | |
| - name: PR Failure | |
| if: ${{ contains(env.RETURN_VAL, 'false') }} | |
| run: "false" |