Skip to content

Test 32bit on CI - #1584

Merged
mergify[bot] merged 1 commit into
tskit-dev:mainfrom
benjeffery:32bit-CI
Jul 28, 2021
Merged

mergify[bot] merged 1 commit into
tskit-dev:mainfrom
benjeffery:32bit-CI

Conversation

@benjeffery

@benjeffery benjeffery commented Jul 22, 2021 •

Copy link
Copy Markdown
Member

Adds a 32bit build and test to circle CI.

@benjeffery
benjeffery force-pushed the 32bit-CI branch 12 times, most recently from df25e05 to 86be1e1 Compare July 22, 2021 13:50
@benjeffery

Copy link
Copy Markdown
Member Author

@jeromekelleher Here's the CI for 32bit.

@jeromekelleher

Copy link
Copy Markdown
Member

Awesome! I worry that we're duplicating some stuff a bit pointlessly, though, and particularly whether CodeCov will code with having two uploads from the different runs? I think we can pull stuff out of the compile_and_test target though - I'll add some comments.

@jeromekelleher

Copy link
Copy Markdown
Member

I think we could probably pull out:

  • Run gcov & upload coverage
  • Test building with meson subproject
  • Install shared library and hand-compile program.
  • Run example make file
  • Upload LWT coverage

There's an argument for uploading the coverage stuff twice, since CodeCov is supposed to be able to handle it, and it'll give us visibility on testing in any #defs we need to do. I'm not sure I trust CodeCov though, tbh.

I don't think there's any point in including the makefile or the example programs though. We'd probably end up having to put a bunch of pointless-looking casts in to them to compile cleanly on 32 bit (but maybe not?)

@benjeffery

Copy link
Copy Markdown
Member Author

For simplicity's sake I'd rather keep the jobs the same unless as you say we'd have to put in work to make the 32 version pass. The steps we could remove only take a few seconds.

@jeromekelleher

Copy link
Copy Markdown
Member

OK - maybe let's fix the casts in the failing compile so and see show Codecov copes with multiple uploads?

@benjeffery
benjeffery force-pushed the 32bit-CI branch 12 times, most recently from e702305 to df5d41c Compare July 26, 2021 17:10
@benjeffery

Copy link
Copy Markdown
Member Author

The tests don't pass as root so I've had to make a custom docker image using the one we had before as base. It fails on an error that isn't immediately obvious to me now.

  Test: test_single_tree_compressed_matrix ...FAILED
    1. ../c/tests/test_haplotype_matching.c:351  - CU_ASSERT_EQUAL(decoded[j][2],0.0)

@jeromekelleher

Copy link
Copy Markdown
Member

Hmm, that's maybe something to do with IEEE maths not being fully present on i386. I'll try it out on my laptop and see if I get the same error.

@jeromekelleher

Copy link
Copy Markdown
Member

I've updated this @benjeffery with a few fixes. Turns out one of them was a real bug, so I guess 32 bit CI is showing some value straight away.

Note I rebased and force pushed to bring in the size_t stuff, in case that was affecting things.

@jeromekelleher

Copy link
Copy Markdown
Member

Looks like we're nearly there, one more error in the Python tests at tests/test_stats.py:198. I'll take a look.

@codecov

codecov Bot commented Jul 27, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #1584 (435189f) into main (3e427c2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 435189f differs from pull request most recent head 20eb778. Consider uploading reports for the commit 20eb778 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1584   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files          27       27           
  Lines       23033    23036    +3     
  Branches     1079     1079           
=======================================
+ Hits        21559    21562    +3     
  Misses       1440     1440           
  Partials       34       34           
Flag Coverage Δ
c-tests 91.85% <100.00%> (ø)
lwt-tests 92.97% <ø> (ø)
python-c-tests 95.29% <100.00%> (+<0.01%) ⬆️
python-tests 98.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
c/tskit/core.h 100.00% <ø> (ø)
c/tskit/genotypes.c 93.89% <ø> (ø)
c/tskit/convert.c 92.04% <100.00%> (ø)
c/tskit/core.c 97.09% <100.00%> (ø)
c/tskit/haplotype_matching.c 95.05% <100.00%> (ø)
c/tskit/tables.c 89.90% <100.00%> (ø)
c/tskit/trees.c 94.86% <100.00%> (ø)
python/_tskitmodule.c 91.84% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e427c2...20eb778. Read the comment docs.

@jeromekelleher

Copy link
Copy Markdown
Member

Hopefully this is ready to go now @benjeffery ...

@jeromekelleher

Copy link
Copy Markdown
Member

Looks like codecov is OK with this, so I say we merge. Thanks for sorting this out @benjeffery, it's a great bit of infrastructure.

@benjeffery

Copy link
Copy Markdown
Member Author

Looks like codecov is OK with this, so I say we merge.

I've got one tweak to move from my personal dockerhub to the tskit one now I have access to it

- Fix inexact floating point comparison on 32bit
- Fix memory clearing size bug.
- Skip failing test on 32 bit.
@benjeffery
benjeffery marked this pull request as ready for review July 28, 2021 09:49
@mergify
mergify Bot merged commit 5256bf7 into tskit-dev:main Jul 28, 2021
@benjeffery
benjeffery deleted the 32bit-CI branch July 28, 2021 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants