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

Merge changes from xapi-project's fork #24

Closed
wants to merge 13 commits 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
28 changes: 0 additions & 28 deletions .docgen.sh

This file was deleted.

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: Main workflow

on:
- pull_request
- push

jobs:
build:
strategy:
fail-fast: false
matrix:
ocaml-version:
- 4.13.1
- 4.08.1

runs-on: ubuntu-latest

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

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

- run: opam install . --deps-only --with-doc --with-test

- run: opam exec -- dune build

- run: opam exec -- dune runtest
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
_build
setup.data
setup.log
*.native
*.byte
*.docdir
.merlin
*.install
.coverage/
.gh-pages/
9 changes: 9 additions & 0 deletions .ocamlformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
profile=ocamlformat
indicate-multiline-delimiters=closing-on-separate-line
if-then-else=fit-or-vertical
dock-collection-brackets=true
break-struct=natural
break-separators=before
break-infix=fit-or-vertical
break-infix-before-func=false
sequence-blank-line=preserve-one
30 changes: 20 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
language: c
sudo: required
dist: trusty
branches:
only: master
os: linux
dist: xenial
install:
- wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh
- wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travisci-skeleton/docgen/.travis-docgen.sh
- wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travis-coveralls/master/travis-coveralls.sh
script: bash -ex .travis-opam.sh && bash -ex .travis-docgen.sh && bash -ex travis-coveralls.sh
- wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
jobs:
include:
- env: OCAML_VERSION=4.08
- env: OCAML_VERSION=4.10
env:
global:
- OCAML_VERSION=4.02 TESTS=true
- COV_CONF="./configure --enable-tests"
- secure: jgNNAbrODFH0dyZLrXD/zSI/U4luCwalj/Lqoz3IRMXwscshmIQDcp0KCghh6s65qCuMDlVjVwM8Kn+wftY40HRuuf+XA6hMpH8Jmbr4Qi3l5EnotLS4AH/GWhu/nP3F3MbaML+kUgg0GeH19qZ4npteefhDcONxw6xtvIR/6rg=
- PACKAGE="pci"

deploy:
provider: pages:git
local_dir: $TRAVIS_BUILD_DIR/_build/default/_doc/_html
token: $GITHUB_TOKEN
keep_history: true
target_branch: gh_pages
on:
branch: master
condition: $OCAML_VERSION = 4.10
edge: true
52 changes: 11 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,49 +1,19 @@
# OASIS_START
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)

SETUP = ocaml setup.ml

build: setup.data
$(SETUP) -build $(BUILDFLAGS)

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
.PHONY: all test clean

all:
$(SETUP) -all $(ALLFLAGS)
dune build --profile=release

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
test:
dune runtest -p pci

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
install:
dune install pci

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
doc:
dune build -p pci @doc

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

configure:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP
gh-pages:
bash .docgen.sh

travis-coveralls.sh:
wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travis-coveralls/master/$@
dune clean

coverage: travis-coveralls.sh
bash $<
format:
dune build @fmt --auto-promote
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ The easiest way to install this library is to use `opam`:
However, if you don't use `opam`, you can compile from source by cloning this
repo and executing the usual dance:

./configure
make
make install

Expand Down
78 changes: 0 additions & 78 deletions _oasis

This file was deleted.

84 changes: 0 additions & 84 deletions _tags

This file was deleted.

12 changes: 0 additions & 12 deletions bindings/META

This file was deleted.

4 changes: 4 additions & 0 deletions bindings/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name pci_bindings)
(public_name pci.bindings)
(libraries ctypes.stubs ctypes ctypes.foreign threads))
Loading