Problem: Github build may fail if Ubuntu 20.04 is used. Installing rust is
not needed.
Solution: Specify ubuntu-18.04 instead of latest. Update "pip" instead of
installing rust. (Ozaki Kiichi, closes#7820)
This adds support for building MacVim as a fat binary (aka universal
app) for x86_64 / arm64 in CI.
The main challenge mostly lies in configuring the scripting language
default search paths for the libraries, and linking against gettext.
There are two possible approaches:
1. configure/build each arch completely separately, and then use `lipo`
to stitch them back together. This is pretty annoying to set up, and
kind of manual to do, and requires building the same thing twice,
which is not great.
2. Build once with `--with-macarchs="x86_64 arm64` flag, which is what
we do here.
gettext: Homebrew doesn't support fat binaries, and we also need to
build a custom x86 version of gettext to support down to macOS 10.9
anyway, so we manually download the bottle for arm64 gettext bottle, and
then stitch it with the x86 version to create a unified binary under
/usr/local/lib. This way we can just link against it in one go.
Scripting languages: Add new ifdef's to load different libs under
different architecture. Modify configure to support that (instead of
hacking a patch in during CI like Ruby). This means while on x86_64 it
will look under /usr/local/lib for Python 3, on arm64 it will look under
/opt/homebrew instead (this is the recommended path for Homebrew
installs for native arm64 packages). This new path is very specific to
Homebrew which is not ideal, but we could change this later and maybe
make the default search path logic for scripting languages smarter.
Note that since there is no arm64 in CI right now, this just builds the
app, but there will be no automatic testing to make sure it actually
works.
This is part of #1136.
Problem: Github actions: clang-11 handling suboptimal.
Solution: Separate step of installing clang-11. Get ubuntu release name
dynamically. (Ozaki Kiichi, closes#7514)
GitHub Actions runners choices are relatively limited, so do matrix
testing on the two OS versions they support, and Xcode 11 to test
compatibility with Catalina (10.15) SDKs.
Remove the standard Vim's CI file, to make it less confusing and to
prevent GitHub Actions from running it accidentally (the UI has the
ability to disable certain workflows but it seems a little buggy at
times).
Also fixed up how terminal Vim was linking against Carbon and Cocoa
which are unnecessary. It only needs AppKit for communicating between
MMBackend and the GUI.
Also switch to using clang to match what we had in Travis CI.
This is the initial work to migrate to Github Actions from Travis CI for
MacVim CI (see #1127). Sets up a MacVim-specific workflow that builds
and test MacVim, and also publishes built artifacts for releases.
Some notest on implementation:
- Testing is currently disabled as it seems to be failing on a few
tests.
- gettext is now custom built instead using the Homebrew version. The
latest versions of the binary were built with later SDKs and would
cause MacVim to not work in older macOS versions (10.13), see #1138.
To fix this, we need to manually build gettext with min SDK set to
10.9 (the current MacVim target) before we link it with MacVim. We do
this by copying the brew formula and manually patch in the min SDK and
then install from source.
- When publishing a build when a tag is pushed, simply have the workflow
publish a dmg artifact, instead of pushing it to the release like
Travis CI. Currently, releases are manual and requires offline
signing/notarization steps that are out of CI, and also release notes
formatting that also requires manual work. As such, there is no point
in automating releases other than building a dmg that we can then
sign and publish.
Features to add later:
- Test matrix. We should test on the available OS versions (currently
10.15 and 11.0) and also different Xcode / macOS SDKs to try catch
backwards compatibility issues.
- Enable testing once the tests are fixed.
Problem: MS-Windows: swap file test sometimes fails.
Solution: Use a more reliable way to change the process ID. When "timeout"
fails use "ping" to wait up to ten minutes. (Ken Takata,
closes#7365)
Problem: Not all tests are executed on Github Actions.
Solution: Copy "src" to "src2" earlier. Recognize "src2" in a couple more
places. Add two tests to the list of flaky tests. (Ken Takata,
closes#6798)