Skip to content

Merge pull request #307 from Shougo/dependabot/github_actions/dot-git… #12

Merge pull request #307 from Shougo/dependabot/github_actions/dot-git…

Merge pull request #307 from Shougo/dependabot/github_actions/dot-git… #12

Workflow file for this run

name: GitHub CI
on:
push:
pull_request:
jobs:
unixlike:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
vim:
- v7.4
- v8.0.0000
- v8.1.0000
- v8.2.0000
- head
exclude:
- os: macos-latest
vim: v7.4
- os: macos-latest
vim: v8.0.0000
- os: macos-latest
vim: v8.1.0000
- os: macos-latest
vim: v8.2.0000
steps:
- uses: actions/checkout@v2
- name: Set up Vim
id: vim
uses: thinca/action-setup-vim@v1
with:
vim_version: ${{ matrix.vim }}
download: never
- name: Check Vim version
run: ${{ steps.vim.outputs.executable_path }} --version
- name: Set up vim-themis
uses: actions/checkout@v2
with:
repository: thinca/vim-themis
path: vim-themis
- name: Build
run: make
- name: Test
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable_path }}
timeout-minutes: 3
run: ./vim-themis/bin/themis
windows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler:
- msvc
- msys2
- cygwin
arch:
- amd64
- x86
include:
- os: windows-latest
compiler: msvc
arch: amd64
cpu: AMD64
- os: windows-latest
compiler: msvc
arch: x86
cpu: i386
- os: windows-2019
compiler: msys2
arch: amd64
msystem: MINGW64
- os: windows-2019
compiler: msys2
arch: x86
msystem: MINGW32
- os: windows-latest
compiler: cygwin
arch: amd64
- os: windows-latest
compiler: cygwin
arch: x86
steps:
- name: Initialize
shell: bash
run: |
git config --global core.autocrlf input
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >>$GITHUB_ENV
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
if: matrix.compiler == 'msys2'
with:
msystem: ${{ matrix.msystem }}
release: false
- uses: cygwin/cygwin-install-action@master
if: matrix.compiler == 'cygwin'
with:
platform: ${{ matrix.arch }}
packages: gcc-core,make,vim
- name: Set up Vim
id: vim
if: matrix.compiler != 'cygwin'
uses: thinca/action-setup-vim@v1
with:
arch: ${{ matrix.arch }}
- name: Set up vim-themis
uses: actions/checkout@v2
with:
repository: thinca/vim-themis
path: vim-themis
- name: Build (MSVC)
if: matrix.compiler == 'msvc'
shell: cmd
run: |
call "%VCVARSALL%" ${{ matrix.arch }}
nmake -f make_msvc.mak CPU=${{ matrix.cpu }} cflags=/MD
- name: Build (MSYS2)
if: matrix.compiler == 'msys2'
shell: msys2 {0}
run: mingw32-make
- name: Build (Cygwin)
if: matrix.compiler == 'cygwin'
shell: bash
run: make
- name: Test
if: matrix.compiler != 'cygwin'
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable_path }}
shell: cmd
timeout-minutes: 3
run: |
%THEMIS_VIM% --version
vim-themis\bin\themis
- name: Test (Cygwin)
if: matrix.compiler == 'cygwin'
env:
THEMIS_VIM: vim
shell: bash
timeout-minutes: 3
# Don't use mutliline strings here: which include CR at the end of each line so cause script errors.
run: ${THEMIS_VIM} --version && ./vim-themis/bin/themis
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/') && (matrix.compiler == 'msvc' || matrix.compiler == 'cygwin')
with:
name: lib
path: lib/vimproc_*.dll
release:
runs-on: ubuntu-latest
needs:
- unixlike
- windows
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/[email protected]
- name: Release
uses: softprops/action-gh-release@v1
with:
body: vimproc
files: lib/vimproc_*.dll