Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OCaml starter workflow #934

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions ci/ocaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: OCaml

on:
pull_request:
- branches: [$default-branch]
push:
- branches: [$default-branch]
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.08.x
- 4.09.x
- 4.10.x
- 4.11.x
- 4.12.x

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

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

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install dependencies
run: opam install . --deps-only --with-test

- name: Build
run: opam exec -- dune build

- name: Run tests
run: opam exec -- dune runtest
6 changes: 6 additions & 0 deletions ci/properties/ocaml.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "OCaml",
"description": "Build and test a OCaml project with opam.",
"iconName": "ocaml",
"categories": ["OCaml"]
}