Merge pull request #144 from gridbugs/fix-flat-float-array-from-f32-vec #434
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
run: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
ocaml-compiler: | |
[ | |
"5.0.0", | |
"4.14.1", | |
"4.13.1", | |
"4.12.1", | |
"4.11.0", | |
"4.10.0", | |
] | |
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@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- 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 |