Skip to content

Commit 3db996f

Browse files
committed
Add matrix testing to GitHub Actions CI
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.
1 parent c70b172 commit 3db996f

3 files changed

Lines changed: 31 additions & 533 deletions

File tree

.github/workflows/ci-macvim.yaml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
env:
88
MACOSX_DEPLOYMENT_TARGET: 10.9
99

10+
CC: clang
11+
CONFOPT: "--with-features=huge --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-gui=macvim --with-macarchs=x86_64"
12+
1013
VERSIONER_PERL_VERSION: 5.18
1114
VERSIONER_PYTHON_VERSION: 2.7
1215
vi_cv_path_python: /usr/bin/python
@@ -17,23 +20,38 @@ env:
1720
vi_cv_dll_name_python: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
1821
vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/3.9/Python
1922
vi_cv_dll_name_ruby: /usr/local/opt/ruby/lib/libruby.dylib
23+
LANGOPT: "--enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local"
2024

2125
VIMCMD: src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
2226
MACVIM_BIN: src/MacVim/build/Release/MacVim.app/Contents/MacOS/MacVim
2327

24-
CONFOPT: "--with-features=huge --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-gui=macvim --with-macarchs=x86_64"
25-
LANGOPT: "--enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local"
26-
2728
HAS_GETTEXT: 1
2829

29-
BASH_SILENCE_DEPRECATION_WARNING: 1
3030
TERM: xterm
31+
BASH_SILENCE_DEPRECATION_WARNING: 1
3132

3233
jobs:
3334

3435
# Builds and test MacVim
3536
build:
36-
runs-on: macos-latest
37+
38+
# Test on macOS 10.15 / 11.0, and also older version of Xcode for compatibility testing.
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
xcode: ['']
43+
os: [macos-10.15, macos-11.0]
44+
include:
45+
- os: macos-10.15
46+
xcode: 11.7
47+
- os: macos-10.15
48+
xcode: ''
49+
publish: true
50+
51+
runs-on: ${{ matrix.os }}
52+
53+
env:
54+
XCODE_VER: ${{ matrix.xcode }}
3755

3856
steps:
3957
- uses: actions/checkout@v2
@@ -89,6 +107,11 @@ jobs:
89107
set -o errexit
90108
set -o verbose
91109
110+
if [[ -n "${XCODE_VER}" ]]; then
111+
sudo xcode-select -s /Applications/Xcode_${XCODE_VER}.app/Contents/Developer
112+
fi
113+
xcode-select -p
114+
92115
./configure ${CONFOPT} ${LANGOPT} --enable-fail-if-missing
93116
sed -i.bak -f ci/config.mk.sed -f ci/config.mk.clang.sed src/auto/config.mk
94117
# Ruby is keg-only in Homebrew, so need to manually link in the path so Vim will know where to look for the binaries.
@@ -155,14 +178,14 @@ jobs:
155178
# do it manually, for two reasons: 1) signing / notarization are currently done out of CI, 2) we want to manually
156179
# format our release notes and add pictures to make them look nice.
157180
- name: Build MacVim dmg image
158-
if: startsWith(github.ref, 'refs/tags/')
181+
if: startsWith(github.ref, 'refs/tags/') && matrix.publish
159182
run: |
160183
# Use the --skip-jenkins flag to skip the prettify osascript calls which could fail due to permission issues in
161184
# CI environment.
162185
make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
163186
164187
- name: Upload MacVim image
165-
if: startsWith(github.ref, 'refs/tags/')
188+
if: startsWith(github.ref, 'refs/tags/') && matrix.publish
166189
uses: actions/upload-artifact@v2
167190
with:
168191
name: MacVim.dmg

0 commit comments

Comments
 (0)