Skip to content

Commit

Permalink
Merge pull request #2 from ahrefs/martin/add-ci
Browse files Browse the repository at this point in the history
Setup GitHub actions for CI
  • Loading branch information
Khady authored Sep 4, 2023
2 parents 4c92a94 + f0a914a commit 5ccc734
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dune.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ocaml-sodium

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

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

- name: Set up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.13.1
dune-cache: true

- name: Install OCaml deps
run: opam install . --deps-only --with-test

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

- name: Test
run: opam exec -- dune runtest
2 changes: 1 addition & 1 deletion lib_test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(executable
(name test_sodium)
(libraries oUnit sodium)
(libraries ounit2 sodium)
(flags :standard -w -27))

(alias
Expand Down
8 changes: 4 additions & 4 deletions sodium.opam
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"ctypes" {>= "0.6.0"}
"ounit2" {with-test & >= "2.2.6"}
]
depexts: [
[ ["debian"] ["libsodium-dev"] ]
[ ["ubuntu"] ["libsodium-dev"] ]
[ ["freebsd"] ["security/libsodium"] ]
[ ["macos" "homebrew"] ["libsodium"] ]
["libsodium-dev"] {os-family = "debian"}
["security/libsodium"] {os-family = "freebsd"}
["libsodium"] {os-distribution = "homebrew" & os = "macos"}
]
post-messages: [
"This package requires installation of libsodium-dev (>= 1.0.9)"
Expand Down

0 comments on commit 5ccc734

Please sign in to comment.