Skip to content

Add Github actions builds for Linux and Mac OS#2547

Open
daviesrob wants to merge 3 commits intosamtools:developfrom
daviesrob:actions
Open

Add Github actions builds for Linux and Mac OS#2547
daviesrob wants to merge 3 commits intosamtools:developfrom
daviesrob:actions

Conversation

@daviesrob
Copy link
Copy Markdown
Member

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) to W32_PLUGIN_LIBS on Windows, to make plugin links work on --enable-gsl builds.

  • Adds a configure check for _XOPEN_SOURCE to make compilation with -std=c99 work.

  • 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.

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.

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.
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

Successfully merging this pull request may close these issues.

1 participant