-
Notifications
You must be signed in to change notification settings - Fork 4
110 lines (96 loc) · 2.62 KB
/
coqpilot.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
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
coqlsppath: "coq-lsp"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
ocaml-compiler:
- "4.14"
runs-on: ${{ matrix.os }}
outputs:
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install opam dependencies
env:
OPAMYES: true
run: |
opam install coq-lsp.0.1.8+8.19
eval $(opam env)
- name: Opam eval
run: eval $(opam env)
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npm ci
- name: Check coq-lsp version
env:
OPAMYES: true
run: |
opam list coq-lsp
eval $(opam env)
which coq-lsp
- name: Check if coq-lsp is in PATH
run: |
eval $(opam env)
if ! command -v coq-lsp &> /dev/null
then
echo "coq-lsp could not be found"
fi
echo "coqlsppath=`which coq-lsp`" >> $GITHUB_ENV
shell: bash
- name: Test on Linux
env:
COQ_LSP_PATH: ${{ env.coqlsppath }}
run: xvfb-run -a npm run test-ci
if: runner.os == 'Linux'
- name: Test not on Linux
env:
COQ_LSP_PATH: ${{ env.coqlsppath }}
run: npm run test-ci
if: runner.os != 'Linux'
- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
- name: Upload Extension Package as Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ${{ steps.packageExtension.outputs.vsixPath }}
create-release:
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Dependencies
run: npm ci
- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
name: ubuntu-latest
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_ACCESS_TOKEN }}
extensionFile: ${{ needs.build.outputs.vsixPath }}
registryUrl: https://marketplace.visualstudio.com