Skip to content

Commit af3b653

Browse files
committed
CI: Update to Xcode 15 / macOS 13 in GitHub runner
Python2 - Python2 is no longer installed in the new GitHub hosted runners (macos-13) and so we need to manually download the installer from Python's website and install it. Since it seems to run quite fast, not caching the folder fow now. - Had to change the default Python2 dynamic lib location to /Library/Framework/... which is where the installer installs to. - Should warn users that Python2 support could be removed in the future. Lua - Previously dynamic lib loading implicitly relied on being able to find the lib from /usr/local/lib. Somehow Xcode 15 removed support for that folder when using dlopen(). Modified CI and configure script to allow manually specifying it. Xcode / Legacy build - GitHub's macos-13 image does not have Xcode 14.0.1 installed. This is the version we need for building legacy builds (targeting macOS 10.9 - 10.12). As such, we need to keep using macos-12 for building legacy builds. Hopefully it won't be deprecated soon as we would need to investigate options for how to build legacy builds. Fix deprecated C functions using old style declarations to handle new compiler warnings.
1 parent c83901a commit af3b653

File tree

4 files changed

+50
-34
lines changed

4 files changed

+50
-34
lines changed

.github/workflows/ci-macvim.yaml

+17-11
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ env:
2222

2323
VERSIONER_PERL_VERSION: '5.30' # macOS default Perl installation uses this to determine which one to use
2424

25-
vi_cv_path_python: /usr/local/bin/python
25+
vi_cv_path_python: /Library/Frameworks/Python.framework/Versions/2.7/bin/python
2626
vi_cv_path_python3: /usr/local/bin/python3
2727
vi_cv_path_plain_lua: /usr/local/bin/lua
2828
vi_cv_path_ruby: /usr/local/opt/ruby/bin/ruby
2929
vi_cv_dll_name_perl: /System/Library/Perl/%s/darwin-thread-multi-2level/CORE/libperl.dylib
30-
vi_cv_dll_name_python: /usr/local/Frameworks/Python.framework/Versions/2.7/Python
30+
vi_cv_dll_name_python: /Library/Frameworks/Python.framework/Versions/2.7/Python
3131
vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/Current/Python
3232
vi_cv_dll_name_python3_arm64: /opt/homebrew/Frameworks/Python.framework/Versions/Current/Python
3333
vi_cv_dll_name_ruby: /usr/local/opt/ruby/lib/libruby.dylib
3434
vi_cv_dll_name_ruby_arm64: /opt/homebrew/opt/ruby/lib/libruby.dylib
35+
vi_cv_dll_name_lua: /usr/local/lib/liblua.dylib
3536
vi_cv_dll_name_lua_arm64: /opt/homebrew/lib/liblua.dylib
3637

3738
MACVIM_APP: src/MacVim/build/Release/MacVim.app
@@ -63,8 +64,8 @@ jobs:
6364
publish_postfix: '_10.9'
6465

6566
# Most up to date OS and Xcode. Used to publish release for the main build.
66-
- os: macos-12
67-
xcode: '14.2'
67+
- os: macos-13
68+
xcode: '15.0'
6869
publish: true
6970

7071
runs-on: ${{ matrix.os }}
@@ -129,12 +130,6 @@ jobs:
129130
brew install ruby
130131
brew install lua
131132
132-
# CI sometimes have custom installed Python instead of using Homebrew. Forcefully re-
133-
# link Python, and then check that we are using the Homebrew version. This avoids us
134-
# using a mystery Python installation that we don't control.
135-
brew unlink python3 && brew link --overwrite python3
136-
readlink -f $vi_cv_path_python3 | grep "^$(brew --cellar python3)"
137-
138133
if [[ -d /usr/local/Cellar/perl ]]; then
139134
# We just use system perl to reduce dependencies
140135
brew unlink perl
@@ -143,6 +138,17 @@ jobs:
143138
# With Perl, we need to manually specify the version number because the dylib path depends on it.
144139
echo "vi_cv_dll_name_perl=$(printf $vi_cv_dll_name_perl $VERSIONER_PERL_VERSION)" >> $GITHUB_ENV
145140
141+
# New runner images (macos-13) no longer have Python2 installed. We
142+
# need to install Python2 manually. Installing from the official
143+
# installer is the easiest way as Homebrew no longer ships python@2
144+
# and this way does not invole manual building from source. We
145+
# mostly only need the headers to build a dynamic build anyway.
146+
#
147+
# This will be removed in the future as Python2 has been completely
148+
# unsupported for years.
149+
curl https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.9.pkg -o ~/Downloads/python-2.7.16-macosx10.9.pkg
150+
sudo installer -pkg ~/Downloads/python-2.7.16-macosx10.9.pkg -target /
151+
146152
# All set up steps are done. Build and test MacVim below.
147153

148154
- name: Configure
@@ -273,7 +279,7 @@ jobs:
273279
macvim_excmd -c 'lang es_ES' -c 'version' | grep Enlazado
274280
275281
# Check that libsodium is working
276-
macvim_excmd -c 'set cryptmethod=xchacha20'
282+
macvim_excmd -c 'set cryptmethod=xchacha20v2'
277283
278284
# Make sure we are building universal x86_64 / arm64 builds and didn't accidentally create a thin app.
279285
check_arch() {

src/auto/configure

+15-9
Original file line numberDiff line numberDiff line change
@@ -6001,17 +6001,23 @@ printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_
60016001
done
60026002
sover=""
60036003
done
6004-
if test "X$sover" = "X"; then
6005-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004+
# MacVim change: allow client to provide their own vi_cv_dll_name_lua
6005+
# as at runtime Vim will not be able to find the dylib if it's in
6006+
# /usr/local/lib which is not automatically searched by dlopen()
6007+
# without a full path.
6008+
if test "Xvi_cv_dll_name_lua" = "X"; then
6009+
if test "X$sover" = "X"; then
6010+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60066011
printf "%s\n" "no" >&6; }
6007-
lua_ok="no"
6008-
vi_cv_dll_name_lua="liblua${luajit}.${ext}"
6009-
else
6010-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6012+
lua_ok="no"
6013+
vi_cv_dll_name_lua="liblua${luajit}.${ext}"
6014+
else
6015+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60116016
printf "%s\n" "yes" >&6; }
6012-
lua_ok="yes"
6013-
vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
6014-
fi
6017+
lua_ok="yes"
6018+
vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
6019+
fi
6020+
fi
60156021
fi
60166022
printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
60176023

src/configure.ac

+16-10
Original file line numberDiff line numberDiff line change
@@ -851,15 +851,21 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
851851
done
852852
sover=""
853853
done
854-
if test "X$sover" = "X"; then
855-
AC_MSG_RESULT(no)
856-
lua_ok="no"
857-
vi_cv_dll_name_lua="liblua${luajit}.${ext}"
858-
else
859-
AC_MSG_RESULT(yes)
860-
lua_ok="yes"
861-
vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
862-
fi
854+
# MacVim change: allow client to provide their own vi_cv_dll_name_lua
855+
# as at runtime Vim will not be able to find the dylib if it's in
856+
# /usr/local/lib which is not automatically searched by dlopen()
857+
# without a full path.
858+
if test "Xvi_cv_dll_name_lua" = "X"; then
859+
if test "X$sover" = "X"; then
860+
AC_MSG_RESULT(no)
861+
lua_ok="no"
862+
vi_cv_dll_name_lua="liblua${luajit}.${ext}"
863+
else
864+
AC_MSG_RESULT(yes)
865+
lua_ok="yes"
866+
vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
867+
fi
868+
fi
863869
fi
864870
AC_DEFINE(DYNAMIC_LUA)
865871
LUA_LIBS=""
@@ -4939,4 +4945,4 @@ dnl write output files
49394945
AC_CONFIG_FILES(auto/config.mk:config.mk.in)
49404946
AC_OUTPUT
49414947

4942-
dnl vim: set sw=2 tw=78 fo+=l:
4948+
dnl vim: set sw=2 tw=78 ts=8 fo+=l:

src/ex_cmds2.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ browse_save_fname(buf_T *buf)
156156
* "Save changes" dialog that conforms to the Apple HIG.
157157
*/
158158
int
159-
vim_dialog_save_changes(buf)
160-
buf_T *buf;
159+
vim_dialog_save_changes(buf_T *buf)
161160
{
162161
char_u buff[IOSIZE];
163162

@@ -183,8 +182,7 @@ vim_dialog_save_changes(buf)
183182
* dialog for the case of several modified buffers.
184183
*/
185184
int
186-
vim_dialog_save_all_changes(buf)
187-
buf_T *buf;
185+
vim_dialog_save_all_changes(buf_T *buf)
188186
{
189187
char_u buff[IOSIZE];
190188

0 commit comments

Comments
 (0)