Add Github actions builds for Linux and Mac OS#2547
Open
daviesrob wants to merge 3 commits intosamtools:developfrom
Open
Add Github actions builds for Linux and Mac OS#2547daviesrob wants to merge 3 commits intosamtools:developfrom
daviesrob wants to merge 3 commits intosamtools:developfrom
Conversation
The Mac OS libc marks sprintf() as deprecated, so the compiler complains about it unless the calls are optimised away. The easiest solution is to replace them with calls to snprintf(). For some functions the size of the destination buffer is made explicit, by using the c99 feature that allows the minimum size of an array parameter to be specified by putting `static` inside the `[` and `]` of the array type derivation along with the minimum size.
Necessary for plugins to link properly when building with --enable-gsl
As Cirrus CI is closing down, tests need to migrate elsewhere. As Windows tests already run using Github actions, using it for Linux and Mac OS builds is the easiest solution. Adds Github actions workflows for Linux (specifically ubuntu as it's the only flavour supported natively), and Mac OS. Updates actions/checkout on the Windows build to the latest release. The reference to it is also changed from a tag name to a sha hash to reduce the risk of supply-chain attack. Adds --enable-libgsl to Windows configure options. Adjusts HTS_PROG_CC_WARNINGS and HTS_PROG_CC_WERROR to remove a directory left behind by the Mac OS compiler, and to redirect compiler messages to the log file. Remove quotes around $CC invocations in HTS_PROG_CC_WARNINGS and HTS_PROG_CC_WERROR. AC_PROG_CC may add flags after the C compiler path to $CC, so it needs to be used unquoted so that field splitting can be done on the value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As Cirrus CI is closing down, tests need to migrate elsewhere. As Windows tests already run using Github actions, using it for Linux and Mac OS builds is the easiest solution.
Adds Github actions workflows for Linux (specifically ubuntu as it's the only flavour supported natively), and Mac OS.
Updates actions/checkout on the Windows build to the latest release. The reference to it is also changed from a tag name to a sha hash to reduce the risk of supply-chain attack.
Fixes some issues with the existing tests found while checking the new builds:
Removes calls to
sprintf()as it's deprecated by Mac OS libc, which caused warnings to be issued for some builds.Adds
$(GSL_LIBS)toW32_PLUGIN_LIBSon Windows, to make plugin links work on--enable-gslbuilds.Adds a configure check for
_XOPEN_SOURCEto make compilation with-std=c99work.Adjusts
HTS_PROG_CC_WARNINGSandHTS_PROG_CC_WERRORto remove a directory left behind by the Mac OS compiler, and to redirect compiler messages to the log file.Remove quotes around
$CCinvocations inHTS_PROG_CC_WARNINGSandHTS_PROG_CC_WERROR.AC_PROG_CCmay add flags after the C compiler path to$CC, so it needs to be used unquoted so that field splitting can be done on the value.The Cirrus CI tests are left enabled for now so we can run both side-by-side for a bit. They can be removed once we're confident that the new ones are working. Unfortunately we will lose the Rocky Linux test when we turn Cirrus off, although it may be possible to do something with containers to get it back again.