-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from JasonGross/gh-actions
Port CI from Travis to GH Actions
- Loading branch information
Showing
3 changed files
with
98 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters