-
Notifications
You must be signed in to change notification settings - Fork 174
243 lines (209 loc) · 6.98 KB
/
build.yaml
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
jobs:
PythonLint:
runs-on: ubuntu-20.04
container: 'puremourning/vimspector:test-x86_64'
steps:
- uses: actions/checkout@v3
- name: 'Insatll requirements'
run: pip3 install --user -r dev_requirements.txt
- name: 'Run flake8'
run: '$HOME/.local/bin/flake8 python3/ *.py'
VimscriptLint:
runs-on: 'ubuntu-20.04'
container: 'puremourning/vimspector:test-x86_64'
steps:
- uses: actions/checkout@v3
- name: 'Install requirements'
run: pip3 install --user -r dev_requirements.txt
- name: 'Run vint'
run: $HOME/.local/bin/vint autoload/ compiler/ plugin/ tests/ syntax/
Linux:
runs-on: 'ubuntu-20.04'
container:
image: 'puremourning/vimspector:test-x86_64'
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
strategy:
fail-fast: false
matrix:
runtime:
- vim
- nvim
steps:
- uses: actions/checkout@v3
- name: 'Install requirements'
run: pip3 install --user -r dev_requirements.txt
- run: |
go install github.com/go-delve/delve/cmd/dlv@latest
name: 'Install Delve for Go'
- uses: actions/cache@v2
with:
key: v1-gadgets-${{ runner.os }}-${{ hashFiles( 'python3/vimspector/gadgets.py' ) }}
path: gadgets/linux/download
name: Cache gadgets
- run: ${{ matrix.runtime }} --version
name: 'Print vim version information'
# The git config --global thing here is wierd, but required because
# otherwise git says that the ownership (root) of the repo is "dubious" when
# run inside the build container. The checkoutv2 above _also_ runs the
# following command, but shrug.
- run: |
cd support/vimspector_process_list
git config --global --add safe.directory /__w/vimspector/vimspector
go build
name: 'Build the process lister'
- run: |
export GOPATH=$HOME/go
./run_tests --exe ${{ matrix.runtime }} --basedir $(pwd) --install --update --report messages --quiet
name: 'Run the tests'
id: run_tests
env:
VIMSPECTOR_MIMODE: gdb
- name: "Upload test logs"
uses: actions/upload-artifact@v2
if: always()
with:
name: 'test-logs-${{ runner.os }}-${{ matrix.runtime }}'
path: 'tests/logs/**/*'
- name: 'Package'
if: matrix.runtime == 'vim'
run: ./make_package linux ${{ github.run_id }}
# TODO: test the tarball
- name: "Upload package"
if: matrix.runtime == 'vim'
uses: actions/upload-artifact@v2
with:
name: 'package-linux'
path: 'package/linux-${{ github.run_id }}.tar.gz'
# - name: Start SSH session if failed
# uses: luchihoratiu/debug-via-ssh@main
# if: failure()
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
MacOS:
runs-on: 'macos-12'
strategy:
fail-fast: false
matrix:
runtime:
- vim
- nvim
steps:
- uses: actions/checkout@v3
- run: |
brew update-reset
brew doctor || true
brew cleanup || true
for p in vim go tcl-tk llvm lua luajit love neovim coreutils; do
brew install $p || brew outdated $p || brew upgrade $p
done
brew reinstall icu4c
brew link --overwrite python
brew link --overwrite vim
brew link --overwrite go
# latest neovim doesn't work on python 3.12
# https://github.com/neovim/pynvim/issues/538
pip3 install --user 'pynvim @ git+https://github.com/neovim/pynvim'
name: 'Install vim and deps'
- name: 'Install requirements'
run: pip3 install --user -r dev_requirements.txt
- run: go install github.com/go-delve/delve/cmd/dlv@latest
name: 'Install Delve for Go'
- run: |
cd support/vimspector_process_list
go build
name: 'Build the process lister'
- uses: actions/cache@v2
with:
key: v1-gadgets-${{ runner.os }}-${{ hashFiles( 'python3/vimspector/gadgets.py' ) }}
path: gadgets/macos/download
name: Cache gadgets
- name: 'Set up node 18'
uses: actions/setup-node@v3
with:
node-version: 18
- name: 'Install .NET Core SDK 6.0'
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- run: ${{ matrix.runtime }} --version
name: 'Print vim version information'
- run: |
./run_tests --exe ${{ matrix.runtime }} --basedir $(pwd) --install --update --report messages --quiet
name: 'Run the tests'
id: run_tests
env:
VIMSPECTOR_MIMODE: lldb
- name: "Upload test logs"
uses: actions/upload-artifact@v2
if: always()
with:
name: 'test-logs-${{ runner.os }}-${{ matrix.runtime }}'
path: 'tests/logs/**/*'
- name: 'Package'
if: matrix.runtime == 'vim'
run: ./make_package macos ${{ github.run_id }}
# TODO: test the tarball
- name: "Upload package"
if: matrix.runtime == 'vim'
uses: actions/upload-artifact@v2
with:
name: 'package-macos'
path: 'package/macos-${{ github.run_id }}.tar.gz'
# - name: Start SSH session if failed
# uses: luchihoratiu/debug-via-ssh@main
# if: failure() || cancelled()
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
PublishRelease:
runs-on: 'ubuntu-20.04'
needs:
- Linux
- MacOS
if: github.ref == 'refs/heads/master'
steps:
- name: 'Download artifacts'
id: download_artifacts
uses: actions/download-artifact@v2
- name: 'Create Release'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}
release_name: Build ${{ github.run_id }}
draft: false
prerelease: true
- name: 'Upload Linux Package'
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/package-linux/linux-${{ github.run_id }}.tar.gz
asset_name: vimspector-linux-${{ github.run_id }}.tar.gz
asset_content_type: application/gzip
- name: 'Upload MacOS Package'
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/package-macos/macos-${{ github.run_id }}.tar.gz
asset_name: vimspector-macos-${{ github.run_id }}.tar.gz
asset_content_type: application/gzip