build #199
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: "53 15 * * 0" # Run at a random time weekly | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup conda and dependencies | |
run: | | |
tools/setup_travis.sh ${{ matrix.python-version }} | |
- name: Test | |
run: | | |
export IMP_TMP_DIR=/tmp | |
eval "$(conda shell.bash hook)" | |
conda activate python${{ matrix.python-version }} | |
# 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 | |
cmake .. -DIMP_DIR=${CONDA_PREFIX}/lib/cmake/IMP -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" | |
make | |
./setup_environment.sh py.test --cov=.. --cov-branch --cov-report=xml -v ../test/test_*.py test/*/*.py | |
- uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |