-
Notifications
You must be signed in to change notification settings - Fork 21
141 lines (129 loc) · 5.36 KB
/
Copy pathinstall.yml
File metadata and controls
141 lines (129 loc) · 5.36 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Installability tests
# ====================
# Check the binary package install correctly on all supported
# platforms (and run the tests)
name: install
# Configure when to run the workflows. Currently only when
# it affects the `master` branch (either pushes to the branch,
# or pull request against it).
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Install workflow
# ================
# Goal: Ensure the packages install as separate packages
# using opam
install:
runs-on: ${{ matrix.os }}
# Build Matrix
# --------------
strategy:
# Do not cancel other jobs when one fails
fail-fast: false
matrix:
# Ocaml versions to use
# Also test flambda to make sure the installation time is reasonable
# Note that because on windows, switches have different names, we
# must do a bit of work manually to get a correct ocaml-version
#
# Note on deps and available packages:
# - dolmen_model -> farith -> ocaml >= 4.10
# - dolmen_lsp -> linol~0.8 -> ocaml >= 4.14
include:
# linux
- ocaml-version: ocaml-variants.4.14.4+options,ocaml-option-flambda
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.0.0
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.1.1
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.2.1
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.3.0
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.4.1
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.5.0
os: ubuntu-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
# macos
- ocaml-version: ocaml-variants.4.14.4+options,ocaml-option-flambda
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.0.0
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.1.1
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.2.1
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.3.0
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.4.1
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
- ocaml-version: ocaml-base-compiler.5.5.0
os: macos-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
# Windows
- ocaml-version: ocaml-variants.4.14.4+options,ocaml-option-flambda,system-mingw
os: windows-latest
pkgs: dolmen dolmen_type dolmen_loop dolmen_model dolmen_bin dolmen_lsp
# Build ENV
# ---------
env:
# Ensure opam will not stop because it waits on some user input
OPAMYES: "true"
# Build/test steps
# ----------------
steps:
# checkout the repo (full clone, necessary for push later)
- name: Checkout the repo
uses: actions/checkout@v3
# Setup ocaml/opam
- name: Setup ocaml/opam
uses: avsm/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
# Debug
- name: Debugging
run: opam switch list-available
if: always ()
# Run opam udpate to get an up-to-date repo
- name: Update opam repo
run: opam update
# For windows, pin to a git repo to avoid a problem with
# tar unable to correctly handle symlinks to directories in
# archives when they are in the wrong order
# The branch win32 also includes the patch for ocaml that comes from
# the mingw opam repo, cf
# https://github.com/fdopen/opam-repository-mingw/blob/opam2/packages/ocamlbuild/ocamlbuild.0.14.2/files/ocamlbuild-0.14.2.patch
- name: Pin ocamlbuild (windows-only)
run: opam pin add ocamlbuild https://github.com/Gbury/ocamlbuild.git#win32
if: matrix.os == 'windows-latest'
# Pin the local dolmen pkgs
- name: Pin Dolmen packages
run: opam pin . -n
# Install dependencies
- name: Install dependencies
run: opam install ${{ matrix.pkgs }} --deps-only --with-test --with-doc
# Install each package
- name: Install dolmen
run: opam install ${{ matrix.pkgs }} --with-test --with-doc
timeout-minutes: 20
# Ensure that installation does not take too long
# (particularly with regards to flambda)