beltoforion / muparserx

A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more.
http://beltoforion.de/en/muparserx
BSD 2-Clause "Simplified" License
137 stars 60 forks source link

Add Github Action workflows for basic CI #119

Closed nalinigans closed 1 year ago

nalinigans commented 1 year ago

Thanks for open sourcing muparserx. We are using it for parsing and evaluating expressions on the fly in GenomicsDB and this saved us time from writing something similar.

Just merged with the latest commit from Dec 4, 2020 and this does not build on MacOS and Ubuntu as sscanf_s seems to be a Microsoft Visual Studio construct. See build for the failures. Some Linux C runtimes do support this - see https://en.cppreference.com/w/c/io/fscanf and even if supported it says we need to define __STDC_WANT_LIB_EXT1__ before #include which makes the usage hacky. There are similar issues in sample/example.cpp with localtime_s and fopen_s.

We work primarily on Linux platforms, have the fixes - https://github.com/nalinigans/muparserx/pull/1 - for the issues above and are not blocked. Would you like another PR for the fixes? Thanks.

beltoforion commented 1 year ago

What exactly is this file supposed to do and what effect will it have on the repository? To be precise. I know what a CI does but I need additional context. In the end I may end setting up a CI system but it might be AppVeyor like on muparser. If what you suggest is easier i may use it.

nalinigans commented 1 year ago

This file is a very basic workflow for Github Actions to just setup and run cmake for building. The current workflow should have no other effect on the repository other than sanity checking any changes that either get pushed or requested to be pulled(PRs) to the repository. If the build is a result of merging a PR, you get a list of the workflows run for the PR ticked for successes and crossed for failures.

I have not used AppVeyor, but Github Actions is free for open source, convenient to check builds from the GitHub Web UI and is easy to set up for macOS and Linux, the primary systems I work with. It also seemed to work for Windows that I added to the basic workflow for muparserx. We moved our repositories from Travis to Github Actions when Travis practically stopped supporting open source builds. AppVeyor should be fine too if you are comfortable working with that system.

beltoforion commented 1 year ago

I'll give it a try. But if it doesn't work for me I may remove it later on.

nalinigans commented 1 year ago

Thanks @beltoforion, no problem if you want to remove. I do have a solution for the compilation issues on Linux/MacOS. Will file a PR later.