Closed jminor closed 3 years ago
The travis OTIO configuration is here: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/master/.travis.yml
I gave this a try a while ago.
Here's a starting point: https://github.com/KarthikRIyer/OpenTimelineIO/actions/runs/109647965/workflow
But I've had some issues.
I'm installing the install artefacts in cxx-install
directory but due to the different python versions it supports it seems to be getting installed elsewhere. So the cxx-install
directory seems to be empty.
Also when I'm uploading the coverage report to codecov I'm unable to see the report from the link. Maybe it's empty...the output is much lesser than what is shown on my local machine.
The python2 build succeeds but not the python3 build.
For python 3.5 I'm getting these errors. What exactly are these console tests and what maybe the reason for the error? It works fine on my local machine. The same tests when run on GitHub Actions with python2 dont give this error.
Python 3.5.9
Running Core tests...
import pkg_resources
...................................................................................................E..E...........E.E....................................................................................................................................................................................................../opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/opentimelineio/adapters/adapter.py:298: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
args = inspect.getargspec(fn)
..................................
======================================================================
ERROR: test_basic (test_console.CreateShelloutTest.<locals>.newSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 135, in test_basic
self.run_test()
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 108, in run_test
raise SystemExit()
SystemExit
======================================================================
ERROR: test_no_media_linker (test_console.CreateShelloutTest.<locals>.newSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 140, in test_no_media_linker
self.run_test()
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 108, in run_test
raise SystemExit()
SystemExit
======================================================================
ERROR: test_basic (test_console.CreateShelloutTest.<locals>.newSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 123, in test_basic
self.run_test()
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 108, in run_test
raise SystemExit()
SystemExit
======================================================================
ERROR: test_basic (test_console.CreateShelloutTest.<locals>.newSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 123, in test_basic
self.run_test()
File "/home/runner/work/OpenTimelineIO/OpenTimelineIO/tests/test_console.py", line 108, in run_test
raise SystemExit()
SystemExit
----------------------------------------------------------------------
Ran 349 tests in 16.024s
FAILED (errors=4)
make: *** [test-core] Error 1
Makefile:40: recipe for target 'test-core' failed
##[error]Process completed with exit code 2.
Nice! As noted in the readme though, we don't support python 3.5 - only 3.6 and 3.7. Does that make the bug go away?
Oh, didn't see that. I'll try with 3.6 n 3.7.
@ssteinbach that fixes the build!
https://github.com/KarthikRIyer/OpenTimelineIO/runs/846810393?check_suite_focus=true
Any ideas about why coverage doesn't work as expected?
Here's how the make coverage
output looks: https://pastebin.com/vt3CCNBg
And the upload link for coverage doesn't work: https://codecov.io/github/KarthikRIyer/OpenTimelineIO/commit/f3663d9b1767c807b9da6d69875a0c4115f6e05a
Also, I need to find a fix for uploading the install artefacts.
@ssteinbach fixed the uploading build artefacts issue.
You can see the uploads here: https://github.com/KarthikRIyer/OpenTimelineIO/actions/runs/161023247
Here's the workflow file: https://github.com/KarthikRIyer/OpenTimelineIO/actions/runs/161023247/workflow
Now only the coverage issue needs to be fixed.
@KarthikRIyer do you want to move this over to a PR? This is looking really promising.
@jmertic is there anything specific we need to do beyond the basic setup? Is there any kind of Linux-foundation specific configuration we should be using for this? (Sorry, new to the GitHub actions world).
@KarthikRIyer Ah, note that make coverage
is meant for local usage. For coverage in CI, the process is a bit different - we want to run the tests and all the code once and then harvest the coverage output (Which is a by-product). We also want to compile with coverage mode on.
in the travis setup, it does this to upload coverage:
bash <(curl -s https://codecov.io/bash) -F $TOX_ENV -f .tox/build-$TOX_ENV/coverage.info -f .coverage
To include coverage info in the C++: https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/992b3c21d851b4ba815bf70fcae6ab9de3e174b0/setup.cfg#L52
And finally this runs the tests through coverage and also the lcov
program, which formats the data for coverage:
https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/992b3c21d851b4ba815bf70fcae6ab9de3e174b0/setup.cfg#L70-L77
If you're running through tox, it should do this stuff if you set the right variable.
I'll open a PR and see at how I can use tox here.
@ssteinbach I'm not the expert here - likely @tykeal is your best bet or engaging the CI WG.
@ssteinbach just look over what the other ASWF projects have done for their switch to GitHub Actions. Because of how GHA operates we do not have any LF specific templates to give you like we would if you were operating in our hosted CI. It's mostly a matter of herding cats when it comes to trying to keep things fairly standard across the repositories at this time.
https://github.com/AcademySoftwareFoundation/OpenColorIO would probably be one of the best projects to look at as they're deep inta GHA now and we're working on getting GPU builds going there.
Thanks @KarthikRIyer this is working great.
We plan to switch from Travis to GitHub Actions for continuous integration. This should help us to align with the other ASWF projects, support testing on VFX reference platform, and gain a broader set of test platforms.
We should be able to have both turned on while we transition, then we can turn Travis off.
For reference, here is the GA setup for USD: https://github.com/PixarAnimationStudios/USD/pull/1253/files