diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e23dee8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: build +run-name: Build Bam +on: [push] + +# Grant GITHUB_TOKEN the permissions required to make a Pages deployment +permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + +jobs: + build_matrix: + runs-on: ubuntu-latest + strategy: + matrix: + ocaml-compiler: [ + # OCaml LTS version + ocaml.4.14.1, + # ocaml-system for Fedora 39 + ocaml.5.0.0, + # ocaml-system for Archlinux + ocaml.5.1.0 + ] + steps: + - uses: actions/checkout@v4 + - name: setting up opam... + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + - name: Install dependencies + run: | + opam update + opam upgrade + opam install . --deps-only -t + - name: Build Bam + run: | + eval $(opam env) + dune build . + - name: Build documentation + run: | + eval $(opam env) + opam install odoc + dune build @doc + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v2 + with: + path: _build/default/_doc/_html + + - name: Deploy to GitHub pages + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action diff --git a/bam.opam b/bam.opam index a8d61fe..1cd1c9c 100644 --- a/bam.opam +++ b/bam.opam @@ -14,8 +14,8 @@ depends: [ "ocaml" "dune" {>= "3.7"} "pringo" - "stdlib" "odoc" {with-doc} + "tezt" {with-test} ] build: [ ["dune" "subst"] {dev} diff --git a/dune-project b/dune-project index a209eb5..5cf9d51 100644 --- a/dune-project +++ b/dune-project @@ -19,7 +19,7 @@ (name bam) (synopsis "A property-based testing library with internal shrinking") (description "A property-based testing allowing to define generators with internal shrinking easily") - (depends ocaml dune pringo stdlib) + (depends ocaml dune pringo (odoc :with-doc) (tezt :with-test)) (tags (test pbt shrinking internal))) @@ -27,7 +27,7 @@ (name tezt-bam) (synopsis "A short synopsis") (description "A longer description") - (depends ocaml dune bam mtime) + (depends ocaml dune tezt bam mtime (odoc :with-doc)) (tags (test tezt pbt shrinking internal bam))) diff --git a/tezt-bam.opam b/tezt-bam.opam index 296cf58..9c1c642 100644 --- a/tezt-bam.opam +++ b/tezt-bam.opam @@ -12,6 +12,7 @@ bug-reports: "https://github.com/username/reponame/issues" depends: [ "ocaml" "dune" {>= "3.7"} + "tezt" "bam" "mtime" "odoc" {with-doc}