sampctl icon indicating copy to clipboard operation
sampctl copied to clipboard

Provide the ability to easily test new compiler versions

Open Southclaws opened this issue 5 years ago • 7 comments

AppVeyor has an API for accessing build job artifacts (Travis doesn't seem to, but most users are on Windows anyway) so it would be useful to facilitate easier testing of new compiler versions by supporting downloads straight from CI.

Relevant curls:

% curl https://ci.appveyor.com/api/projects/Southclaws/compiler
% curl https://ci.appveyor.com/api/buildjobs/2iajurecy5qjsal3/artifacts/

Southclaws avatar Jul 22 '18 08:07 Southclaws

Now that a compiler fork is gaining popularity, something to specify an url or git release would be useful.

AGraber avatar Oct 17 '18 11:10 AGraber

It would be very useful, I think adding an override URL might be the best solution, that would also facilitate other compilers (like the russian one) in case anyone wants to do stuff like that.

Southclaws avatar Oct 17 '18 11:10 Southclaws

So what would we be looking at here another configuration option like version_url or compiler_url which if is present and not empty would override the current version ?

Would we expect that the url point to an archive or single file? or should we check it's MIME type after downloading to determine how to extract the compiler?

ADRFranklin avatar Oct 17 '18 13:10 ADRFranklin

My suggestion in discord (for posterity here) was a path field instead. Have the user point to a directory with the compiler executable in on their machine, instead of a remote location.

Pros:

Would work for private and test builds (e.g. during development). No need to worry about infinate possible archive types/layouts. Version stability.

Cons:

Not as automated as everything else.

Y-Less avatar Oct 17 '18 14:10 Y-Less

Leaving this here to remind me to discuss it: https://github.com/sampctl/compilers/blob/master/compilers.json

https://github.com/mholt/archiver

Southclaws avatar Oct 17 '18 14:10 Southclaws

maybe we could support both ways, maybe we have compiler_path which could be a local directory and also a remote one. The local one wouldn't require anything special just to verify the path exists and so does the compiler.

The remote part gets a little tricky, due to how we would extract the file/archive to a location that has a unique id and yet can still be located when needed for compiling. There is a solution for that the developer could use the currently set version to specify the name of the folder that the extracted contents would be in. Which would make it easier to find when compiling, however it would take more away from the automation part.

I hope we can get some more ideas for this.

ADRFranklin avatar Oct 17 '18 14:10 ADRFranklin

I think the simplest solution is best, Y_Less suggestion seems to fit that so that would make a good first version. In future, I'd like to support something nicer, but for now it at least makes it easier.

Southclaws avatar Oct 17 '18 14:10 Southclaws