-
Notifications
You must be signed in to change notification settings - Fork 133
190 lines (162 loc) · 4.46 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
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