[x3d-public] x3dom testing and building

Andreas Plesch andreasplesch at gmail.com
Tue Oct 17 06:21:40 PDT 2017


I just posted below on the x3dom-developer list but it may be
interesting here as well. Longer term it may become possible to use
the example archive for automatic testing of x3dom in addition to
automatic building.

Using github it is convenient to fork x3dom and then use the online
editor to work on the code. To test and use the new code, it is
preferable to build the x3dom.js distribution with the manage.py build
script. This step is sometimes a hurdle because it requires cloning to
a local computer, setting up Python, invoking the script and uploading
the results. Before submitting a pull request to the main master
branch, it is also necessary to test the new code, preferably by
building a new x3dom.js .

To help with the building step, I am setting up a special BuildPR
branch on my github X3DOM branch
(https://github.com/andreasplesch/x3dom/tree/BuildPR). The BuildPR
branch is synced with the main master branch and triggers automatic
building of x3dom whenever a PR is received against it. This is all
done on the travis ci service. The build is then deployed to
x3dom-builds.surge.sh/latest and x3dom-builds.surge.sh/build_x . The
10 most recent builds are kept under build_0 to build_9.
x3dom-builds.surge.sh provides a listing of all builds.

This mostly works but Travis sometimes just stops the build process.
Possibly, the build script is overwhelming the logging facility.
Investigating. May try redirecting output to a file or /dev/null.

I may separate out the latest, most recently requested build to its
own domain: x3dom-testing.surge.sh . This would be easy to do.

It would be useful to try this build service by just retargeting
existing PRs from the main master branch to the andreasplesch/BuildPR
branch. travis and/or github may behave differently when dealing with
PRs from forks other than the owner's. Any feedback and ideas for
improvement are welcome,

Andreas

PS: it is possible to submit a PR which modifies the build script and
thereby allows uploading of arbitrary content. So you can only really
trust the build results of your own PRs. Using other builds or other
files served from this domain requires the level of trust you would
have when using information from an unknown web site.


-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list