Skip to content

Merge pull request #68 from chazeon/fix-testing-newton-logit-reg #43

Merge pull request #68 from chazeon/fix-testing-newton-logit-reg

Merge pull request #68 from chazeon/fix-testing-newton-logit-reg #43

Workflow file for this run

# modified version of:
# https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
name: CI
on: [push, pull_request, release]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "ubuntu_latest_gcc_arma",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
fc: "gfortran",
linalg: "arma"
}
- {
name: "ubuntu_latest_gcc_eigen",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
fc: "gfortran",
linalg: "eigen"
}
- {
name: "ubuntu_latest_gcc9_arma",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-9",
cxx: "g++-9",
fc: "gfortran-9",
linalg: "arma"
}
- {
name: "ubuntu_latest_gcc9_eigen",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-9",
cxx: "g++-9",
fc: "gfortran-9",
linalg: "eigen"
}
- {
name: "macos_latest_clang_arma",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
linalg: "arma"
}
- {
name: "macos_latest_clang_eigen",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
linalg: "eigen"
}
steps:
- uses: actions/checkout@v2
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on ubuntu
if: startsWith(matrix.config.name, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} libblas-dev liblapack-dev
${{ matrix.config.cc }} --version
- name: Configure
shell: bash
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
export FC=${{ matrix.config.fc }}
WDIR=${PWD}
if [[ "${{ matrix.config.linalg }}" == "arma" ]]; then
export OPTIM_TEST_USE_ARMA="y"
mkdir ${WDIR}/arma_tmp
git clone --single-branch https://gitlab.com/conradsnicta/armadillo-code.git ${WDIR}/arma_tmp > /dev/null 2>&1
mv ${WDIR}/arma_tmp/include/* ${WDIR}/include
rm -rf ${WDIR}/arma_tmp
export ARMA_INCLUDE_PATH="${WDIR}/include"
elif [[ "${{ matrix.config.linalg }}" == "eigen" ]]; then
export OPTIM_TEST_USE_EIGEN="y"
mkdir ${WDIR}/eigen_tmp
git clone --single-branch https://gitlab.com/libeigen/eigen.git ${WDIR}/eigen_tmp > /dev/null 2>&1
mv ${WDIR}/eigen_tmp/* ${WDIR}/include
rm -rf ${WDIR}/eigen_tmp
export EIGEN_INCLUDE_PATH="${WDIR}/include"
else
echo -e " \x1B[31m- error: unrecognized linear algebra library.\033[0m" >&2 ;
echo ""
exit 1
fi
#
git submodule update --init
./configure -c -l ${{ matrix.config.linalg }}
- name: Build
shell: bash
run: make
- name: Tests
shell: bash
working-directory: tests
run: |
WDIR=${PWD}
export CXX=${{ matrix.config.cxx }}
if [[ "${{ matrix.config.linalg }}" == "arma" ]]; then
export OPTIM_TEST_USE_ARMA="y"
elif [[ "${{ matrix.config.linalg }}" == "eigen" ]]; then
export OPTIM_TEST_USE_EIGEN="y"
export EIGEN_INCLUDE_PATH="${WDIR}/../include"
else
echo -e " \x1B[31m- error: unrecognized linear algebra library.\033[0m" >&2 ;
echo ""
exit 1
fi
./setup && ./test_setup/run_cov