Skip to content

CI: upload server binary #37

CI: upload server binary

CI: upload server binary #37

Workflow file for this run

name: CN Server 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:
ocaml-version: [4.14.1]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
- name: Restore `_opam`
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: _opam
key: ${{ matrix.ocaml-version }}
- name: Install server dependencies
working-directory: ./cn-lsp/server
run: |
eval $(opam env)
opam install . --deps-only --locked -y
- name: Cache `_opam`
if: steps.cache-opam-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: _opam
key: ${{ steps.cache-opam-restore.outputs.cache-primary-key }}
- name: Build server
working-directory: ./cn-lsp/server
run: |
eval $(opam env)
dune build
- name: Run server tests
working-directory: ./cn-lsp/server
run: |
eval $(opam env)
dune test
- name: Install server
# if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
working-directory: ./cn-lsp/server
run: |
eval $(opam env)
dune install
- name: Upload server binary
# if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
working-directory: ./cn-lsp/server
uses: actions/upload-artifact@v4

Check failure on line 76 in .github/workflows/server-ci.yml

View workflow run for this annotation

GitHub Actions / CN Server CI

Invalid workflow file

The workflow is not valid. .github/workflows/server-ci.yml (Line: 76, Col: 9): Unexpected value 'uses' .github/workflows/server-ci.yml (Line: 77, Col: 9): Unexpected value 'with'
with:
name: cn-lsp-server-${{ matrix.os }}
path: _build/install/default/bin/cn-lsp-server