Add Intel GPU Energy APIs #1698
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
name: Variorum CI | |
on: | |
push: | |
branches: [ dev ] | |
pull_request: | |
branches: [ dev, releases/** ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cc-version: [11, 10, 9] | |
config: [boilerplate, shared_debug_log, shared_debug, static_debug_log, static_debug, shared_release_libjustify] | |
exclude: | |
- config: shared_debug_log | |
cc-version: 11 | |
- config: shared_debug_log | |
cc-version: 10 | |
- config: shared_debug | |
cc-version: 11 | |
- config: shared_debug | |
cc-version: 10 | |
- config: static_debug_log | |
cc-version: 11 | |
- config: static_debug_log | |
cc-version: 10 | |
- config: static_debug | |
cc-version: 11 | |
- config: static_debug | |
cc-version: 10 | |
- config: shared_release_libjustify | |
cc-version: 11 | |
- config: shared_release_libjustify | |
cc-version: 10 | |
include: | |
- config: boilerplate | |
BUILD_SHARED_LIBS: ON | |
BUILD_TESTS: ON | |
CMAKE_BUILD_TYPE: RelWithDebInfo | |
ENABLE_LIBJUSTIFY: OFF | |
ENABLE_FORTRAN: ON | |
ENABLE_MPI: ON | |
ENABLE_OPENMP: ON | |
VARIORUM_DEBUG: ON | |
ENABLE_WARNINGS: ON | |
- config: shared_debug_log | |
BUILD_SHARED_LIBS: ON | |
BUILD_TESTS: OFF | |
CMAKE_BUILD_TYPE: Debug | |
ENABLE_LIBJUSTIFY: OFF | |
ENABLE_FORTRAN: OFF | |
ENABLE_MPI: OFF | |
ENABLE_OPENMP: OFF | |
VARIORUM_DEBUG: ON | |
- config: shared_debug | |
BUILD_SHARED_LIBS: ON | |
BUILD_TESTS: OFF | |
CMAKE_BUILD_TYPE: Debug | |
ENABLE_LIBJUSTIFY: OFF | |
ENABLE_FORTRAN: OFF | |
ENABLE_MPI: OFF | |
ENABLE_OPENMP: OFF | |
VARIORUM_DEBUG: OFF | |
- config: static_debug_log | |
BUILD_SHARED_LIBS: OFF | |
BUILD_TESTS: OFF | |
CMAKE_BUILD_TYPE: Debug | |
ENABLE_LIBJUSTIFY: OFF | |
ENABLE_FORTRAN: OFF | |
ENABLE_MPI: OFF | |
ENABLE_OPENMP: OFF | |
VARIORUM_DEBUG: ON | |
- config: static_debug | |
BUILD_SHARED_LIBS: OFF | |
BUILD_TESTS: OFF | |
CMAKE_BUILD_TYPE: Debug | |
ENABLE_LIBJUSTIFY: OFF | |
ENABLE_FORTRAN: OFF | |
ENABLE_MPI: OFF | |
ENABLE_OPENMP: OFF | |
VARIORUM_DEBUG: OFF | |
- config: shared_release_libjustify | |
BUILD_SHARED_LIBS: ON | |
BUILD_TESTS: OFF | |
CMAKE_BUILD_TYPE: Release | |
ENABLE_LIBJUSTIFY: ON | |
ENABLE_FORTRAN: OFF | |
ENABLE_MPI: OFF | |
ENABLE_OPENMP: OFF | |
VARIORUM_DEBUG: OFF | |
steps: | |
# Checkout variorum repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v2 | |
- name: Install deps on ubuntu | |
run: | | |
sudo apt-get update | |
sudo apt-get install cmake libhwloc-dev libjansson-dev gfortran python3-sphinx doxygen mpich gcc-${{ matrix.cc-version }} python3-breathe | |
cmake --version | |
gcc-${{ matrix.cc-version }} --version | |
- name: Build and install rankstr dependency | |
run: | | |
git clone https://github.com/ECP-VeloC/rankstr.git | |
cd rankstr | |
mkdir build && cd build | |
cmake .. | |
# build | |
VERBOSE=1 make -j | |
# install | |
sudo make -j install | |
- name: Build and install libjustify dependency | |
run: | | |
git clone https://github.com/llnl/libjustify.git | |
cd libjustify | |
mkdir build && cd build | |
cmake ../src | |
# build | |
VERBOSE=1 make -j | |
# install | |
sudo make -j install | |
- name: Compile check | |
run: | | |
# create out-of-source build and install dir | |
mkdir build && mkdir install | |
cd build | |
# setup cmake options | |
export CMAKE_OPTS="-DBUILD_SHARED_LIBS=${{matrix.BUILD_SHARED_LIBS}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_C_COMPILER=gcc-${{matrix.cc-version}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_TESTS=${{matrix.BUILD_TESTS}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${{matrix.CMAKE_BUILD_TYPE}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_LIBJUSTIFY=${{matrix.ENABLE_LIBJUSTIFY}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_FORTRAN=${{matrix.ENABLE_FORTRAN}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_MPI=${{matrix.ENABLE_MPI}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_OPENMP=${{matrix.ENABLE_OPENMP}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DVARIORUM_DEBUG=${{matrix.VARIORUM_DEBUG}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_WARNINGS=${{matrix.ENABLE_WARNINGS}}" | |
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install" | |
echo ${CMAKE_OPTS} | |
cmake ${CMAKE_OPTS} ../src | |
# build | |
VERBOSE=1 make -j | |
# install | |
make -j install | |
check-code-format: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.7] | |
steps: | |
# Checkout variorum repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v2 | |
- name: Check license headers | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
python scripts/license.py verify | |
- name: Style check c/cpp/h files | |
run: | | |
sudo apt-get update | |
sudo apt-get install astyle | |
astyle --version | |
cd ${GITHUB_WORKSPACE} | |
./scripts/.ci-check-code-format.sh | |
err=$? | |
if [ $err -eq 0 ]; then exit 0; else echo -e "Formatting issue found in C/C++ files. Please run ./scripts/check-code-format.sh"; exit 1; fi | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip rstfmt | |
- name: Update Black | |
run: | | |
pip install black==21.12b0 | |
pip install flake8==4.0.1 | |
- name: Style check python files | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
flake8 | |
# specify excluded dirs on command line | |
black --diff --check --exclude "/(src/thirdparty_builtin/googletest|build|src/docs)/" . | |
- name: Style check docs files | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
./scripts/.ci-check-rst-format.sh | |
# build-with-spack-mirrors: | |
# runs-on: ubuntu-latest | |
# | |
# env: | |
# BUILD_SHARED_LIBS: ON | |
# BUILD_TESTS: ON | |
# CMAKE_BUILD_TYPE: RelWithDebInfo | |
# ENABLE_FORTRAN: ON | |
# ENABLE_MPI: ON | |
# ENABLE_OPENMP: ON | |
# VARIORUM_DEBUG: OFF | |
# | |
# steps: | |
# - uses: actions/checkout@v2 | |
# | |
# - name: Install deps on ubuntu | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install cmake gfortran python3-sphinx doxygen mpich python3-breathe | |
# cmake --version | |
# gcc --version | |
# | |
# - name: Clone spack | |
# uses: actions/checkout@v2 | |
# with: | |
# repository: spack/spack | |
# path: spack | |
# ref: releases/v0.17 | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# - name: Clone spack mirrors | |
# uses: actions/checkout@v2 | |
# with: | |
# repository: llnl/variorum-spack-mirrors | |
# path: variorum-spack-mirrors | |
# ref: main | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# - name: Setup spack and add local mirrors | |
# run: | | |
# SPACK_BIN=${PWD}/spack/bin | |
# echo "${SPACK_BIN}" >> ${GITHUB_PATH} | |
# export PATH=${SPACK_BIN}:${PATH} | |
# which spack | |
# echo -e "spack version: $(spack --version)" | |
# ls ${GITHUB_WORKSPACE} | |
# spack mirror add local_filesystem file://${GITHUB_WORKSPACE}/variorum-spack-mirrors | |
# echo -e "Setting spack mirror" | |
# ls variorum-spack-mirrors | |
# | |
# - name: Install variorum deps | |
# run: | | |
# cd ${GITHUB_WORKSPACE} | |
# # Install hwloc | |
# spack install hwloc | |
# hwloc_dir=`ls -d ${PWD}/spack/opt/spack/*/*/hwloc-*` | |
# echo "HWLOC_DIR=${hwloc_dir}" >> ${GITHUB_ENV} | |
# # Install jansson | |
# spack install jansson | |
# jansson_dir=`ls -d ${PWD}/spack/opt/spack/*/*/jansson-*` | |
# echo "JANSSON_DIR=${jansson_dir}" >> ${GITHUB_ENV} | |
# # Install rankstr | |
# spack install rankstr | |
# rankstr_dir=`ls -d ${PWD}/spack/opt/spack/*/*/rankstr-*` | |
# echo "RANKSTR_DIR=${rankstr_dir}" >> ${GITHUB_ENV} | |
# | |
# - name: Compile check | |
# run: | | |
# # create out-of-source build and install dir | |
# mkdir build && mkdir install | |
# cd build | |
# # setup cmake options | |
# export CMAKE_OPTS="-DBUILD_SHARED_LIBS=${{env.BUILD_SHARED_LIBS}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_TESTS=${{env.BUILD_TESTS}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_FORTRAN=${{env.ENABLE_FORTRAN}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_MPI=${{env.ENABLE_MPI}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DVARIORUM_DEBUG=${{env.VARIORUM_DEBUG}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DUSE_MSR_SAFE_BEFORE_1_5_0=${{env.USE_MSR_SAFE_BEFORE_1_5_0}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DHWLOC_DIR=${{env.HWLOC_DIR}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DJANSSON_DIR=${{env.JANSSON_DIR}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DRANKSTR_DIR=${{env.RANKSTR_DIR}}" | |
# export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install" | |
# echo ${CMAKE_OPTS} | |
# cmake ${CMAKE_OPTS} ../src | |
# # build | |
# VERBOSE=1 make -j | |
# # install | |
# make -j install |