File: workflow.yml

package info (click to toggle)
ocaml-spawn 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: ansic: 569; ml: 374; makefile: 22
file content (72 lines) | stat: -rw-r--r-- 1,920 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
63
64
65
66
67
68
69
70
71
72
name: Main workflow

on:
  pull_request:
  push:
  schedule:
    - cron: 0 1 * * MON

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  Tests:
    strategy:
      fail-fast: false
      matrix:
        # We test:
        # - once for each architecture with the latest OCaml
        # - once for a few older versions of OCaml under Linux
        os: [macos-11, macos-12, ubuntu-latest, windows-latest]
        ocaml: [4.14.0]
        include:
          - {os: ubuntu-latest, ocaml: 4.13.1}
          - {os: ubuntu-latest, ocaml: 4.10.0}
          - {os: ubuntu-latest, ocaml: 4.09.1}
          - {os: ubuntu-latest, ocaml: 4.08.1}
          # Allow tests to fail on Windows (ppx_expect is broken):
          - {os: windows-latest, allow-failure: true}

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

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

      - name: Setup OCaml ${{ matrix.ocaml-version }}
        uses: ocaml/setup-ocaml@v2
        with:
          cache-prefix: v1-${{ matrix.os }}-${{ matrix.ocaml }}
          dune-cache: true
          ocaml-compiler: ${{ matrix.ocaml }}

      - name: Build dependencies
        run: opam exec -- ocaml .github/workflows/ci.ml build

      - name: Run test suite
        run: opam exec -- ocaml .github/workflows/ci.ml test
        continue-on-error: ${{ matrix.allow-failure || false }}

  Format:
    strategy:
      matrix:
        include:
         - ocaml: 4.13.1
           os: ubuntu-latest

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

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

      - name: Setup OCaml ${{ matrix.ocaml }}
        uses: ocaml/setup-ocaml@v2
        with:
          cache-prefix: v1-${{ matrix.os }}-${{ matrix.ocaml }}
          dune-cache: true
          ocaml-compiler: ${{ matrix.ocaml }}

      - name: Check that source is well formatted
        uses: ocaml/setup-ocaml/lint-fmt@v2