build #250
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: build | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "55 14 * * 5" # Run at a random time weekly | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["2.7", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup conda and dependencies | |
run: | | |
git clone --depth 5 https://github.com/salilab/rmf.git ~/rmf | |
tools/setup_ci.sh ${{ matrix.python-version }} | |
- name: Test | |
run: | | |
eval "$(conda shell.bash hook)" | |
conda activate python${{ matrix.python-version }} | |
rm -f ${CONDA_PREFIX}/lib/libimp_npctransport.so* ${CONDA_PREFIX}/lib/_IMP_npctransport.so | |
# Use same C/C++ compiler as conda | |
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gcc_linux-64.sh | |
source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gxx_linux-64.sh | |
mkdir build && cd build | |
if test "${{ matrix.python-version }}" = "2.7" ; then PY2=on; else PY2=off; fi | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMP_DIR=${CONDA_PREFIX}/lib/cmake/IMP -DUSE_PYTHON2=${PY2} -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" -DAVROCPP_INCLUDE_PATH=~/rmf/src/avrocpp/api | |
make | |
./setup_environment.sh pytest --cov=.. --cov-branch --cov-report=xml -v -k 'not test_protobuf_installed and not add_test_sites' ../test/test_*.py ../test/medium_test_*.py test/*/*.py | |
flake8 ../pyext/src/ | |
- uses: codecov/codecov-action@v1 |