Skip to content

Commit

Permalink
Merge pull request #237 from JasonGross/gh-actions
Browse files Browse the repository at this point in the history
Port CI from Travis to GH Actions
  • Loading branch information
JasonGross authored Apr 17, 2021
2 parents 07e40b2 + b3246d9 commit c5a609d
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 84 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI

on:
push:
branches:
- v8.8
- v8.9
- v8.10
- v8.11
- v8.12
- v8.13
pull_request:
branches:
- v8.8
- v8.9
- v8.10
- v8.11
- v8.12
- v8.13

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
matrix:
ocaml-version: [4.07.1, 4.08.1, 4.09.1, 4.10.1, 4.11.1]
test-target: [test]
extra-opam: ["coq.8.13.0 coq-mathcomp-ssreflect"]
include:
- ocaml-version: 4.07.1+32bit
test-target: js-dune
extra-opam: coq.8.13.0 js_of_ocaml js_of_ocaml-lwt zarith_stubs_js
- ocaml-version: 4.11.1
test-target: test
extra-opam: dune
coq-from-git: true
env:
OPAMJOBS: "2"
OPAMROOTISOK: "true"
OPAMYES: "true"
NJOBS: "2"
COQ_REPOS: "https://github.com/coq/coq.git"
COQ_VERSION: "v8.13"
COQ_BRANCH: "v8.13"
COQ_CONF: "-local -native-compiler no -coqide no"
COMPILER: ${{ matrix.ocaml-version }}
EXTRA_OPAM: ${{ matrix.extra-opam }}
SERAPI_COQ_HOME: ""
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install apt dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get -o Acquire::Retries=30 update -q
sudo apt-get -o Acquire::Retries=30 install gcc-multilib libgmp-dev:i386 -y --allow-unauthenticated
- name: Set up OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}
- name: More OCaml setup
run: |
opam repos add coq-released http://coq.inria.fr/opam/released
opam config set-global jobs $NJOBS
opam pin add -y -n --kind=path coq-serapi .
opam install -y --deps-only -j $NJOBS coq-serapi
opam pin remove coq-serapi
- run: opam list
- name: Install Coq via git
if: ${{ matrix.coq-from-git }}
run: |
# First we update SERAPI_COQ_HOME for future steps as per https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
echo "SERAPI_COQ_HOME=$HOME/coq-$COQ_VERSION/_build/install/default/lib/" >> $GITHUB_ENV
eval $(opam env)
opam install -y zarith
git clone --depth=3 -b "$COQ_BRANCH" "$COQ_REPOS" "$HOME/coq-$COQ_VERSION"
pushd "$HOME/coq-$COQ_VERSION"
make -f Makefile.dune world
popd
PATH="$HOME/coq-$COQ_VERSION/_build/install/default/bin:$PATH"
git clone --depth=3 -b master https://github.com/math-comp/math-comp.git
pushd math-comp/mathcomp/ssreflect
make
make install
popd
- name: Install extra opam
run: opam install --ignore-constraints-on=coq $EXTRA_OPAM
- name: Build SerAPI
run: |
set -e
eval $(opam env)
make -j "$NJOBS" SERAPI_COQ_HOME="$SERAPI_COQ_HOME" "${{ matrix.test-target }}"
ls -lR _build/install/default/ || true
ls -lR _build/default/sertop/*.js || true
83 changes: 0 additions & 83 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,6 +1,6 @@
## SerAPI: Machine-Friendly, Data-Centric Serialization for Coq

[![Build Status](https://travis-ci.org/ejgallego/coq-serapi.svg?branch=v8.12)](https://travis-ci.org/ejgallego/coq-serapi) [![Gitter](https://badges.gitter.im/coq-serapi/Lobby.svg)](https://gitter.im/coq-serapi/Lobby)
[![Build Status](https://github.com/ejgallego/coq-serapi/actions/workflows/ci.yml/badge.svg?branch=v8.13)](https://github.com/ejgallego/coq-serapi/actions/workflows/ci.yml?query=branch%3Av8.13) [![Gitter](https://badges.gitter.im/coq-serapi/Lobby.svg)](https://gitter.im/coq-serapi/Lobby)

```
$ opam install coq-serapi
Expand Down

0 comments on commit c5a609d

Please sign in to comment.