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
Gitlab-CI: Update Windows builder configs, OpenShotAudio linking; enable Windows unit tests #657
Conversation
When `#include`-ing the whole mess, building the file was leading to what looked like out-of-memory errors. Replacing the monolithic header with just the necessary ones cleared it up.
- Copying the built and depended (libopenshot-audio) DLLs into the unit test dir before building the tests ensures that when the test executables are run by the Catch.cmake module to discover their contents, the executables will find the DLLs they need in order to run.
(The former name, openshot-html-test, was too close to the new name format for all of our unit test executables, making things unnecessarily confusing.)
(Again, this is expected to fail to build until OpenShot/libopenshot-audio#118 is merged, so the failures serve as a handy reminder that the other PR needs to go in first.) |
Well, OpenShot/libopenshot-audio#118 is merged, but the PPA manifest needs to have the |
Merge conflicts have been detected on this PR, please resolve. |
@ferdnyc LaunchPad merge request approved! Thx |
@jonoomph Thanks! I triggered a new build of the libopenshot-audio DEBs, and it looks from the build log like the CMake configs are indeed packaged, so fingers crossed that this will now build successfully in CI and can be merged. |
With the switch to an EXPORTED CMake configuration for libopenshot-audio, its dependencies become our dependencies. Which means that CMake now correctly requires that the ALSA libs be installed.
UGGGGGGGGH.
(I just merged OpenShot/libopenshot-audio#121 to remove the demo binary from the EXPORTED configuration.) |
Codecov Report
@@ Coverage Diff @@
## develop #657 +/- ##
========================================
Coverage 52.42% 52.42%
========================================
Files 151 151
Lines 12346 12346
========================================
Hits 6473 6473
Misses 5873 5873
Continue to review full report at Codecov.
|
FINALLY. Successfully built in CI; merging so we can get builds back on track for other branches in the project Windows builders. |
Nice job! |
This PR (which has OpenShot/libopenshot-audio#118 and OpenShot/libopenshot-audio#119 as prerequisites) similarly updates the Windows project builder configs to match their enhanced MinGW32/64 environments, but also makes some changes of general note:
The
FindOpenShotAudio.cmake
module is deleted fromcmake/Modules/
. CMake will now use theEXPORTED
CMake configuration produced (pending the merge of CMake: Create and install EXPORTED configuration libopenshot-audio#118) when building and installing the "OpenShotAudio" project — akalibopenshot-audio
— to confgure that dependency, making the Find module unnecessary.If
OpenShotAudio
is built and installed in a system default location like/usr/
orC:\msys64\mingw32\
, one where CMake is configured to look for package configs by default, then the<prefix>/share/cmake/OpenShotAudio/OpenShotAudioConfig.cmake
files will be picked up automatically when configuring the libopenshot build — nothing needs to be done.If the
OpenShotAudio
build has been installed in a non-standard location (say,/opt/OpenShotAudio
, then any CMake >= 3.12 can be directed to the configuration by setting theOpenShotAudio_ROOT
variable to that prefix path. e.g.:cmake -B build -S . -DOpenShotAudio_ROOT=/opt/OpenShotAudio ...
CMake will discover the
/opt/OpenShotAudio/share/cmake/OpenShotAudio/
directory created by the OpenShotAudio install, and configure the build in accordance with its contents.OpenShotAudio_ROOT
can also be pointed at a build directory to pick up the dependency there, without installing the project. However, this is likely to cause problems on Linux once libopenshot is installed, unless at that time (if not before)libopenshot-audio
is also installed to the same (system) library path. The current build configs conform to CMake's default Linux convention of disabling allRPATH
s on installed binaries and executables.The OpenShotAudio main header file will have a new name as of CMake: Create and install EXPORTED configuration libopenshot-audio#118, so all
#includes
in the libopenshot code have been replaced:The header is also still installed under the old name, for backwards-compatibility, but this should be considered deprecated and subject to future removal. A compile-time warning may eventually be emitted when the
JuceHeader.h
file is included, to raise awareness of this change.Only the header file name has changed; audio classes defined in OpenShotAudio are still under the
juce::
namespace, same as before.Catch2 unit tests are now runnable on any Windows system that has the
mingw-w64-*-catch
package(s) installed in MSYS2. (Or any system where Catch2 is manually installed and visible to CMake.)The only other requirement is that every DLL dependency other than
libopenshot-audio.dll
must be located on the$PATH
and accessible to the unit testopenshot-*-test.exe
files when they're run during the build. The build script will copy the necessary libopenshot and libopenshot-audio DLLs into the unit test space so they can be found, it's only external dependencies that need to be accessible via$PATH
.Minor, but the
<build>/examples/openshot-html-test
program compiled fromexamples/ExampleHtml.cpp
is renamed to<build>/examples/openshot-html-example
. All of the new unit test executables are named<build>/tests/openshot-<class>-test
, so the old name was destined to cause confusion.