git subrepo pull umbrella #5
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
# | |
# ci.yml github actions continuous integration for deltafs-umbrella | |
# 22-Sep-2022 chuck@ece.cmu.edu | |
# | |
# workflow name. user defined string that displays on repo's action page. | |
name: CI | |
# workflow trigger. when to run? 'branches' limits scope to given branches. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# job(s) to run when workflow is triggered. | |
jobs: | |
# first (and only) job for this workflow: buildtest | |
buildtest: | |
# create a build matrix for this job. disable fail-fast so we | |
# do not fail the whole job if one branch of the matrix fails. | |
# you can use "include" to add branches to matrix and "exclude" | |
# to prune branches you do not want to build. | |
# XXX: putting lists in exclude doesn't work | |
# e.g. exclude: | |
# - compiler: [gcc-7, gcc-8] | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Debug, RelWithDebInfo] | |
compiler: [gcc-9, gcc-10, clang-10, clang-11] | |
os: [ubuntu-latest] | |
# can add include / exclude below to refine the matrix | |
# what os to run on (reference matrix above for this) | |
runs-on: ${{ matrix.os }} | |
# environment variables to provide to the job | |
env: | |
CI_BUILDTYPE: ${{ matrix.build_type }} | |
CI_COMPILER: ${{ matrix.compiler }} | |
# sequential set of steps (i.e. commands) for this job | |
steps: | |
# | |
# dump out our currently selected environment and add CI_COMPBASE, | |
# CI_CC, and CI_CXX to our environment using GITHUB_ENV. | |
# | |
- name: display selected environment config | |
run: | | |
echo "build=$CI_BUILDTYPE compiler=$CI_COMPILER" | |
cicc=$CI_COMPILER | |
cicompbase=`echo $cicc | sed -e 's/-.*//'` | |
if [ "$cicompbase" = "gcc" ]; then | |
cicxx=`echo $cicc | sed -e 's/^gcc/g++/'` | |
elif [ "$cicompbase" = "clang" ]; then | |
cicxx=`echo $cicc | sed -e 's/^clang/clang++/'` | |
else | |
echo "compbase error $cicompbase - unknown compiler basename" | |
fi | |
echo "CI_COMPBASE=$cicompbase" >> $GITHUB_ENV | |
echo "CI_CC=$cicc" >> $GITHUB_ENV | |
echo "CI_CXX=$cicxx" >> $GITHUB_ENV | |
# | |
# checkout our git tree | |
# | |
- name: github checkout source | |
uses: actions/checkout@v2 | |
# | |
# set up environment using apt-get to install packages we need | |
# but don't build ourselves. we need an MPI installed to | |
# configure deltafs-umbrella, but we don't really use it here. | |
# | |
# note: clang includes C++, but g++ is its own package. | |
# XXX: run did not like /bin/sh case statement (syntax err, quoting?) | |
# | |
- name: setup selected environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y $CI_COMPILER | |
if [ "$CI_COMPBASE" = "gcc" ]; then | |
sudo apt-get install -y $CI_CXX | |
fi | |
sudo apt-get install -y cmake automake | |
sudo apt-get install -y mpich libmpich-dev | |
sudo apt-get install -y librados-dev | |
# | |
# print out versions of some key programs (just for reference). | |
# also print out all CI_* env vars. | |
# | |
- name: version check | |
run: | | |
automake --version | |
cmake --version | |
git --version | |
printenv | egrep '^CI_' | |
# | |
# now we have everything we need, so we can configure our project | |
# | |
- name: configure project | |
run: | | |
mkdir b && cd b | |
export CC=$CI_CC CXX=$CI_CXX | |
cmake -DCMAKE_INSTALL_PREFIX=/tmp/deltafs-umbrella \ | |
-DCMAKE_BUILD_TYPE="$CI_BUILDTYPE" \ | |
-DVPIC407=ON \ | |
-DMERCURY_NA_INITIALLY_ON="bmi;sm" \ | |
-DUMBRELLA_RUNTESTS=OFF -DUMBRELLA_BUILDTESTS=ON \ | |
-DBUILD_TESTS=ON .. | |
echo "cmake done" | |
# | |
# build project | |
# | |
- name: build project | |
run: date && cd b && make && date |