PureBasic Demo and Travis CI

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

PureBasic Demo and Travis CI

Post by Tristano »

** EDIT (2019/12/07) ** This discussion has now moved to GitHub

Hi @Fred,

I need to ask you a few questions of legal technical nature about the free demo version of PureBasic.

I have a few PB projects up and running on GitHub and I'd like to take advantage of Travis Continuous Integration service to build and validate all commits and pull requests.
This would also add the benefit of allowing to test that the code builds on all three major OSs — Win, Ubuntu and macOS (one could also add testing it against SpiderBasic, if needed).

The first obvious question (legal) is whether it's permissible to use the free demo this way.

The second question (technical) is whether the max 800 lines of code limitation also applies to the --check compiler option. Does it? I.e. can the demo validate any length of code or is it subject to the same 800 lines restriction of the compiler?

Could you also clarify how the --check option works in terms of cross platformness? If I use this option under Windows for a cross-platform project (where compiler directives provide platform specific code at compilation time), will the compiler be able to fully test the application correctness for all platforms or just tell me if it works fine on Windows? And, can this option be used to test a Linux-only project using the Windows compiler?

Back to Travis CI ... it would be really great if there was a way to validate PureBasic builds on GitHub via Travis. But for this to be possible we'd need either the demo version to support checking code integrity without limits, or else find a way to actually compile PB code without violating its license terms (even using private repositories, I guess that uploading a full copy of the compiler is a breach of its license).

Another issue would be that the download area only offers the latest PB version of the free demo, whereas on a Git project one would need to be able to access specific versions. This could be solved if the PB website were to offer links to demo versions of all PB releases, so Travis could be set to download a specific version at build time (and no copies would stored in the actual repositories, but only used for the build test).

I understand that investing energy on this might not be a priority for PB right now, but I hope that this post will at least raise awareness about potential uses and needs for collaborative PB projects. If you can find of a solution to the above problems it would be a great enhancement for those working on PB projects on GitHub, GitLab, Bitbucket, etc. (but also for companies which use PureBasic and version control in their workflow, though private servers).

Thanks
Last edited by Tristano on Sat Dec 07, 2019 5:54 pm, edited 1 time in total.
The PureBASIC Archives: FOSS Resources:
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic Demo and Travis CI

Post by Little John »

All your questions regarding the demo version will become irrelevant if you buy the full version. The demo version is only ... um, a demo version. The full version is worth much more than it costs.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: PureBasic Demo and Travis CI

Post by Tristano »

Hi Little John, thanks for the feedback.
Little John wrote:All your questions regarding the demo version will become irrelevant if you buy the full version. The demo version is only ... um, a demo version. The full version is worth much more than it costs.
I own a full PB license since 10 years, more or less.

The question above pertains using PureBasic for continuous integration on GitHub, i.e. being able to validate any contributed commit or pull request to a repository — which requires that a third party service (Travis in this case) is able to create a virtual environment on the fly to run a series of tests, which also means that the service will need to be able to temporary setup/install the PB compiler to test all the sources in the project. Some commercial software allow this and/or provide either special tools or web services to allow end users to automate test builds in collaborative projects; so my request is not unsual, for many commercial languages today are trying to ensure that their products can be integrated in best practices workflows of modern software development (lest some companies will drop using them due to lack of support of these services).

https://en.wikipedia.org/wiki/Continuous_integration
https://docs.travis-ci.com/user/for-beginners/
https://en.wikipedia.org/wiki/Version_control

Ultimately, no matter how excellent a language might be, if it can't fit mainstream collaborative development patterns the risk is that it might become unusable in projects that need to abide to these patterns.
The PureBASIC Archives: FOSS Resources:
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: PureBasic Demo and Travis CI

Post by Tristano »

To dispel any misunderstanding...
Little John wrote:All your questions regarding the demo version will become irrelevant if you buy the full version.
No, the fact that I own a PB license does not allow me to upload the PB compiler on GitHub or Travis (or any other third party service, public or private).

So, the problem of my original questions remains. And, Yes, if the PB free demo could be legally uploaded to a repo, or if I could setup Travis to download it (temporarily in the virtual env, which is not public and gets destroyed after each test) it would solve my problem (but only if the demo would allow checking the code without the 800 lines limitation).
The PureBASIC Archives: FOSS Resources:
Post Reply