Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perl MapScript not built as part of CI #5777

Closed
geographika opened this issue Mar 31, 2019 · 3 comments
Closed

Perl MapScript not built as part of CI #5777

geographika opened this issue Mar 31, 2019 · 3 comments

Comments

@geographika
Copy link
Member

geographika commented Mar 31, 2019

Currently Perl MapScript is not built as part of Continuous Integration on either Travis (Linux) or Appveyor (Windows).

To add to Travis will require Perl dependencies (libperl-dev?) to be installed in .travis.yml (see https://github.com/mapserver/mapserver/blob/branch-7-4/.travis.yml#L55)

DWITH_PERL=1 will need to be added to the CMAKE FLAGS at https://github.com/mapserver/mapserver/blob/branch-7-4/Makefile#L9

Finally it would be good to run the Perl MapScript examples in the MakeFile or as part of perl/CMakeLists.txt/ to ensure nothing breaks with code changes.

@AndyColson
Copy link

AndyColson commented Apr 1, 2019

Can CI run:

    cmake <whatever>
    make 
    make test

I'd like to put the tests into make test, if thats ok. I've uploaded a little test that works for me:

github

Is this direction ok?

@geographika
Copy link
Member Author

There are currently 2 approaches for the different MapScript bindings:

  1. Run the tests via CMAKE in a custom target, which calls custom commands. For example in Python MapScript see https://github.com/mapserver/mapserver/blob/branch-7-4/mapscript/python/CMakeLists.txt#L106 for the commands and https://github.com/mapserver/mapserver/blob/branch-7-4/mapscript/python/CMakeLists.txt#L73 for the custom target.

Then call this custom target https://github.com/mapserver/mapserver/blob/branch-7-4/.travis.yml#L69

make mspython-wheel

The advantage of this approach is that the test can be more easily called and run across platforms (Windows and Linux).

  1. Write a shell script and call this via the Make file e.g for C# MapScript:

https://github.com/mapserver/mapserver/blob/branch-7-4/mapscript/csharp/run_test.sh

https://github.com/mapserver/mapserver/blob/branch-7-4/Makefile#L50

If you create a pull request with whichever approach is easiest for you it will trigger the Travis build and you can see the output.

Just on the code changes, watch out for IDEs autoformatting code and adding spaces/new lines as it makes it harder to see the code changes. Also rename /t to /tests?

Hope this makes things clearer, and not more complicated!

@geographika
Copy link
Member Author

Closed with #5778

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

No branches or pull requests

2 participants