-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·42 lines (38 loc) · 1.39 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: build
on:
push:
pull_request:
schedule:
- cron: "19 3 * * 0" # 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@v4
with:
submodules: true
- name: Setup conda and dependencies
run: |
tools/setup_ci.sh ${{ matrix.python-version }}
pip install -r requirements.txt
- name: Test
run: |
eval "$(conda shell.bash hook)"
conda activate python${{ matrix.python-version }}
rm -f ${CONDA_PREFIX}/lib/libimp_pmi.so* ${CONDA_PREFIX}/lib/_IMP_pmi.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 .. -DIMP_DIR=${CONDA_PREFIX}/lib/cmake/IMP -DUSE_PYTHON2=${PY2} -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"
make
./setup_environment.sh pytest --cov=.. --cov-branch --cov-report=xml -v ../test/test_*.py ../test/medium_test_*.py test/*/*.py
flake8 ../pyext/src/
${GCC/gcc/gcov} $(find . -name "*.gcno")
- uses: codecov/codecov-action@v3