-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: experimental unified configuration with server-bundling
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: CN LSP CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Cancel in-progress job when a new push is performed | ||
concurrency: | ||
group: ci-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
node-version: [21.7.3] | ||
ocaml-version: [5.1.1] | ||
os: [ubuntu-22.04] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
# Build server | ||
|
||
- name: Set up OCaml | ||
uses: ocaml/setup-ocaml@v3 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-version }} | ||
|
||
- name: Install dependencies | ||
run: opam install . --deps-only --locked -y | ||
|
||
- name: Build | ||
run: eval $(opam env) && dune build | ||
|
||
- name: Run tests | ||
run: eval $(opam env) && dune test | ||
|
||
# Build client | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install client dependencies | ||
working-directory: ./cn-client | ||
run: npm install | ||
|
||
- name: Build client | ||
working-directory: ./cn-client | ||
run: npm run compile | ||
|
||
# Distribute client | ||
|
||
- name: Compile client .vsix | ||
working-directory: ./cn-client | ||
run: | | ||
cp ../_opam/bin/cn-lsp-server cn-lsp-server | ||
cp -r ../_opam/lib/cerberus/runtime cerb-runtime | ||
npm run dist | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cn-client | ||
path: cn-client/cn-client-*.vsix |