Add files to configure with CMake #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================================================================= | |
# F I N I T E E L E M E N T A N A L Y S I S P R O G R A M | |
# (c) Regents of the University of California | |
# All Rights Reserved. | |
# ================================================================= | |
name: CI | |
# Trigger in two scenarios: | |
# 1) when pushing directly into master, and | |
# 2) when pull requests are opened on devel | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [devel] | |
workflow_dispatch: | |
# Define jobs to compile on Linux, MacOS, and Windows | |
jobs: | |
build-linux: | |
name: Build on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Obtain source code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install gfortran libopenblas-dev libopenmpi-dev | |
echo Finish GFORTRAN install | |
- name: Configure and Compile | |
run: | | |
mkdir build | |
cmake -S . -B build | |
cmake --build build -j 8 | |
build-mac: | |
name: Build Mac OS | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Obtain source code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
ln -s /opt/homebrew/bin/gcc-13 /usr/local/bin/gcc | |
ln -s /opt/homebrew/bin/gfortran-13 /usr/local/bin/gfortran | |
brew install open-mpi | |
brew install scalapack | |
brew install xquartz | |
- name: Configure and Compile | |
run: | | |
mkdir build | |
cmake -S . -B build | |
cmake --build build | |
build-win: | |
name: Build Windows | |
runs-on: windows-2019 | |
steps: | |
- name: Obtain Source Code | |
uses: actions/checkout@v4 | |
- name: Install Visual Studio | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
vsversion: 2019 | |
- name: Install Intel Toolchain | |
shell: pwsh | |
env: | |
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe | |
WINDOWS_BASEKIT_COMPONENTS: intel.oneapi.win.mkl.devel | |
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe | |
WINDOWS_HPCKIT_COMPONENTS: "intel.oneapi.win.mpi.devel:intel.oneapi.win.ifort-compiler" | |
run: | | |
cd .github | |
cd workflows | |
./install_fortran.bat $env:WINDOWS_BASEKIT_URL $env:WINDOWS_BASEKIT_COMPONENTS | |
./install_fortran.bat $env:WINDOWS_HPCKIT_URL $env:WINDOWS_HPCKIT_COMPONENTS | |
- name: Configure and Compile | |
shell: cmd | |
run: | | |
# Setup shell environment | |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 mod | |
# Create build directory | |
mkdir build | |
cd build | |
# Configure | |
cmake .. -DBLA_STATIC=ON -DMKL_LINK=static -DMKL_INTERFACE_FULL=intel_lp64 | |
# Compile | |
cmake --build . --config Release | |