forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (147 loc) · 4.48 KB
/
Copy pathtoolchain_full.yaml
File metadata and controls
151 lines (147 loc) · 4.48 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Toolchain Full Build Test
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
inputs:
variants:
description: "Comma-separated variants: gnu,intel,cuda"
required: false
default: "gnu,intel,cuda"
defaults:
run:
shell: bash
jobs:
full-build-gnu:
if: contains(inputs.variants || 'gnu,intel,cuda', 'gnu')
runs-on: X64
container:
image: ghcr.io/deepmodeling/abacus-gnu
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install requirements
run: |
set -euo pipefail
cd toolchain/root_requirements
sudo ./install_requirements_ubuntu.sh
- name: Build toolchain
run: |
set -euo pipefail
cd toolchain
./toolchain_gnu.sh
- name: Build ABACUS
run: |
set -euo pipefail
cd toolchain
./build_abacus_gnu.sh
cd ..
./bin/abacus --version || true
- name: Upload logs
if: always()
uses: actions/upload-artifact@v7
with:
name: toolchain-full-gnu
path: |
toolchain/compile.log
toolchain/compile.err
toolchain/install/setup
toolchain/build/**/make.log
toolchain/build/**/configure.log
toolchain/build/**/cmake.log
if-no-files-found: ignore
full-build-intel:
if: contains(inputs.variants || 'gnu,intel,cuda', 'intel')
runs-on: X64
container:
image: ghcr.io/deepmodeling/abacus-intel
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install requirements
run: |
set -euo pipefail
cd toolchain/root_requirements
sudo ./install_requirements_ubuntu.sh
- name: Build toolchain
run: |
set -euo pipefail
cd toolchain
./toolchain_intel.sh
- name: Build ABACUS
run: |
set -euo pipefail
cd toolchain
./build_abacus_intel.sh
cd ..
./bin/abacus --version || true
- name: Upload logs
if: always()
uses: actions/upload-artifact@v7
with:
name: toolchain-full-intel
path: |
toolchain/compile.log
toolchain/compile.err
toolchain/install/setup
toolchain/build/**/make.log
toolchain/build/**/configure.log
toolchain/build/**/cmake.log
if-no-files-found: ignore
full-build-cuda:
if: contains(inputs.variants || 'gnu,intel,cuda', 'cuda')
runs-on: gpu
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install requirements
run: |
set -euo pipefail
if [ -f /etc/os-release ]; then . /etc/os-release; fi
if [ "${ID:-}" = "ubuntu" ] || [ "${ID_LIKE:-}" = "debian" ]; then
sudo ./toolchain/root_requirements/install_requirements_ubuntu.sh
elif [ "${ID:-}" = "fedora" ] || [ "${ID_LIKE:-}" = "rhel fedora" ]; then
sudo ./toolchain/root_requirements/install_requirements_fedora.sh
else
exit 1
fi
- name: Prepare CUDA and NVHPC
run: |
set -euo pipefail
if command -v nvidia-smi >/dev/null 2>&1; then
nvidia-smi
cap="$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | head -n 1 | tr -d '.' | xargs || true)"
fi
if [ -z "${cap:-}" ]; then cap="70"; fi
echo "GPU_CAP=${cap}" >> "$GITHUB_ENV"
if command -v module >/dev/null 2>&1; then
module use /opt/nvidia/hpc_sdk/modulefiles || true
module load nvhpc/26.1 || module load nvhpc-hpcx-cuda12/25.3
else
exit 1
fi
if [ -d /usr/local/cuda ]; then
echo "CUDA_PATH=/usr/local/cuda" >> "$GITHUB_ENV"
fi
- name: Build toolchain
run: |
set -euo pipefail
cd toolchain
./toolchain_gnu.sh --enable-cuda --gpu-ver "${GPU_CAP}"
- name: Build ABACUS
run: |
set -euo pipefail
cd toolchain
./build_abacus_gnu.sh
cd ..
./bin/abacus --version || true
- name: Upload logs
if: always()
uses: actions/upload-artifact@v7
with:
name: toolchain-full-cuda
path: |
toolchain/compile.log
toolchain/compile.err
toolchain/install/setup
if-no-files-found: ignore