@@ -185,31 +185,89 @@ jobs:
185185 steps :
186186 - uses : actions/checkout@v4
187187
188- - name : Setup Compiler
188+ - name : Setup Compiler
189189 shell : bash
190190 run : $GITHUB_WORKSPACE/.github/workflows/scripts/compiler_setup.sh gnu 12
191191
192192 - name : Configure CMake
193193 shell : bash
194194 run : cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build
195- -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
195+ -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/install
196196 -DCMAKE_PREFIX_PATH=${ENV_PREFIX_PATH}
197197 -DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
198198
199199 - name : Build
200200 shell : bash
201- run : cmake --build ${{runner.workspace}}/build -j2
201+ run : cmake --build ${{runner.workspace}}/build -j2
202202
203203 - name : Install
204204 shell : bash
205205 run : cmake --build ${{runner.workspace}}/build --target install
206206
207207 - name : CMake Discovery Configure
208208 shell : bash
209- run : cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
209+ run : cmake -S $GITHUB_WORKSPACE/tests/cmake/discovery -B ${{runner.workspace}}/cmake_discovery_build
210210 -DCMAKE_PREFIX_PATH="${{runner.workspace}}/install;${ENV_PREFIX_PATH}"
211211 -DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/${GH_ACTIONS_TOOLCHAIN}
212212
213213 - name : CMake Discovery Build
214214 shell : bash
215215 run : cmake --build ${{runner.workspace}}/cmake_discovery_build -j2
216+
217+ macos_build :
218+ name : macOS Build and Test
219+ runs-on : macos-14
220+
221+ steps :
222+ - uses : actions/checkout@v4
223+
224+ - uses : mamba-org/setup-micromamba@v2
225+ with :
226+ environment-name : gauxc
227+ create-args : >-
228+ python=3.11
229+ c-compiler
230+ cxx-compiler
231+ fortran-compiler
232+ mpich
233+ cmake
234+ hdf5
235+ openblas
236+ ccache
237+ init-shell : bash
238+ cache-environment : true
239+
240+ - name : Setup ccache
241+ shell : micromamba-shell {0}
242+ run : |
243+ ccache --set-config=max_size=2G
244+ ccache --set-config=compression=true
245+ echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
246+ echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
247+
248+ - name : Restore ccache
249+ uses : actions/cache@v4
250+ with :
251+ path : ~/.ccache
252+ key : ccache-macos-${{ github.sha }}
253+ restore-keys : |
254+ ccache-macos-
255+
256+ - name : Build
257+ shell : micromamba-shell {0}
258+ run : |
259+ cmake -S . -B build \
260+ -DCMAKE_BUILD_TYPE=Release \
261+ -DGAUXC_ENABLE_MPI=ON \
262+ -DGAUXC_ENABLE_TESTS=ON \
263+ -DBUILD_TESTING=ON \
264+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5
265+ cmake --build build -j3
266+
267+ - name : ccache statistics
268+ shell : micromamba-shell {0}
269+ run : ccache --show-stats
270+
271+ - name : Test
272+ shell : micromamba-shell {0}
273+ run : ctest --test-dir build --output-on-failure
0 commit comments