-
Notifications
You must be signed in to change notification settings - Fork 18
202 lines (164 loc) · 6.94 KB
/
build_and_test_compiler_zoo.yml
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
name: Build and Test - Compiler Zoo
on: [pull_request, workflow_dispatch]
env:
GH_ACTIONS_TOOLCHAIN: .github/workflows/toolchains/gh-actions.cmake
ENV_PREFIX_PATH: "/home/software/install/blis-lp64-sequential;/usr/local/libxc/exchcxx-patch"
jobs:
release_build:
name: Release Build and Test
runs-on: ubuntu-latest
container:
image: dbwy/chemistry
strategy:
matrix:
compiler: [ {suite: gnu, version: 12}, {suite: llvm, version: 14} ]
mpi_flag: [ON, OFF]
openmp_flag: [ON, OFF]
exclude:
- compiler: {suite: llvm, version: 14}
openmp_flag: ON
steps:
- uses: actions/checkout@v3
- name: Setup Compiler
shell: bash
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh
${{matrix.compiler.suite}} ${{matrix.compiler.version}}
- name: Enable or Disable MPI
shell: bash
run: echo "set(GAUXC_ENABLE_MPI ${{matrix.mpi_flag}} CACHE BOOL \"\" FORCE)" >>
${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Enable or Disable OpenMP
shell: bash
run: echo "set(GAUXC_ENABLE_OPENMP ${{matrix.openmp_flag}} CACHE BOOL \"\" FORCE)" >>
${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Setup Build Type
shell: bash
run: echo "set(CMAKE_BUILD_TYPE Release CACHE BOOL \"\" FORCE)" >>
${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Build
shell: bash
run: cmake --build ${{runner.workspace}}/build -j2
- name: Test
shell: bash
run: cmake --build ${{runner.workspace}}/build --target test
nvidia_build:
name: NVIDIA Build (No Test)
runs-on: ubuntu-latest
#needs: release_build
container:
image: dbwy/chemistry-gpu
#options: --gpus all
strategy:
matrix:
flags: [ {magma: OFF, cutlass: OFF}, {magma: ON, cutlass: OFF}, {magma: OFF, cutlass: ON} ]
steps:
- uses: actions/checkout@v3
- name: Setup Build Type
shell: bash
run: echo "set(CMAKE_BUILD_TYPE Release CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Setup Enable CUDA
shell: bash
run: |
echo "set(GAUXC_ENABLE_CUDA ON CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
echo "set(CMAKE_CUDA_ARCHITECTURES 80 CACHE STRING \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
echo "set(GAUXC_ENABLE_MAGMA ${{matrix.flags.magma}} CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
echo "set(GAUXC_ENABLE_CUTLASS ${{matrix.flags.cutlass}} CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
echo "set(GAUXC_ENABLE_MPI OFF CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
echo "set(MAGMA_ROOT_DIR \"/usr/local/magma/2.6.2/install\" CACHE PATH \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Build
shell: bash
run: cmake --build ${{runner.workspace}}/build -j2
#- name: Test
# shell: bash
# run: cmake --build ${{runner.workspace}}/build --target test
debug_build:
name: Debug Build and Test
runs-on: ubuntu-latest
container:
image: dbwy/chemistry
steps:
- uses: actions/checkout@v3
- name: Setup Compiler
shell: bash
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
- name: Setup Build Type
shell: bash
run: echo "set(CMAKE_BUILD_TYPE Debug CACHE BOOL \"\" FORCE)" >> ${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Build
shell: bash
run: cmake --build ${{runner.workspace}}/build -j2
- name: Test
shell: bash
run: cmake --build ${{runner.workspace}}/build --target test
subproject_build:
name: Build as Subproject
needs: release_build
runs-on: ubuntu-latest
container:
image: dbwy/chemistry
steps:
- uses: actions/checkout@v3
- name: Setup Compiler
shell: bash
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
- name: CMake Subproject Configure
shell: bash
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/subproject
-B ${{runner.workspace}}/cmake_subproject_build
-DGITHUB_REPOSITORY=$GITHUB_ACTOR/GauXC
-DGIT_REVISION=$GITHUB_HEAD_REF
-DFETCHCONTENT_SOURCE_DIR_GAUXC=$GITHUB_WORKSPACE
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: CMake Subproject Build
shell: bash
run: cmake --build ${{runner.workspace}}/cmake_subproject_build -j2
cmake_discovery:
name: CMake Discovery
needs: release_build
runs-on: ubuntu-latest
container:
image: dbwy/chemistry
steps:
- uses: actions/checkout@v3
- name: Setup Compiler
shell: bash
run: $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
- name: Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
-DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: Build
shell: bash
run: cmake --build ${{runner.workspace}}/build -j2
- name: Install
shell: bash
run: cmake --build ${{runner.workspace}}/build --target install
- name: CMake Discovery Configure
shell: bash
run: cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/install;${ENV_PREFIX_PATH}"
-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
- name: CMake Discovery Build
shell: bash
run: cmake --build ${{runner.workspace}}/cmake_discovery_build -j2