-
Notifications
You must be signed in to change notification settings - Fork 17
128 lines (117 loc) · 4.27 KB
/
install.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
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
# 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
include:
# linux
- ocaml-version: ocaml-base-compiler.4.10.1
os: ubuntu-latest
- ocaml-version: ocaml-base-compiler.4.11.2
os: ubuntu-latest
- ocaml-version: ocaml-base-compiler.4.12.1
os: ubuntu-latest
- ocaml-version: ocaml-base-compiler.4.13.1
os: ubuntu-latest
- ocaml-version: ocaml-base-compiler.4.14.0
os: ubuntu-latest
- ocaml-version: ocaml-variants.4.14.0+options,ocaml-option-flambda
os: ubuntu-latest
- ocaml-version: ocaml-base-compiler.5.0.0
os: ubuntu-latest
# macos
- ocaml-version: ocaml-base-compiler.4.10.1
os: macos-latest
- ocaml-version: ocaml-base-compiler.4.11.2
os: macos-latest
- ocaml-version: ocaml-base-compiler.4.12.1
os: macos-latest
- ocaml-version: ocaml-base-compiler.4.13.1
os: macos-latest
- ocaml-version: ocaml-base-compiler.4.14.0
os: macos-latest
- ocaml-version: ocaml-variants.4.14.0+options,ocaml-option-flambda
os: macos-latest
- ocaml-version: ocaml-base-compiler.5.0.0
os: macos-latest
# Windows
- ocaml-version: ocaml-variants.4.10.1+mingw64c
os: windows-latest
- ocaml-version: ocaml-variants.4.11.2+mingw64c
os: windows-latest
- ocaml-version: ocaml-variants.4.12.1+mingw64c
os: windows-latest
- ocaml-version: ocaml-variants.4.13.1+mingw64c
os: windows-latest
- ocaml-version: ocaml-variants.4.14.0+mingw64c
os: windows-latest
- ocaml-version: ocaml-variants.4.14.0+flambda+mingw64c
os: windows-latest
# 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@v2
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'
# Install dependencies
- name: Install dependencies
run: opam install . --deps-only --with-test --with-doc
# Install each package
- name: Install dolmen
run: opam install . --with-test --with-doc
timeout-minutes: 20
# Ensure that installation does not take too long
# (particularly with regards to flambda)