.gitlab-ci.yml 7.36 KB
Newer Older
1 2 3 4
variables:
  REGISTRY: registry.gitlab.com/frontistr-commons/frontistr

image: ${REGISTRY}/build:latest
5 6 7 8

stages:
    - build
    - test
Yu IHARA's avatar
Yu IHARA committed
9
    - build_for_deploy
10 11
    - deploy

12
make_serial:
13 14
    stage: build
    script:
15 16
        - cmake -Bbuild_serial -DWITH_MPI=OFF -DWITH_OPENMP=OFF -DWITH_ML=OFF -DWITH_MUMPS=OFF -H.
        - cmake --build build_serial -- -j $(nproc)
17 18
    artifacts:
        paths:
19
            - build_serial/
20 21
        expire_in: 100min

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
make_openmp:
    stage: build
    script:
        - cmake -Bbuild_openmp -DWITH_MPI=OFF -DWITH_OPENMP=ON -DWITH_ML=OFF -DWITH_MUMPS=OFF -H.
        - cmake --build build_openmp -- -j $(nproc)
    artifacts:
        paths:
            - build_openmp/
        expire_in: 100min
make_mpi:
    stage: build
    script:
        - cmake -Bbuild_mpi -DWITH_MPI=ON -DWITH_OPENMP=OFF -H.
        - cmake --build build_mpi -- -j $(nproc)
    artifacts:
        paths:
            - build_mpi/
        expire_in: 100min
make_hybrid:
    stage: build
    script:
        - cmake -Bbuild_hybrid -DWITH_MPI=ON -DWITH_OPENMP=ON -H.
        - cmake --build build_hybrid -- -j $(nproc)
    artifacts:
        paths:
            - build_hybrid/
        expire_in: 100min

Yu IHARA's avatar
Yu IHARA committed
50
.test:
51
    stage: test
Yu IHARA's avatar
Yu IHARA committed
52 53 54 55 56 57 58 59
    artifacts:
        paths:
            - run_test
        expire_in: 1week
        when: on_failure
test_serial:
    extends: .test
    needs: ["make_serial"]
60
    dependencies:
61
        - make_serial
62
    script:
63 64 65
        - cd build_serial
        - ctest -L serial --output-on-failure
test_openmp:
Yu IHARA's avatar
Yu IHARA committed
66 67
    extends: .test
    needs: ["make_openmp"]
68
    dependencies:
69
        - make_openmp
70
    script:
71
        - cd build_openmp
Yu IHARA's avatar
Yu IHARA committed
72
        - ctest -L serial --output-on-failure
73 74
        - ctest -L openmp --output-on-failure
test_mpi:
Yu IHARA's avatar
Yu IHARA committed
75 76
    extends: .test
    needs: ["make_mpi"]
77 78 79 80
    dependencies:
        - make_mpi
    script:
        - cd build_mpi
Yu IHARA's avatar
Yu IHARA committed
81 82
        - ctest -L serial --output-on-failure
        - ctest -L mpi    --output-on-failure
83
test_hybrid:
Yu IHARA's avatar
Yu IHARA committed
84 85
    extends: .test
    needs: ["make_hybrid"]
86 87 88 89
    dependencies:
        - make_hybrid
    script:
        - cd build_hybrid
Yu IHARA's avatar
Yu IHARA committed
90 91 92
        - ctest -L serial --output-on-failure
        - ctest -L openmp --output-on-failure
        - ctest -L mpi    --output-on-failure
93
        - ctest -L hybrid --output-on-failure
94
document:
95
    image: ${REGISTRY}/document:latest
Yu IHARA's avatar
Yu IHARA committed
96 97
    stage: build_for_deploy
    needs: []
98
    script:
Yu IHARA's avatar
Yu IHARA committed
99 100
        - echo '/FrontISTR/manual_ja/ /FrontISTR_manual/ja/ 301' >> public/_redirects
        - echo '/FrontISTR/manual_en/ /FrontISTR_manual/en/ 301' >> public/_redirects
101 102 103 104 105 106 107 108
    artifacts:
        paths:
            - public
        expire_in: 100min
    variables:
        GIT_SUBMODULE_STRATEGY: recursive

doxygen:
109
    image: ${REGISTRY}/document:latest
Yu IHARA's avatar
Yu IHARA committed
110 111
    stage: build_for_deploy
    needs: []
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
    script:
        - cmake -Bbuild_doc -H. -DWITH_DOC=ON
        - make -C build_doc doc
        - rm -rf public/doxygen
        - mv build_doc/doc/html public/doxygen
    artifacts:
        paths:
            - public
        expire_in: 100min

pages:
    stage: deploy
    dependencies:
        - document
        - doxygen
127
        - binary:x86_64-w64-mingw32
Yu IHARA's avatar
Yu IHARA committed
128
        - binary:x86_64-w64-mingw32-msmpi
129 130 131 132 133 134 135
    script:
        - ls public
    artifacts:
        paths:
            - public
        expire_in: 20min
    only:
Yu IHARA's avatar
Yu IHARA committed
136 137
      - master
      - release
termoshtt's avatar
termoshtt committed
138 139 140

docker:fistr1:
  image: docker:latest
Yu IHARA's avatar
Yu IHARA committed
141 142
  stage: build_for_deploy
  needs: []
termoshtt's avatar
termoshtt committed
143 144 145 146
  services:
    - docker:dind
  script:
    - apk add make
147 148
    - cd docker/container
    - make push
termoshtt's avatar
termoshtt committed
149 150
  tags:
    - docker
151

152 153
binary:x86_64-w64-mingw32:
    image: ${REGISTRY}/x86_64-w64-mingw32-lib
Yu IHARA's avatar
Yu IHARA committed
154 155
    stage: build_for_deploy
    needs: []
156
    script:
157
        - LIB_ROOT=/usr/local/x86_64-w64-mingw32
158
        - cmake  -Bbuild -H.
159
            -DCMAKE_TOOLCHAIN_FILE=${LIB_ROOT}/x86_64-w64-mingw32.cmake
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
            -DCMAKE_INSTALL_PREFIX=${LIB_ROOT}
            -DCMAKE_EXE_LINKER_FLAGS="-static -static-libstdc++ -static-libgcc -lstdc++ -lgcc -lwinpthread"
            -DMUMPS_INCLUDE_PATH=${LIB_ROOT}/include
            -DMUMPS_D_LIB=${LIB_ROOT}/lib/libdmumps.a\;${LIB_ROOT}/lib/libmpiseq.a
            -DMUMPS_PORD_LIB=${LIB_ROOT}/lib/libpord.a
            -DMUMPS_COMMON_LIB=${LIB_ROOT}/lib/libmumps_common.a
            -DMETIS_INCLUDE_PATH=${LIB_ROOT}/include
            -DMETIS_LIBRARIES=${LIB_ROOT}/lib/libmetis.a
            -DREFINER_INCLUDE_PATH=${LIB_ROOT}/include
            -DREFINER_LIBRARIES=${LIB_ROOT}/lib/libRcapRefiner.a
            -DBLAS_LIBRARIES=${LIB_ROOT}/lib/libopenblas.a
            -DLAPACK_LIBRARIES=${LIB_ROOT}/lib/libopenblas.a
            -DSCALAPACK_LIBRARIES=${LIB_ROOT}/lib/libdmumps.a
            -DWITH_METIS=ON
            -DWITH_MUMPS=ON
            -DWITH_LAPACK=ON
            -DWITH_REFINER=ON
            -DWITH_ML=ON
            -DWITH_MPI=OFF
179 180
            -DWINDOWS=ON
        - cmake --build build -- -j $(nproc)
181
        - mkdir -p public/release/x86_64-w64-mingw32/
Yu IHARA's avatar
Yu IHARA committed
182
        - zip -j public/release/x86_64-w64-mingw32/FrontISTR-latest.zip build/fistr1/fistr1.exe build/fistr1/tools/neu2fstr.exe build/hecmw1/tools/hecmw_part1.exe build/hecmw1/tools/hecmw_vis1.exe build/hecmw1/tools/rmerge.exe build/hecmw1/tools/hec2rcap.exe build/hecmw1/tools/rconv.exe
183 184
    artifacts:
        paths:
185 186
            - public
        expire_in: 100min
187 188 189

binary:x86_64-w64-mingw32-msmpi:
    image: ${REGISTRY}/x86_64-w64-mingw32-mpilib
Yu IHARA's avatar
Yu IHARA committed
190 191
    stage: build_for_deploy
    needs: []
192 193 194 195 196 197
    script:
        - LIB_ROOT=/usr/local/x86_64-w64-mingw32
        - cmake  -Bbuild -H.
            -DCMAKE_TOOLCHAIN_FILE=${LIB_ROOT}/x86_64-w64-mingw32.cmake
            -DCMAKE_INSTALL_PREFIX=${LIB_ROOT}
            -DCMAKE_EXE_LINKER_FLAGS="-static -static-libstdc++ -static-libgcc -lstdc++ -lgcc -lwinpthread"
198
            -DCMAKE_CXX_STANDARD_LIBRARIES=${LIB_ROOT}/lib/libmsmpi.a
199 200 201 202 203
            -DMPI_C_INCLUDE_PATH=${LIB_ROOT}/include
            -DMPI_C_LIBRARIES=${LIB_ROOT}/lib/libmsmpi.a
            -DMPI_CXX_INCLUDE_PATH=${LIB_ROOT}/include
            -DMPI_CXX_LIBRARIES=${LIB_ROOT}/lib/libmsmpi.a
            -DMPI_Fortran_INCLUDE_PATH=${LIB_ROOT}/include
204
            -DMPI_Fortran_LIBRARIES=${LIB_ROOT}/lib/libmsmpi.a
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
            -DMUMPS_INCLUDE_PATH=${LIB_ROOT}/include
            -DMUMPS_D_LIB=${LIB_ROOT}/lib/libdmumps.a
            -DMUMPS_PORD_LIB=${LIB_ROOT}/lib/libpord.a
            -DMUMPS_COMMON_LIB=${LIB_ROOT}/lib/libmumps_common.a
            -DMETIS_INCLUDE_PATH=${LIB_ROOT}/include
            -DMETIS_LIBRARIES=${LIB_ROOT}/lib/libmetis.a
            -DREFINER_INCLUDE_PATH=${LIB_ROOT}/include
            -DREFINER_LIBRARIES=${LIB_ROOT}/lib/libRcapRefiner.a
            -DBLAS_LIBRARIES=${LIB_ROOT}/lib/libopenblas.a
            -DLAPACK_LIBRARIES=${LIB_ROOT}/lib/libopenblas.a
            -DSCALAPACK_LIBRARIES=${LIB_ROOT}/lib/libscalapack.a
            -DWITH_METIS=ON
            -DWITH_MUMPS=ON
            -DWITH_LAPACK=ON
            -DWITH_REFINER=ON
            -DWITH_ML=ON
            -DWITH_MPI=ON
            -DWINDOWS=ON
        - cmake --build build -- -j $(nproc)
Yu IHARA's avatar
Yu IHARA committed
224
        - mkdir -p public/release/x86_64-w64-mingw32-msmpi/
225
        - zip -j public/release/x86_64-w64-mingw32-msmpi/FrontISTR-latest.zip build/fistr1/fistr1.exe build/fistr1/tools/neu2fstr.exe build/hecmw1/tools/hecmw_part1.exe build/hecmw1/tools/hecmw_vis1.exe build/hecmw1/tools/rmerge.exe build/hecmw1/tools/hec2rcap.exe build/hecmw1/tools/rconv.exe ${LIB_ROOT}/bin/mpiexec.exe ${LIB_ROOT}/bin/smpd.exe ${LIB_ROOT}/lib/msmpi.dll
226 227 228 229
    artifacts:
        paths:
            - public
        expire_in: 100min
Yu IHARA's avatar
Yu IHARA committed
230