Skip to content

Commit 303eb0b

Browse files
committed
Toolchain: Rely on installed CMake config file for Cereal and RapidJSON
1 parent d83621a commit 303eb0b

26 files changed

Lines changed: 143 additions & 88 deletions

.github/workflows/ase_plugin_test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Atomic Simulation Environment (ASE) Plugin Test
33
on:
44
pull_request:
55

6+
defaults:
7+
run:
8+
shell: bash
9+
610
jobs:
711
test:
812
name: abacuslite
@@ -33,13 +37,22 @@ jobs:
3337
cd interfaces/ASE_interface
3438
pip install .
3539
40+
- name: Install external tools from toolchain
41+
run: |
42+
apt update && apt install -y xz-utils
43+
cd toolchain
44+
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run -j8
45+
./scripts/stage4/install_stage4.sh
46+
cd ..
47+
3648
- name: Configure & Build ABACUS (GNU)
3749
run: |
3850
git config --global --add safe.directory `pwd`
3951
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
4052
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
4153
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
4254
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH}
55+
source toolchain/install/setup
4356
rm -rf build
4457
cmake -B build
4558
cmake --build build -j2

.github/workflows/build_test_cmake.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
pull_request:
55

6+
defaults:
7+
run:
8+
shell: bash
9+
610
jobs:
711
test:
812
runs-on: ubuntu-latest
@@ -13,29 +17,37 @@ jobs:
1317
build_args: ""
1418
name: "Build with GNU toolchain"
1519
- tag: intel
20+
external_toolchain_args: "--with-intel"
1621
build_args: ""
1722
name: "Build with Intel toolchain"
1823

1924
- tag: gnu
25+
external_toolchain_args: ""
2026
build_args: "-DENABLE_LIBXC=1 -DENABLE_MLALGO=1 -DENABLE_LIBRI=1"
2127
name: "Build extra components with GNU toolchain"
2228
- tag: intel
29+
external_toolchain_args: "--with-intel"
2330
build_args: "-DENABLE_LIBXC=1 -DENABLE_PEXSI=1 -DENABLE_MLALGO=1 -DENABLE_LIBRI=1"
2431
name: "Build extra components with Intel toolchain"
2532

2633
- tag: cuda
34+
external_toolchain_args: ""
2735
build_args: "-DUSE_CUDA=1"
2836
name: "Build with CUDA support"
2937
- tag: gnu
38+
external_toolchain_args: ""
3039
build_args: "-DENABLE_LCAO=0"
3140
name: "Build without LCAO"
3241
- tag: gnu
42+
external_toolchain_args: ""
3343
build_args: "-DUSE_ELPA=0 "
3444
name: "Build without ELPA"
3545
- tag: gnu
46+
external_toolchain_args: ""
3647
build_args: "-DENABLE_MPI=0"
3748
name: "Build without MPI"
3849
- tag: gnu
50+
external_toolchain_args: ""
3951
build_args: "-DENABLE_MPI=0 -DENABLE_LCAO=0"
4052
name: "Build without LCAO and MPI"
4153

@@ -47,13 +59,22 @@ jobs:
4759
with:
4860
submodules: recursive
4961

62+
- name: Install external tools from toolchain
63+
run: |
64+
apt update && apt install -y gfortran xz-utils
65+
cd toolchain
66+
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run ${{matrix.external_toolchain_args}}
67+
./scripts/stage4/install_stage4.sh
68+
cd ..
69+
5070
- name: Build
5171
run: |
5272
git config --global --add safe.directory `pwd`
5373
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
5474
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
5575
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
5676
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH}
77+
source toolchain/install/setup
5778
rm -rf build
5879
cmake -B build ${{ matrix.build_args }}
5980
cmake --build build -j2

.github/workflows/build_test_makefile.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
pull_request:
55

6+
defaults:
7+
run:
8+
shell: bash
9+
610
jobs:
711
test:
812
runs-on: ubuntu-latest

.github/workflows/coverage.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
push:
66
tags:
77
- 'v*'
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
813
jobs:
914
test-coverage:
1015
name: Generate Coverage Report
@@ -18,13 +23,21 @@ jobs:
1823

1924
- name: Install Perl Dependencies and Coverage Tools
2025
run: |
21-
apt update && apt install -y curl jq ca-certificates python3-pip
26+
apt update && apt install -y curl jq ca-certificates python3-pip xz-utils
2227
apt install -y lcov perl-modules
2328
apt install -y libcapture-tiny-perl libdatetime-perl libjson-perl libperlio-gzip-perl
2429
lcov --version
2530
31+
- name: Install external tools from toolchain
32+
run: |
33+
cd toolchain
34+
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run -j8
35+
./scripts/stage4/install_stage4.sh
36+
cd ..
37+
2638
- name: Building with Coverage
2739
run: |
40+
source toolchain/install/setup
2841
rm -rf build/
2942
rm -f CMakeCache.txt
3043

.github/workflows/cuda.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
workflow_dispatch:
55
pull_request:
66

7+
defaults:
8+
run:
9+
shell: bash
10+
711
concurrency:
812
group: ${{ github.workflow }}-${{ github.ref }}
913
cancel-in-progress: true
@@ -28,11 +32,19 @@ jobs:
2832
- name: Install Ccache
2933
run: |
3034
sudo apt-get update
31-
sudo apt-get install -y ccache
35+
sudo apt-get install -y ccache xz-utils
36+
37+
- name: Install external tools from toolchain
38+
run: |
39+
cd toolchain
40+
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run -j8
41+
./scripts/stage4/install_stage4.sh
42+
cd ..
3243
3344
- name: Configure & Build
3445
run: |
3546
nvidia-smi
47+
source toolchain/install/setup
3648
rm -rf build
3749
cmake -B build -DUSE_CUDA=ON -DBUILD_TESTING=ON
3850
cmake --build build -j4

.github/workflows/devcontainer.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- 'v*'
1010
workflow_dispatch:
1111

12+
defaults:
13+
run:
14+
shell: bash
15+
1216
jobs:
1317
build_container_and_push:
1418
runs-on: X64

.github/workflows/doxygen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
# Allows you to run this workflow manually from the Actions tab
1111
workflow_dispatch:
1212

13+
defaults:
14+
run:
15+
shell: bash
16+
1317
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1418
permissions:
1519
contents: read

.github/workflows/dynamic.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- cron: '0 16 * * 0'
66
workflow_dispatch:
77

8+
defaults:
9+
run:
10+
shell: bash
11+
812
jobs:
913
test:
1014
name: Dynamic analysis
@@ -14,8 +18,16 @@ jobs:
1418
steps:
1519
- name: Checkout
1620
uses: actions/checkout@v6
21+
- name: Install external tools from toolchain
22+
run: |
23+
apt update && apt install -y xz-utils
24+
cd toolchain
25+
./install_abacus_toolchain_new.sh --with-dftd4=install --dry-run -j8
26+
./scripts/stage4/install_stage4.sh
27+
cd ..
1728
- name: Building
1829
run: |
30+
source toolchain/install/setup
1931
cmake -B build -DENABLE_ASAN=1 -DENABLE_MLALGO=1 -DENABLE_LIBXC=1
2032
cmake --build build -j8
2133
cmake --install build

.github/workflows/interface.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: interface
33
on:
44
workflow_dispatch:
55

6+
defaults:
7+
run:
8+
shell: bash
9+
610
jobs:
711
wannier-interface:
812
name: "wannier interface — ${{ matrix.name }}"

.github/workflows/mirror_gitee.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Mirror to Gitee Repository
22

33
on: [ push, delete, create ]
44

5+
defaults:
6+
run:
7+
shell: bash
8+
59
# Ensures that only one mirror task will run at a time.
610
concurrency:
711
group: git-mirror

0 commit comments

Comments
 (0)