forked from miking-lang/miking
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (80 loc) · 2.57 KB
/
main.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
name: Miking CI
on:
workflow_dispatch:
pull_request:
branches: [master, develop]
types: [opened, reopened, synchronize]
jobs:
build-and-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install OCaml and opam for Miking
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-base-compiler.5.0.0
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache opam packages
uses: actions/cache@v3
with:
path: ~/.opam
key: ${{ runner.os }}-opam-build
- name: Install opam packages
run: |
# Install dependencies of owl
sudo apt-get install -y liblapacke-dev libopenblas-dev
# Install all opam packages used in make test-all
opam install -y dune linenoise pyml toml lwt owl ocamlformat.0.24.1
- name: Build Miking
timeout-minutes: 10
run: |
eval $(opam env)
make install
- name: Run tests
timeout-minutes: 60
run: |
eval $(opam env)
make test-all
build-and-test-mac-os:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install OCaml and opam for Miking
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-base-compiler.5.0.0
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache opam packages
uses: actions/cache@v3
with:
path: ~/.opam
key: ${{ runner.os }}-opam-build
- name: Install opam packages
run: |
# Install dependencies of owl
brew install pkg-config
# Export environment variable needed by openblas
export PKG_CONFIG_PATH=$(brew --prefix openblas)/lib/pkgconfig
# Hack to fix installation of owl
ln -s $(brew --prefix gcc)/lib/gcc/current/libgcc_s.1.1.dylib $(brew --prefix openblas)/lib
ln -s $(brew --prefix gcc)/lib/gcc/current/libquadmath.0.dylib $(brew --prefix openblas)/lib
# Install all opam packages used in make test-all
opam install -y dune linenoise pyml toml lwt owl ocamlformat.0.24.1
- name: Build Miking
timeout-minutes: 10
run: |
eval $(opam env)
make install
- name: Run tests
timeout-minutes: 60
run: |
eval $(opam env)
make test-all