Repository navigation
101 lines (94 loc) · 2.8 KB
/
Copy pathci.yml
File metadata and controls
101 lines (94 loc) · 2.8 KB
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
name: ci
on: [push, pull_request]
jobs:
opam:
strategy:
matrix:
include:
- os: ubuntu-latest
ocaml: 5
- os: ubuntu-latest
ocaml: 4
- os: ubuntu-latest
ocaml: 4.11.0
- os: macos-latest
ocaml: 4
- os: windows-latest
ocaml: 4
- os: ubuntu-24.04
ocaml: ocaml-variants.5.5.1+options,ocaml-option-static
static: true
- os: ubuntu-24.04-arm
ocaml: ocaml-variants.5.5.1+options,ocaml-option-static
static: true
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml }}
- run: opam install -y --deps-only .
- run: opam exec -- dune build -p luv
if: ${{ !matrix.static }}
- run: opam exec -- dune runtest --profile release test/rewatch test/unit/pure test/unit/file
if: ${{ !matrix.static }}
- name: Link and run a static executable
if: matrix.static
run: |
opam pin add --yes --no-action --kind=path luv.0.5.14 .
opam install --yes luv ocamlfind
opam exec -- ocamlfind ocamlopt -thread -package luv,unix -linkpkg \
-ccopt -static -o watcher test/rewatch/watcher.ml
file watcher | grep 'statically linked'
./watcher
old-libuv:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.14.x
- run: opam install -y --deps-only .
- run: git clone https://github.com/libuv/libuv.git
working-directory: ..
- run: |
git checkout v1.3.0
./autogen.sh
sh configure
make
sh libtool --mode install cp libuv.la $(pwd)
working-directory: ../libuv
- run: opam exec -- dune build -p luv
env:
LUV_USE_SYSTEM_LIBUV: yes
C_INCLUDE_PATH: ${{ github.workspace }}/../libuv/include
LIBRARY_PATH: ${{ github.workspace }}/../libuv
# esy builds are broken due to an upstream bug that is not worth working
# around in luv, but should be fixed in esy:
#
# https://github.com/esy/esy/issues/1440
#
# esy:
# strategy:
# matrix:
# os:
# - ubuntu-latest
# - macos-latest
# - windows-latest
# fail-fast: false
# runs-on: ${{ matrix.os }}
#
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - run: npm install esy
# - run: npx esy install
# - run: npx esy build