-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
14,566 additions
and
2,679 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
version: 2.1 | ||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
commands: | ||
setup: | ||
|
@@ -12,7 +14,6 @@ commands: | |
sudo pip install meson | ||
pip install numpy==1.18.5 | ||
pip install --user -r python/requirements/CI-complete/requirements.txt | ||
pip install twine --user | ||
# Remove tskit installed by msprime | ||
pip uninstall tskit -y | ||
echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV | ||
|
@@ -48,12 +49,14 @@ commands: | |
ninja -C build-gcc test | ||
- run: | ||
name: Run gcov & upload coverage. | ||
name: Run gcov | ||
command: | | ||
cd build-gcc | ||
find ../c/tskit/*.c -type f -printf "%f\n" | xargs -i gcov -pb libtskit.a.p/tskit_{}.gcno ../c/tskit/{} | ||
cd .. | ||
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -F c-tests | ||
- codecov/upload: | ||
flags: c-tests | ||
token: CODECOV_TOKEN | ||
|
||
- run: | ||
name: Valgrind for C tests. | ||
|
@@ -116,14 +119,17 @@ commands: | |
python -m pytest -n2 | ||
- run: | ||
name: Upload LWT coverage | ||
name: Generate coverage | ||
command: | | ||
# Make sure the C coverage reports aren't lying around | ||
rm -fR build-gcc | ||
ls -R | ||
cd python/lwt_interface | ||
gcov -pb -o ./build/temp.linux*/*.gcno example_c_module.c | ||
bash <(curl -s https://codecov.io/bash) -X gcov -F lwt-tests | ||
- codecov/upload: | ||
flags: lwt-tests | ||
token: CODECOV_TOKEN | ||
|
||
- run: | ||
name: Run Python tests | ||
|
@@ -132,30 +138,17 @@ commands: | |
python -m pytest --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_lowlevel.py tests/test_tables.py tests/test_file_format.py | ||
- run: | ||
name: Upload Python coverage | ||
name: Generate Python coverage | ||
command: | | ||
# Make sure the C coverage reports aren't lying around | ||
rm -fR build-gcc | ||
rm -f python/lwt_interface/*.gcov | ||
cd python | ||
gcov -pb -o ./build/temp.linux*/*.gcno _tskitmodule.c | ||
bash <(curl -s https://codecov.io/bash) -X gcov -F python-c-tests | ||
- run: | ||
name: Build Python package | ||
command: | | ||
cd python | ||
rm -fR build | ||
python setup.py sdist | ||
python setup.py check | ||
python -m twine check dist/*.tar.gz | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install --upgrade setuptools pip wheel | ||
python setup.py build_ext | ||
python setup.py egg_info | ||
python setup.py bdist_wheel | ||
pip install dist/*.tar.gz | ||
tskit --help | ||
- codecov/upload: | ||
flags: python-c-tests | ||
token: CODECOV_TOKEN | ||
|
||
jobs: | ||
build: | ||
|
@@ -176,6 +169,28 @@ jobs: | |
paths: | ||
- "/home/circleci/.local" | ||
- compile_and_test | ||
- run: | ||
name: Install dependencies for wheel test | ||
command: | | ||
ARGO_NET_GIT_FETCH_WITH_CLI=1 pip install twine --user | ||
# Remove tskit installed by msprime | ||
pip uninstall tskit -y | ||
- run: | ||
name: Build Python package | ||
command: | | ||
cd python | ||
rm -fR build | ||
python setup.py sdist | ||
python setup.py check | ||
python -m twine check dist/*.tar.gz | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install --upgrade setuptools pip wheel | ||
python setup.py build_ext | ||
python setup.py egg_info | ||
python setup.py bdist_wheel | ||
pip install dist/*.tar.gz | ||
tskit --help | ||
build-32: | ||
docker: | ||
|
@@ -191,6 +206,8 @@ jobs: | |
key: tskit-32-{{ .Branch }}-v7 | ||
paths: | ||
- "/home/circleci/.local" | ||
# We need to install curl for the codecov upload. | ||
- run: sudo apt-get install -y curl | ||
- compile_and_test | ||
|
||
workflows: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
PYTHON_VERSIONS=( | ||
cp311-cp311 | ||
cp310-cp310 | ||
cp39-cp39 | ||
cp38-cp38 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ on: | |
jobs: | ||
pre-commit: | ||
name: Lint | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.10.0 | ||
uses: styfle/cancel-workflow-action@0.11.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v3 | ||
|
@@ -21,9 +21,8 @@ jobs: | |
- name: install clang-format | ||
if: steps.clang_format.outputs.cache-hit != 'true' | ||
run: | | ||
sudo apt-get remove -y clang-6.0 libclang-common-6.0-dev libclang1-6.0 libllvm6.0 | ||
sudo apt-get autoremove | ||
sudo apt-get install clang-format clang-format-6.0 | ||
sudo pip install clang-format==6.0.1 | ||
sudo ln -s /usr/local/bin/clang-format /usr/local/bin/clang-format-6.0 | ||
- uses: pre-commit/[email protected] | ||
|
||
benchmark: | ||
|
@@ -35,11 +34,11 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
python-version: '3.11' | ||
cache: 'pip' | ||
cache-dependency-path: python/requirements/development.txt | ||
cache-dependency-path: python/requirements/benchmark.txt | ||
- name: Install deps | ||
run: pip install -r python/requirements/development.txt | ||
run: pip install -r python/requirements/benchmark.txt | ||
- name: Build module | ||
run: | | ||
cd python | ||
|
@@ -61,7 +60,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: [ 3.7, 3.9, "3.10" ] | ||
python: [ 3.7, 3.9, "3.11" ] | ||
os: [ macos-latest, ubuntu-latest, windows-latest ] | ||
defaults: | ||
run: | ||
|
@@ -84,7 +83,7 @@ jobs: | |
/usr/share/miniconda/envs/anaconda-client-env | ||
~/osx-conda | ||
~/.profile | ||
key: ${{ runner.os }}-${{ matrix.python}}-conda-v11-${{ hashFiles('python/requirements/CI-tests-conda/requirements.txt') }}-${{ hashFiles('python/requirements/CI-tests-pip/requirements.txt') }} | ||
key: ${{ runner.os }}-${{ matrix.python}}-conda-v12-${{ hashFiles('python/requirements/CI-tests-conda/requirements.txt') }}-${{ hashFiles('python/requirements/CI-tests-pip/requirements.txt') }} | ||
|
||
- name: Install Conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
|
@@ -143,6 +142,11 @@ jobs: | |
conda activate anaconda-client-env | ||
python setup.py build_ext --inplace | ||
- name: Remove py311 incompatible tests (lack of numba support for 3.11, needed for lshmm) | ||
if: matrix.python == '3.11' | ||
run: | | ||
rm python/tests/test_genotype_matching_* | ||
- name: Run tests | ||
working-directory: python | ||
run: | | ||
|
@@ -152,11 +156,11 @@ jobs: | |
python -m pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 tests | ||
- name: Upload coverage to Codecov | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: codecov/codecov-action@v2 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
working-directory: python | ||
fail_ci_if_error: true | ||
fail_ci_if_error: false | ||
flags: python-tests | ||
name: codecov-umbrella | ||
verbose: true | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ build-gcc | |
python/benchmark/*.trees | ||
python/benchmark/*.json | ||
python/benchmark/*.html | ||
.venv | ||
.env | ||
|
Oops, something went wrong.