Skip to content

Commit

Permalink
Merge pull request #162 from c-cube/update-ci
Browse files Browse the repository at this point in the history
CI: move to github actions
  • Loading branch information
mransan authored Jan 1, 2022
2 parents b029162 + 166339a commit 1a6d2ea
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 17 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: github pages

on:
push:
branches:
- master # Set a branch name to trigger deployment

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main

- name: Cache opam
id: cache-opam
uses: actions/cache@v2
with:
path: ~/.opam
key: opam-ubuntu-latest-4.12.0

- uses: avsm/setup-ocaml@v1
with:
ocaml-version: '4.12.0'

- name: Pin
run: opam pin -n .

- name: Depext
run: opam depext -yt qcheck-ounit qcheck-core qcheck

- name: Deps
run: opam install -d . --deps-only

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

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/default/_doc/_html/
destination_dir: dev
enable_jekyll: true
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run:
name: Build
strategy:
matrix:
os:
- ubuntu-latest
#- macos-latest
#- windows-latest
ocaml-compiler:
- 4.03.x
- 4.12.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam pin -n .
- run: opam depext -yt ocaml-protoc
- run: opam install -t . --deps-only
- run: opam exec -- dune build @install
- run: opam exec -- dune runtest
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ocaml-protoc
# ocaml-protoc [![build](https://github.com/mransan/ocaml-protoc/actions/workflows/main.yml/badge.svg)](https://github.com/mransan/ocaml-protoc/actions/workflows/main.yml)

> :dromedary_camel: **A [protobuf](https://goo.gl/YqNT7Q) compiler for OCaml :dromedary_camel:.**
Expand Down

0 comments on commit 1a6d2ea

Please sign in to comment.