CI: Refactor the matrix #109
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: 'mac-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" }}' | ||
Check failure on line 52 in .github/workflows/ci.yaml GitHub Actions / CIInvalid workflow file
|
||
- 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" ( | ||
nmake -f Make_win.mak VIMPROG=${{ steps.vim.outputs.executable }} NO_PLUGINS=--noplugin | ||
) else ( | ||
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 | ||
make VIMPROG=${{ steps.vim.outputs.executable }} NO_PLUGINS='--noplugin' | ||
else | ||
make VIMPROG=${{ steps.vim.outputs.executable }} | ||
fi | ||
# vim: sw=2 sts=2 et |