CI: Revise Neovim execution #121
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
vim_type: ['Vim', 'Neovim'] | |
version: ['head', 'stable', 'oldest'] | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
include: | |
- vim_type: 'Vim' | |
version: 'stable' | |
vim_version: 'v9.1.0000' | |
# minpac requires Vim v8.0.0050 or later. | |
- vim_type: 'Vim' | |
version: 'oldest' | |
vim_version: 'v8.0.0050' | |
exclude: | |
# minpac doesn't specify the oldest version for Neovim. | |
- vim_type: 'Neovim' | |
version: 'oldest' | |
# Oldest vim doesn't work on macOS any more. | |
- vim_type: 'Vim' | |
version: 'oldest' | |
os: 'macos-latest' | |
runs-on: '${{ matrix.os }}' | |
steps: | |
- name: 'Checkout' | |
uses: 'actions/checkout@v4' | |
- name: 'Setup Vim' | |
id: 'vim' | |
uses: 'thinca/action-setup-vim@v2' | |
with: | |
vim_version: '${{ matrix.vim_version || matrix.version }}' | |
vim_type: '${{ matrix.vim_type }}' | |
# download == 'available' is preferred, but it doesn't work well on | |
# Ubuntu with Vim. (Appimage versions of Vim cause troubles because | |
# it changes LD_LIBRARY_PATH.) | |
download: ${{ (matrix.vim_type == 'Vim' && matrix.os == 'ubuntu-latest') && 'never' || 'available' }} | |
- name: 'Run test (Windows)' | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
timeout-minutes: 5 | |
shell: cmd | |
run: | | |
rem # Show Vim version | |
${{ steps.vim.outputs.executable }} --version | |
rem # Set PATH for nmake | |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( | |
set InstallDir=%%i | |
) | |
if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" ( | |
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" amd64 | |
) | |
rem # Run the tests | |
cd test | |
if "${{ matrix.vim_type }}"=="Neovim" ( | |
rem # Neovim doesn't support the --not-a-term option. | |
set NO_PLUGINS=--noplugin | |
) | |
nmake -f Make_win.mak VIMPROG=${{ steps.vim.outputs.executable }} | |
- name: 'Run test (Unix)' | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
timeout-minutes: 5 | |
run: | | |
# Show Vim version | |
${{ steps.vim.outputs.executable }} --version | |
# Run the tests | |
cd test | |
if [ '${{ matrix.vim_type }}' = 'Neovim' ]; then | |
# Neovim doesn't support the --not-a-term option. | |
export NO_PLUGINS='--noplugin' | |
fi | |
make VIMPROG=${{ steps.vim.outputs.executable }} | |
# vim: sw=2 sts=2 et |