forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 234
80 lines (73 loc) · 3 KB
/
Copy pathbuild_test_cmake.yml
File metadata and controls
80 lines (73 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build Test
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- tag: gnu
build_args: ""
name: "Build with GNU toolchain"
- tag: intel
external_toolchain_args: "--with-intel"
build_args: ""
name: "Build with Intel toolchain"
- tag: gnu
external_toolchain_args: ""
build_args: "-DENABLE_LIBXC=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON"
name: "Build extra components with GNU toolchain"
- tag: intel
external_toolchain_args: "--with-intel"
build_args: "-DENABLE_LIBXC=ON -DENABLE_PEXSI=ON -DENABLE_MLALGO=ON -DENABLE_LIBRI=ON"
name: "Build extra components with Intel toolchain"
- tag: cuda
external_toolchain_args: ""
build_args: "-DUSE_CUDA=ON"
name: "Build with CUDA support"
- tag: gnu
external_toolchain_args: ""
build_args: "-DENABLE_LCAO=OFF"
name: "Build without LCAO"
- tag: gnu
external_toolchain_args: ""
build_args: "-DUSE_ELPA=OFF "
name: "Build without ELPA"
- tag: gnu
external_toolchain_args: ""
build_args: "-DENABLE_MPI=OFF"
name: "Build without MPI"
- tag: gnu
external_toolchain_args: ""
build_args: "-DENABLE_MPI=OFF -DENABLE_LCAO=OFF"
name: "Build without LCAO and MPI"
name: ${{ matrix.name }}
container: ghcr.io/deepmodeling/abacus-${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
- name: Install external tools from toolchain
run: |
sudo apt update && sudo apt install -y gfortran ninja-build xz-utils
cd toolchain
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run ${{matrix.external_toolchain_args}}
./scripts/stage4/install_stage4.sh
cd ..
- name: Build
run: |
git config --global --add safe.directory `pwd`
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU_DIST32_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU_DIST32_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH}
source toolchain/install/setup
rm -rf build
cmake -B build -G Ninja ${{ matrix.build_args }}
cmake --build build -j $(nproc)