File: main.yml

package info (click to toggle)
ocaml-eio 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,548 kB
  • sloc: ml: 14,608; ansic: 1,237; makefile: 25
file content (62 lines) | stat: -rw-r--r-- 1,698 bytes parent folder | download
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
name: Main workflow

on:
  pull_request:
  push:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-latest
        ocaml-compiler:
          - 5
        local-packages:
          - eio eio_posix eio_main

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Use OCaml ${{ matrix.ocaml-compiler }}
        uses: ocaml/setup-ocaml@v3
        with:
          ocaml-compiler: ${{ matrix.ocaml-compiler }}
          opam-local-packages:
          opam-disable-sandboxing: true

      - run: opam --cli=2.1 pin -yn --with-version=dev .
      - run: opam install ${{ matrix.local-packages }} --deps-only --with-test
      - run: opam install ${{ matrix.local-packages }} --with-test
  windows:
    runs-on: windows-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set-up OCaml
        uses: ocaml/setup-ocaml@v3
        with:
          opam-pin: false
          ocaml-compiler: 5
      # --with-version=dev is not available, and --with-test also tries running tests for packages (like MDX) which fail...
      - run: | 
          opam pin -yn eio.dev .
          opam pin -yn eio_windows.dev .
          opam pin -yn eio_main.dev .
          opam install eio eio_windows eio_main --deps-only --with-test
      - run: opam exec -- dune build
      - run: opam exec -- dune runtest
      - run: opam exec -- dune exec -- ./examples/net/main.exe
      - run: opam exec -- dune exec -- ./examples/fs/main.exe
  docker:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build the Docker image
      run: docker build .