|
| 1 | +name: Build Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize, reopened] |
| 6 | + # Do not run if the only files changed cannot affect the build |
| 7 | + paths-ignore: |
| 8 | + - "**.md" |
| 9 | + - "**.pro" |
| 10 | + - "**.sh" |
| 11 | + - "**.perl" |
| 12 | + - ".github/CODEOWNERS" |
| 13 | + - ".circleci/config.yml" |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 18 | + |
| 19 | +jobs: |
| 20 | + build_ldas_ifort: |
| 21 | + name: Build GEOSldas with ifort |
| 22 | + if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')" |
| 23 | + runs-on: ubuntu-24.04 |
| 24 | + container: |
| 25 | + image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.13-ifort_2021.13 |
| 26 | + |
| 27 | + env: |
| 28 | + OMPI_ALLOW_RUN_AS_ROOT: 1 |
| 29 | + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 |
| 30 | + OMPI_MCA_btl_vader_single_copy_mechanism: none |
| 31 | + |
| 32 | + steps: |
| 33 | + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 |
| 34 | + - name: Delete huge unnecessary tools folder |
| 35 | + run: rm -rf /opt/hostedtoolcache |
| 36 | + |
| 37 | + - name: Checkout LDAS |
| 38 | + uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + fetch-depth: 1 |
| 41 | + filter: blob:none |
| 42 | + repository: GEOS-ESM/GEOSldas |
| 43 | + |
| 44 | + - name: Set all directories as git safe |
| 45 | + run: | |
| 46 | + git config --global --add safe.directory '*' |
| 47 | +
|
| 48 | + - name: Versions etc. |
| 49 | + run: | |
| 50 | + ifort --version |
| 51 | + mpirun --version |
| 52 | + echo $BASEDIR |
| 53 | +
|
| 54 | + - name: Mepo clone external repos |
| 55 | + run: | |
| 56 | + mepo clone --partial blobless |
| 57 | + mepo status |
| 58 | +
|
| 59 | + - name: Update other branches |
| 60 | + if: |
| 61 | + "!contains('refs/heads/main,refs/heads/develop', github.ref)" |
| 62 | + run: | |
| 63 | + mepo checkout-if-exists ${GITHUB_HEAD_REF} |
| 64 | + mepo status |
| 65 | +
|
| 66 | + - name: CMake |
| 67 | + run: | |
| 68 | + cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF |
| 69 | +
|
| 70 | + - name: Build |
| 71 | + run: | |
| 72 | + cmake --build build -j 4 |
| 73 | + cmake --install build |
| 74 | +
|
| 75 | +
|
| 76 | + build_ldas_gfortran: |
| 77 | + name: Build GEOSldas with gfortran |
| 78 | + if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')" |
| 79 | + runs-on: ubuntu-24.04 |
| 80 | + container: |
| 81 | + image: gmao/ubuntu24-geos-env-mkl:v7.32.0-openmpi_5.0.5-gcc_14.2.0 |
| 82 | + |
| 83 | + env: |
| 84 | + OMPI_ALLOW_RUN_AS_ROOT: 1 |
| 85 | + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 |
| 86 | + OMPI_MCA_btl_vader_single_copy_mechanism: none |
| 87 | + |
| 88 | + steps: |
| 89 | + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 |
| 90 | + - name: Delete huge unnecessary tools folder |
| 91 | + run: rm -rf /opt/hostedtoolcache |
| 92 | + |
| 93 | + - name: Checkout LDAS |
| 94 | + uses: actions/checkout@v4 |
| 95 | + with: |
| 96 | + fetch-depth: 1 |
| 97 | + filter: blob:none |
| 98 | + repository: GEOS-ESM/GEOSldas |
| 99 | + |
| 100 | + - name: Set all directories as git safe |
| 101 | + run: | |
| 102 | + git config --global --add safe.directory '*' |
| 103 | +
|
| 104 | + - name: Versions etc. |
| 105 | + run: | |
| 106 | + gfortran --version |
| 107 | + mpirun --version |
| 108 | + echo $BASEDIR |
| 109 | +
|
| 110 | + - name: Mepo clone external repos |
| 111 | + run: | |
| 112 | + mepo clone --partial blobless |
| 113 | + mepo status |
| 114 | +
|
| 115 | + - name: Update other branches |
| 116 | + if: |
| 117 | + "!contains('refs/heads/main,refs/heads/develop', github.ref)" |
| 118 | + run: | |
| 119 | + mepo checkout-if-exists ${GITHUB_HEAD_REF} |
| 120 | + mepo status |
| 121 | +
|
| 122 | + - name: CMake |
| 123 | + run: | |
| 124 | + cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF |
| 125 | +
|
| 126 | + - name: Build |
| 127 | + run: | |
| 128 | + cmake --build build -j 4 |
| 129 | + cmake --install build |
0 commit comments