This repository was archived by the owner on Apr 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (46 loc) · 1.6 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2.3.4
- name: Cache OCaml's opam
uses: actions/cache@v2.1.5
with:
path: ~/.opam
key: ${{matrix.os}}-latest-ocaml-4.06.1
- name: Use OCaml
uses: avsm/setup-ocaml@v1.1.10
with:
ocaml-version: 4.06.1
- name: Use Node.js
uses: actions/setup-node@v2.1.5
with:
node-version: 14.4.0
- run: npm ci
# These 2 runs (or just the second?) are for when you have opam dependencies. We don't.
# Don't add deps. But if you ever do, un-comment these
# - run: opam pin add rescript-editor-support.dev . --no-action
# - run: opam install . --deps-only --with-doc --with-test
- run: eval $(opam env) && make test
if: matrix.os != 'windows-latest'
# CI windows running the binary somehow stucks. Not sure why. Disable for now.
- run: "& $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make"
if: matrix.os == 'windows-latest'
# Also avoids artifacts upload permission loss:
# https://github.com/actions/upload-artifact/tree/ee69f02b3dfdecd58bb31b4d133da38ba6fe3700#permission-loss
- name: Compress files
run: tar -cvf rescript-editor-support.tar -C lib rescript-editor-support.exe
- uses: actions/upload-artifact@v2
with:
name: ${{matrix.os}}-rescript-editor-support.exe
path: rescript-editor-support.tar