Commit Graph

246 Commits

Author SHA1 Message Date
Yee Cheng Chin
444ff33fc7 Update Python3 from 3.10 to 3.11 in CI
Also, refactor CI configs to only specify the Python 3 and Perl versions
in one place, so we don't have to multiple lines in the config file.
Additionally, add checks to make sure the Homebrew Python 3 version
matches the configured one, so we will have a failed build and be
notified this way instead of silently building against an old version of
Python in CI, which would still work as GitHub CI has older versions of
Python installed.

Note that if https://github.com/vim/vim/pull/12032 is merged, this will
be less painful in the future as stable ABI should mean we don't have to
care as much about the exact Python version.
2023-07-09 03:06:18 -07:00
Yee Cheng Chin
aebdca4339 Fix legacy builds crashing in 10.9-10.11 by disabling clock_gettime
Recent Vim builds introduced the use of clock_gettime(), which on macOS
was only introduced in 10.12. In Vim, we added a configure check to
detect its existence (https://github.com/vim/vim/issues/12242) but it
only works to detect the build-time environment. For MacVim builds we
build on new machines but deploy on old machines by using
MACOSX_DEPLOYMENT_TARGET=10.9 when building. This means that the
configure script will detect clock_gettime() exists and includes it, but
at runtime the app will crash when running MacVim (legacy builds) in
10.9-10.11.

To fix this, add explicit checks to make sure we undef
HAVE_CLOCK_GETTIME if deployment target is below 10.12. Unfortunately
there isn't really a way to detect such things automatically in a
configure script as it requires knowledge of historical releases.
2023-07-06 01:17:00 -07:00
Yee Cheng Chin
1bf160678c Configure dmg builds to use newer APFS/LZFSE formats for non-legacy build
Use newer formats for creating the DMG file for distributing MacVim.
APFS has been supported fully since macOS 10.13, and from testing it
extracts faster than HFS+.

LZFSE (ULFO format) is newer than zlib/DEFLATE (UDZO format) and also
decompresses faster as well from testing. Note that there is a newer
compression scheme using LZMA (ULMO format) but it is only supported in
10.15+ which is too high for us as non-legacy builds need to target
10.13+. Also, from testing, the newer LZMA yields smaller files, but
takes more time to decompress than LZFSE.

Also, keeping using the old formats (HFS+/zlib) for legacy builds since
they need to work on 10.9, which don't support the newer formats.
2023-07-05 06:53:25 -07:00
Yee Cheng Chin
519b052cb6 Merge remote-tracking branch 'vim/master' 2023-06-05 09:27:03 -07:00
Philip H
7268e53996 patch 9.0.1562: mixing package managers is not a good idea
Problem:    Mixing package managers is not a good idea.
Solution:   Install gcc 13 with apt-get. (closes #12405)
2023-05-16 20:11:02 +01:00
Bram Moolenaar
b7398fe41c Update runtime files 2023-05-14 18:50:25 +01:00
Philip H
b6a19594b2 patch 9.0.1553: CI: using slightly outdated gcc version
Problem:    CI: using slightly outdated gcc version.
Solution:   Use "brew" to get a more recent gcc version.  (closes #12391)
2023-05-13 18:05:20 +01:00
Philip H
c416fd4ca8 patch 9.0.1552: CI: sound-dummy module is not installed
Problem:    CI: sound-dummy module is not installed.
Solution:   Invert using the result of the condition.  (closes #12394)
2023-05-13 17:46:10 +01:00
Christian Brabandt
ff40b625a6 patch 9.0.1548: CI: check in sound-dummy module may throw an error
Problem:    CI: check in sound-dummy module may throw an error.
Solution:   Check whether apt-cache can show the package description.
            (Christian Brabandt, closes #12390)
2023-05-13 11:54:47 +01:00
Philip H
12eb0f4ec5 patch 9.0.1547: Coveralls workflow on CI is commented out
Problem:    Coveralls workflow on CI is commented out.
Solution:   Remove the Coveralls workflow. (closes #12389)
2023-05-12 18:47:28 +01:00
Philip H
e741f039cf patch 9.0.1541: CI: sound dummy is disabled
Problem:    CI: sound dummy is disabled.
Solution:   Make sound dummy work again. (closes #12380)
2023-05-11 15:22:58 +01:00
Bram Moolenaar
5fc7959dcb patch 9.0.1536: CI: sound dummy stopped working
Problem:    CI: sound dummy stopped working.
Solution:   Temporarily stop using sound dummy.
2023-05-09 22:13:58 +01:00
ichizok
2f14716c46 patch 9.0.1489: crypt with libsodium is not tested on CI
Problem:    Crypt with libsodium is not tested on CI.
Solution:   Configure testing with libsodium. (Ozaki Kiichi, closes #12297)
2023-04-26 15:43:39 +01:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Yee Cheng Chin
6acaecf3d3 Merge remote-tracking branch 'vim/master' 2023-04-22 23:58:55 +08:00
Philip H
9be736f2eb patch 9.0.1474: CI runs with old version of Ubuntu and tools
Problem:    CI runs with old version of Ubuntu and tools.
Solution:   Update CI to more recent versions. (closes #11092)
2023-04-21 19:51:22 +01:00
ichizok
017227079f patch 9.0.1473: CI does not run sound tests
Problem:    CI does not run sound tests.
Solution:   Re-enable sound tests.  Use "apt-get" instead of "apt". (Ozaki
            Kiichi, closes #12280)
2023-04-21 17:46:57 +01:00
dependabot[bot]
e56324190e Bump actions/stale from 7 to 8
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 17:01:34 +00:00
Yee Cheng Chin
86af12a7ee Fix CI not handling Xcode version correctly with packages
In the CI setup, xcode-select is only called after the packages have
been set up, but during setup we actually need to build the packages
from source to have the correct deployment target linked correctly. This
means we could potentially be building with the wrong configuration
(e.g. when building for 10.9 legacy builds, we could be using an Xcode
version that's too new for that) when building gettext/libsodium. This
is compounded by the fact that our GitHub Action cache key for the
libraries only include the formula, but not the active Xcode version
itself so a cache could be propagated for a while until suddenly things
break.

To fix this, first make sure we do Xcode configuration early on in the
build, and to properly use the Xcode version as part of the cache key.
This way, when Xcode version changes, we will invalidate the cache and
rebuild gettext / libsodium with the correct configuration and if that's
wrong we will immediately fail the build instead of using old stale
caches.

Also, bump Xcode from 14.1 to 14.2 in CI.
2023-03-11 11:25:24 -08:00
Philip H
b0b6b8b07e patch 9.0.1384: setting HOMEBREW_NO_AUTO_UPDATE is not needed with version 4
Problem:    Setting HOMEBREW_NO_AUTO_UPDATE is not needed with Homebew version
            4.
Solution:   Remove setting HOMEBREW_NO_AUTO_UPDATE. (closes #12008)
2023-03-05 20:56:34 +00:00
Yee Cheng Chin
2ad242af68 Add security policy file / documentation
GitHub has a security tab that allows repos to manage their security
policy so it's not a bad idea ot be explicit in expectations. The policy
is to either use GitHub's builtin reporting system, or email MacVim's
team (in case that's the preferred method or the reporter does not want
to have a GitHub account). The most important thing is to not use the
public GitHub issue filing.

I don't think this will be used too much, but given that MacVim (and
Vim) can read arbitrary file, there is always a potential for a security
issue to pop up.
2023-03-04 02:06:40 -08:00
Yee Cheng Chin
e66dc30b50 Remove Homebrew no-auto-update env var from CI
With the release of Homebrew 4, auto-update is supposed to be more
efficient now. By removing the HOMEBREW_NO_AUTO_UPDATE env var from CI,
this will make sure that all the packages that we link to in CI will be
up to date instead of whatever just happens to be installed on the CI
environment which can sometimes fluctuate.
2023-02-27 22:25:08 -08:00
Yee Cheng Chin
8aaea5c54b Remove Sparkle.framework when configured with --disable-sparkle
Previously, when configured with `--disable-sparkle`, the
Sparkle.framework would still get linked and copied into the app bundle.
This is because Xcode doesn't have an easy way to disable individual
build phase. We would either have to make a new build target, or
dynamically patch the project file in order for that to not happen.
Package managers like Homebrew and Nix have to either manually delete
the framework as a post-build step, or manually patch the pbxproj file
as a pre-build step to make sure the framework never got linked/copied.

Also, when building MacVim on macOS 10.9-10.12, where Sparkle 2 is not
supported, even if you build with `--disable-sparkle`, the app still
wouldn't run since Sparkle 2's framework still got copied into the app
and on launch the OS will detect that it's not compatible with the OS
version.

To fix this, just add a new env var and have the build cleanup script
delete the entire Sparkle.framework as a post-build step, if
`--disable-sparkle` was previously configured.

One thing to note is that currently, even with this, the MacVim binary
still has a weak linking dependency to the non-existent
Sparkle.framework (can be seen by doing `otool -L
MacVim.app/Contents/MacOS/MacVim`) but it should be fine.  A proper way
to fix this is to manually link Sparkle instead of letting Xcode do it
for us, but considering that this is a relatively niche use case, and it
still works regardless, there isn't a pressing need to do so.

Also, add CI check to make sure when `--disable-sparkle` is used, the
actual MacVim binary has 0 references to Sparkle symbols. This makes
sure that removing the Sparkle.framework from the app bundle is actually
safe.
2023-02-27 13:42:15 -08:00
Philip H
43e234e8b4 patch 9.0.1289: a newer version of clang can be used for CI
Problem:    A newer version of clang can be used for CI.
Solution:   Switch from clang-15 to clang-16. (closes #11577)
2023-02-06 20:22:48 +00:00
Philip H
192e24d974 patch 9.0.1253: CI adds repository unnecessarily
Problem:    CI adds repository unnecessarily.
Solution:   Remove the line from the workflow. (closes #11900)
2023-01-28 10:43:50 +00:00
Yee Cheng Chin
2b7f6eeb16 Merge remote-tracking branch 'vim/master' 2023-01-17 23:04:10 -08:00
Bram Moolenaar
1b5f03ec9c Update runtime files 2023-01-09 20:12:45 +00:00
Yee Cheng Chin
41771954ae Merge remote-tracking branch 'vim/master' 2023-01-02 14:51:54 -08:00
Bram Moolenaar
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
Philip H
ef91ae4557 patch 9.0.1114: CI does not use the latest Python version
Problem:    CI does not use the latest Python version.
Solution:   Switch from Python 3.10 to 3.11. (closes #11761)
2022-12-30 17:41:17 +00:00
dependabot[bot]
c718a09483 Bump actions/stale from 6 to 7
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 16:05:49 +00:00
dundargoc
b5328b46a7 patch 9.0.1071: Codecov action version is too specific
Problem:    Codecov action version is too specific.
Solution:   Only use "v3" to automatically use the latest stable version.
            (closes #11720)
2022-12-17 15:47:45 +00:00
Bram Moolenaar
7db29e4b5c Update runtime files 2022-12-11 15:53:04 +00:00
Yee Cheng Chin
4b008ec2d9 Merge remote-tracking branch 'vim/master' 2022-12-04 19:21:20 -05:00
K.Takata
ad85af5b38 patch 9.0.0946: CI: Error in Coverity flow is not reported
Problem:    CI: Error in Coverity flow is not reported.
Solution:   Use another way to avoid errors in a forked repository. (Ken
            Takata, closes #11609)
2022-11-25 00:57:05 +00:00
Philip H
1273dfb015 patch 9.0.0941: CI failures in sound dummy
Problem:    CI failures in sound dummy.
Solution:   Temporarily disable building sound dummy. (closes #11610)
2022-11-24 15:15:08 +00:00
shane.xb.qian
e2da59851a patch 9.0.0937: forked repositories send out useless email
Problem:    Forked repositories send out useless email.
Solution:   When Coverity fails to run just ignore it. (Shane-XB-Qian,
            closes #11604)
2022-11-24 12:01:45 +00:00
Yee Cheng Chin
07ed537bda Merge remote-tracking branch 'vim/master' 2022-11-09 13:56:35 -08:00
Bram Moolenaar
76db9e0763 Update runtime files 2022-11-09 21:21:04 +00:00
K.Takata
80613d64e6 patch 9.0.0847: CI: not totally clear what MS-Windows version is used
Problem:    CI: not totally clear what MS-Windows version is used.
Solution:   Show the Windows version. (Ken Takata, closes #11524)
2022-11-09 16:12:47 +00:00
Yee Cheng Chin
789d22c659 Add CI / test checks to make sure we don't accidentally lose features
Add CI test to confirm desired Vim features like +sound / etc exist.

Smoketest also checks for libsodium now by trying to set xchacha20
cryptmethod which can only succeed if sodium is enabled. Also make sure
it's actually checking the scripting language bindings are working
properly. Previously for some reason it wasn't checking the print
results.
2022-11-05 12:25:21 -07:00
Yee Cheng Chin
6fa8ad48a8 Fix Sparkle 2 build error on older Xcode / fix sign/notarize scripts
Sparkle 2:

Seems like older Xcode versions (before 12.5) have problems signing
frameworks that only have a Versions/B but not a Versions/A folder.
Sparkle 2 moved to only having Versions/B which is causing code sign to
fail on build step. Just fix this issue by disabling Sign on Copy for
Sparkle.framework. We don't really need it because it already comes with
an ad-hoc signature anyway, and for publish we have a custom signing
script (sign-developer-id) to do manual signing.

Also, fix CI to use Sparkle 2 again for old Xcode (11.7) builds to test
this working. Previously we made it use Sparkle 1 because we didn't work
around this issue, which was kind of a hack.

For Sparkle 2, also add a `cleanup-after-build` script to remove the XPC
Services folder in the framework. Sparkle dev added this to the bundle
for sandboxed apps but non-sandbox apps don't really need it and it's
recommended by Sparkle to remove them, so we unfortunately need to
manually do it as a post-build step.

Fix #1335

Signing / notarization scripts:

Make sure to sign Sparkle 2 binaries in `sign-developer-id`. Also, seems
like the "--deep" flag in codesign is now deprecated as of macOS 13, so
just stop using it and manually sign all the relevant binaries
explicitly.

For notarization script, the current behavior doesn't correctly detect
failure as `xcrun notarytool submit` always exits with 0 even if the
submission failed. Add logic to manually query whether the submission
succeeded. If failed, print out the logs for easier diagnosis, and
exits with -1 so it will block progress.
2022-11-03 19:53:40 -07:00
Yee Cheng Chin
6dfa0da3b0 Set up CI to link against Sparkle 1 when in legacy builds
Add a configure flag to set the USE_SPARKLE_1 ifdef flag. In CI legacy
builds, we will relink the symlink to point to Sparkle_1.framework and
also call that configure flag so the code will build.
2022-11-02 15:22:50 -07:00
Yee Cheng Chin
88dc6f7a3e Merge pull request #1331 from ychin/split-ci-macos10.13-10.9-legacy
Set up CI to do split legacy build for macOS 10.9-10.12
2022-11-02 15:15:55 -07:00
Yee Cheng Chin
a988b6e5b0 Set up CI to do split legacy build for macOS 10.9-10.12
SDK for the new macOS 13 (released as part of Xcode 14.1) increased the
minimum deployed OS from 10.9 to 10.13. Since we still want to support
a minimum OS requirement of 10.9, while building against the latest SDK
to get the most up-to-date features, we have to split the build process
to build two separate binaries. A regular MacVim that targets the macOS
13 SDK (with min OS target 10.13), and a "legacy" MacVim that targets
the macOS 12 SDK (with min OS target 10.9).

Change the GitHub Action CI config to have two separate matrix entries
that publish, with one having a "legacy" flag set, which will use the
older version of Xcode and the correct env vars set. It will also only
build for x86-64 (no arm64) since currently all Apple Silicon hardware
can run the latest versions of macOS and would have no need to run
legacy builds.

Also, fix some scripting issues:

- fix Python 2 library path set incorrectly
- Update Perl to 5.30 from 5.18, as 5.18 is no longer installed in macOS
  13. We could potentially change Perl to use the Homebrew version
  instead similar to how Python and other scripting languages are done
  but for now this works fine (except it won't work on older macOS
  versions). Perl is a rarely used language for Vim plugins.

See https://github.com/macvim-dev/macvim/discussions/1288
2022-11-02 04:23:53 -07:00
Yee Cheng Chin
c0f8d07098 Merge remote-tracking branch 'vim/master' 2022-11-01 15:51:15 -07:00
Bram Moolenaar
6ebe4f970b Update runtime files 2022-10-28 20:47:54 +01:00
ichizok
c23024fe56 CI: Update the versions of actions 2022-10-17 08:07:19 +09:00
ichizok
bc88abff7c CI: Replace python 2.x framework
Use the offical python 2.x framework's path
2022-10-17 08:07:19 +09:00
Philip H
d094e580b0 patch 9.0.0773: huge build on macos uses dynamic Perl
Problem:    Huge build on macos uses dynamic Perl.
Solution:   Use built-in Perl, uninstall the brew one. (closes #11382)
2022-10-16 14:53:34 +01:00