* It is only partially covered by CI and doesn't simplify the build process
much for users. Replacing it in CI with just build-osx.sh significantly reduces
script complexity and is fully tested.
* bootstrap-osx.sh copying system libs and headers locally is unneeded.
Already the DMG file contains them, and re-linking the app against
updated system files may be desirable.
* Update INSTALL.md for macOS to use brewfile, use common dependency build
scripts, and use cmake rather than wrapper scripts.
* Build macOS in Release mode in CI, for release artifact creation
* Don't copy all used libs into a local folder, macdeployerqt already
handles this for the dmg, and for local running of the app using the
system libs and relinking on update is desirable to avoid running out of
date dependencies unexpectedly.
Motiviation:
* Reproducing issues in CI is currently difficult
* Predicting issues in CI is currently difficult if you are not on
ubuntu 18.04
* Reproducing issues submitted from other distros is currently done by
creating a VM of that distro and building qtox for it locally
* Documentation for how to build on different distros is out of date
* Issues on non-ubuntu distributions are not caught by CI
* Cross compiling for windows locally is not trivial
* Iterating when working with custom build scripts is slow, scripts
don't necessarily support re-running without re-starting the docker
container and re-building qtox again
* Updating dependencies is a pain
Changes:
* docker-compose file has been added to the root of our repo.
After `docker compose run --rm ubuntu` (or other supported distros),
you are ready to compile and run qtox
* Dependencies are owned by dependency install scripts in buildscripts/.
This allows us to use the same exact dependencies in our
OSX/windows/linux scripts
* New docker images have been added for a variety of distributions.
These are now run in CI in a variety of configurations
* Docker images are cached in CI so rebuild time for the majority of
jobs is quite quick
* Build scripts have been trimmed to leverage state of docker
containers.
* Windows build script no longer installs anything, dependencies are
now managed by the windows_builder docker images
* Build scripts should now be easily re-runnable. Usage is now `docker
compose run --rm <image>` and then run the scripts
* All artifacts are now uploaded to github after build, this means we
can take an appimage/flatpak/exe/dmg for any given PR and try it out
without having to build it ourselves
Notes:
* Docker image size is quite important. We have a maximum of 5GB cache
space on github actions. The majority of the linux distro docker
images cache at ~300-400MB, which gives us room to test ~6 distros
after accounting for the sizes of flatpak/windows docker images
* Docker layer ordering is relatively intentional. Approximate order
should be that large dependencies that change infrequently should be
farther up. This lowers the amount of rebuilding we have to do when
dependencies are updated
* download_xxx.sh scripts are the cleanest way I could find to implement
a shared dependency map between osx scripts and docker containers.
Although it would be nice to have a single dependency mapping file,
splitting it into individual scripts allows us to only rebuild some
docker layers when dependencies are updated.
* Github actions are split between docker image building and docker
image use. This allows us to re-use the same docker images for
multiple jobs, but only build it once
* Unfortunately I could not find a way to de-duplicate the stitching
between jobs, so we have a lot of copy pasta in that area
https://github.com/qTox/qTox/pull/5866 both updated our travis xcode version,
and also added the dots in 8e597ed736. When macOS
was updated by Apple, older versions aged out of support, and brew also stopped
supporting them. Our travis xcode9.2 at the time stopped getting binary
packages (kegs) from brew because of that, and started having to compile
packages which is what was causing the timeouts.
Updating our xcode version allowed us to get binary packages from brew again,
so the workaround of constant output to avoid timing out while compiling large
packages is no longer needed.
(cherry picked from commit db1397d69c)
https://github.com/qTox/qTox/pull/5866 both updated our travis xcode version,
and also added the dots in 8e597ed736. When macOS
was updated by Apple, older versions aged out of support, and brew also stopped
supporting them. Our travis xcode9.2 at the time stopped getting binary
packages (kegs) from brew because of that, and started having to compile
packages which is what was causing the timeouts.
Updating our xcode version allowed us to get binary packages from brew again,
so the workaround of constant output to avoid timing out while compiling large
packages is no longer needed.
NSCameraUsageDescription and NSMicrophoneUsageDescription are needed on
newer macOS versions (10.14+) to get access to camera/microphone. This
text is shown to the user when they need to press the "allow" button.
NSCameraUsageDescription and NSMicrophoneUsageDescription are needed on
newer macOS versions (10.14+) to get access to camera/microphone. This
text is shown to the user when they need to press the "allow" button.
ffmpeg dependency unbound attempts to symlink to /usr/local/sbin, failing if
the directory does not exist. /usr/local/sbin does not exist by default on
10.13 High Sierra, so prompt to create it if it doesn't exit, and create it for
travis CI automatically.
Fix#5515
brew install might take a long time to build Qt or ffmpeg. Travis kills us if
we don't output for 10 minutes. Travis also kills us if we output too much, so
verbose isn't an option. So just output some dots...