|
1 | | -name: spack-ubuntu |
| 1 | +name: Spack/Ubuntu |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
|
8 | 8 | branches: [ main ] |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - init: |
12 | | - name: ${{ matrix.config }} |
13 | | - # The CMake configure and build commands are platform agnostic and should work equally |
14 | | - # well on Linux, Windows or Mac. |
15 | | - runs-on: ubuntu-latest |
16 | | - container: |
17 | | - image: lihpccg/mgx-ubuntu.22.04-spack.0.19.0:latest |
18 | | - strategy: |
19 | | - fail-fast: false |
20 | | - matrix: |
21 | | - config: [Release, Debug] |
22 | | - |
23 | | - steps: |
24 | | - - uses: actions/checkout@v2 |
25 | | - with: |
26 | | - fetch-depth: 2 # seems to be needed by codecov |
27 | | - submodules: recursive |
28 | | - |
29 | | - - name: Initialize the dev environment |
30 | | - shell: bash |
31 | | - run : | |
32 | | - source /spack/share/spack/setup-env.sh |
33 | | - git clone --depth=1 https://github.com/LIHPC-Computational-Geometry/spack_recipes_meshing.git |
34 | | - spack repo add ./spack_recipes_meshing/meshing_repo |
35 | | - spack repo add ./spack_recipes_meshing/supersede_repo |
36 | | -
|
37 | | - - name: Build and install |
38 | | - shell: bash |
39 | | - run: | |
40 | | - source /spack/share/spack/setup-env.sh |
41 | | - spack env activate meshing-env |
42 | | - spack add lima |
43 | | - # we use GITHUB_WORKSPACE instead of github.Workspace because in containers it |
44 | | - # seems to be incorrect (see https://github.com/actions/runner/issues/2058) |
45 | | - spack develop -p $GITHUB_WORKSPACE --no-clone lima@7.7.9 |
46 | | - spack install --no-checksum |
47 | | - # now we build using cmake with spack provided build variables |
48 | | - spack load --only dependencies --sh lima > spack_env_file.sh |
49 | | - source spack_env_file.sh |
50 | | - cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran -DCMAKE_CXX_FLAGS="-std=c++11" -DCMAKE_Fortran_FLAGS="-fdefault-integer-8 -fdefault-real-8 -fdefault-double-8" \ |
| 11 | + call: |
| 12 | + name: Call lihpccg Spack/Ubuntu |
| 13 | + uses: LIHPC-Computational-Geometry/lihpccg-ci/.github/workflows/spack-ubuntu.yml@main |
| 14 | + with: |
| 15 | + run-tests: false |
| 16 | + cmake-options: "-DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran -DCMAKE_CXX_FLAGS="-std=c++11" -DCMAKE_Fortran_FLAGS="-fdefault-integer-8 -fdefault-real-8 -fdefault-double-8" \ |
51 | 17 | -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_XLMLIMA=ON -DBUILD_TESTS:BOOL=ON -DBUILD_SCRIPTING:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DINT_8:BOOL=ON -DREAL_8:BOOL=ON \ |
52 | | - -DUSE_PYTHON_3:BOOL=ON -DPython3_ROOT_DIR=/usr/lib/python3 \ |
53 | | - -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} . |
54 | | - make -j |
55 | | - #make test |
56 | | -
|
57 | | - - name: Test c++ lib install |
58 | | - shell: bash |
59 | | - run: | |
60 | | - source /spack/share/spack/setup-env.sh |
61 | | - spack env activate meshing-env |
62 | | - spack load lima |
63 | | - cd test_link/ |
64 | | - cmake -S . -B build_exe |
65 | | - cmake --build build_exe |
66 | | - cd build_exe |
67 | | - ctest |
| 18 | + -DUSE_PYTHON_3:BOOL=ON -DPython3_ROOT_DIR=/usr/lib/python3" |
0 commit comments