-
Notifications
You must be signed in to change notification settings - Fork 31
69 lines (57 loc) · 1.61 KB
/
rust.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
name: Rust tests
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
run:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
ocaml-compiler:
[
"5.2.0",
"5.1.1",
"5.0.0",
"4.14.1",
"4.13.1",
"4.12.1",
#"4.11.2",
"4.10.2",
]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: OCaml/Opam cache
id: ocaml-rs-opam-cache
uses: actions/cache@v3
with:
path: "~/.opam"
key: ocaml-rs-opam-${{ matrix.ocaml-compiler }}-${{ matrix.os }}
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- if: matrix.os == 'macos-latest'
run: brew install zstd
- if: matrix.os == 'ubuntu-latest'
run: sudo apt install libzstd-dev
- name: Install mdbook
uses: baptiste0928/cargo-install@v2
with:
crate: mdbook
- name: Build
run: opam exec -- cargo build --example rust --features=link
- name: Build build
run: opam exec -- cargo build --package ocaml-build --features=dune
- name: Run Rust tests
run: opam exec -- cargo run --example rust --features=link
- name: Check mdbook
run: mdbook test doc -L ./target/debug/deps
- name: Test `no_std`
run: opam exec -- cargo build --features=no-std