to be able to compile normally without setting std in CFLAGS
+ remove it from macos-14 CI
clang 15 as in macOS 14 doesn't support c23 [[attributes]] such as
[[gnu::always_inline]]
Improves the commit 4136c263 from last week - we usually expect gnu
extensions, although doesn't seem to cause problems in this case (but eg.
the asm keywords won't work /not used here because is arm64/ - __asm__
would be required instead).
compute SHA256 checksums for builds
this is useful at least for 2 reasons:
1. user can ensure that the build comes really from the CI (isn't
tampered)
2. can identify or match version with appropriate action run (the $VERSION
is usually always "continuous", except for releases)
The sha256 sum is currently only show in the protocol, not uploaded
to GH releases - this doesn't seem to be needed because GH currently
already prints the checksum by itself on the download (releases) page.
Skip computing checksum in Win when uplad-artifact is used - the zip
is actually created by the Action so we cannot compute the checksum
on it.
/sbin/sha256sum is not present in CI mac workers for some reason
THe problem seems to be that there is preinstalled pkg-config@0.29.2 in
CI but the version that is being to be installed is an alias for pkgconf.
The problem seems to be cumbersome, because installing pkgconf fails, pkg-config
as well (tries to install pkgconf 2.3.0; installed version of pkg-config
is pkg-config@0.29.2).
So made just a workaround, that will not be needed after the updated
pkg-config (linked to pkgconf) applies to all macos runners (will be
preinstalled).
The problematic package is pkg-config in current macos-13 runner but
pkg-config@0.29.2 in macos-14 image.
suppress `brew list` output
It is used just to check if a package is installed and the output is
print is output to stdout. To stderr is print that it if the package is
not installed.
pkgconf is more modern version and the CI on macos-14 now fails
because both pkg-config and pkgconf (presumably as a dependency) are to
be installed.
The erroa (the beginning, additional info omittedr):
```
==> Pouring pkgconf--2.3.0_1.arm64_sonoma.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Could not symlink bin/pkg-config
Target /opt/homebrew/bin/pkg-config
is a symlink belonging to pkg-config@0.29.2. You can unlink it:
brew unlink pkg-config@0.29.2
```
Both pkgconf and pkg-config can be installed automatically as a dependency
of some other packages so ensure a defined state (both installed,
pkg-config disabled).
needed for DELTACAST, otherwise manpage generation fails with:
```
dyld[40232]: Library not loaded: @rpath/VideoMasterHD.framework/Versions/A/VideoMasterHD
Referenced from: <3D8A8CBA-1094-3538-9770-331DE9A2D6D2> /Users/runner/work/UltraGrid/UltraGrid/bin/uv
Reason: tried: '/usr/local/lib/VideoMasterHD.framework/Versions/A/VideoMasterHD' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/VideoMasterHD.framework/Versions/A/VideoMasterHD' (no such file), '/usr/local/lib/VideoMasterHD.framework/Versions/A/VideoMasterHD' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/VideoMasterHD.framework/Versions/A/VideoMasterHD' (no such file)
Could not obtain data from UG/reflector output!
```
the build fails after switch to macos-13 on manual page generation:
```
dyld[41003]: Symbol not found: __Z11IsRGBFormat21NTV2FrameBufferFormat
Referenced from: <2945C378-5453-3610-9AA4-63E2723BBA5D> /Users/runner/work/UltraGrid/UltraGrid/bin/uv
Expected in: <no uuid> unknown
Could not obtain data from UG/reflector output!
make: *** [uv.1] Error 3
make: *** Waiting for unfinished jobs....
```
which tries to run bin/uv with --fullhelp.
(this fails only if run within the script data/make_man.sh, not when run directly)
the message: `Error: No such keg: /opt/homebrew/Cellar/asciidoctor`
is now print on stderr, which disturbs GitHub CI (complains about it in
action summary annotations; just a warning).
`
The GitHub actions now complain if trying to install a formula, that is
already installed, eg:
```
run macOS (macos-14)
pkg-config 0.29.2_3 is already installed and up-to-date. To reinstall 0.29.2_3, run: brew reinstall pkg-config
```
As a workaround, install just the formulas, that are not already
installed.
It is not needed to split the string like this:
```
a="potentially long string on"\
"multiple lines"
```
but it is better rather to put the '\' inside the string:
```
a="potentially long string on\
multiple lines"
```
Download installers if not present. They usually are, because are cached
by the workflow. However, this change is mainly to allow the installation
not by CI but on some local computer for debugging purposes by C&P.
Using `cmake --build . --parallel` actually doesn't limit the number
of processes because it just passes the number (here none) to make,
resulting in `make -j`.
This is a possible explanations of macOS runner freezes, as eg. here:
<https://github.com/MartinPulec/UltraGrid/actions/runs/7641831068>
(last relevant message in log is `[100%] Built target joysticks`).
Following to previous commit, we can build with Qt 6 (even thought that
a workaround is neeeded).
qt package (version 6) is installed anyways as a dependency of opencv
Install vulkan headers prior to updating homebrew tree.
the version 1.3.264 seem to be temporarily broken (see [1]), producing
error:
/usr/local/include/vulkan/vulkan.hpp:15:10: fatal error: 'vulkan/vulkan_hpp_macros.hpp' file not found
#include <vulkan/vulkan_hpp_macros.hpp>
[1]:
https://github.com/MartinPulec/UltraGrid/actions/runs/6184953701/job/16789584064
the version 4.1.7 in GH runner is unsolicitedly producing
relocatable install names as it would with (in recent HB version)
HOMEBREW_RELOCATABLE_INSTALL_NAMES=1
see failed run:
<https://github.com/CESNET/UltraGrid/actions/runs/6147222102/job/16745596096>
The relocatable install names like:
$ otool -L /usr/local/opt/qt/lib/QtGui.framework/QtGui | grep png
@loader_path/../../../../../../../opt/libpng/lib/libpng16.16.dylib
Makes significant problems to macdylibbundler (it doesn't copy the library
to the bundle at all neither chantes the name).
\+ reinstall freetype (see failed build
<https://github.com/MartinPulec/UltraGrid/actions/runs/6185513000/job/16791263362>)
fixes failed run
<https://github.com/CESNET/UltraGrid/actions/runs/5925739298/job/16065753514>
From some point, it seems that Qt6 (Homebrew port _qt_) is already
installed but it doesn't bundle successfully. So enforce using Qt5
(previous symlink command didn't replace the `/usr/local/opt/qt` symlink
if already present).
\+ copy the link instead of linking it to prevent:
Error: /usr/local/opt/qt@5 is not a valid keg
Copy sounfont to known path for macOS and Windows CI builds (in Linux,
this is already handled with a environment var SDL_SOUNDFONTS). And also
use that location if there is any soundfont.