From 70cb9e61374f1698cd5bcab0d7c6d79322a075c9 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Sat, 13 Jul 2024 14:35:14 +0900 Subject: [PATCH] Travis -> GitHub Actions Signed-off-by: Sora Morimoto --- .github/workflows/workflow.yml | 55 +++++++++++++++++++++++ .gitignore | 7 +-- .travis.yml | 81 ---------------------------------- Makefile | 7 --- dune-project | 25 ++++++++++- lwt_ssl.opam | 35 ++++++++------- 6 files changed, 100 insertions(+), 110 deletions(-) create mode 100644 .github/workflows/workflow.yml delete mode 100644 .travis.yml delete mode 100644 Makefile diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..efdee3b --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,55 @@ +name: Builds, tests & co + +on: + pull_request: + push: + schedule: + # Prime the caches every Monday + - cron: 0 1 * * MON + +permissions: read-all + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-compiler: + - "4.14" + - "5.2" + runs-on: ${{ matrix.os }} + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + - run: opam install . --deps-only + - run: opam exec -- dune build + + lint-doc: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: "5.2" + - uses: ocaml/setup-ocaml/lint-doc@v3 + + lint-opam: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: "5.2" + - uses: ocaml/setup-ocaml/lint-opam@v3 diff --git a/.gitignore b/.gitignore index ae708df..9495805 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -_build/ -.merlin -*.install -_opam/ -scratch/ +/_build/ +/_opam/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cf6c45c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,81 +0,0 @@ -sudo: required - -language: generic - -matrix: - include: - - os: osx - env: COMPILER=4.10.0 - - os: linux - env: COMPILER=4.10.0 - - os: linux - env: COMPILER=4.09.0 - - os: linux - env: COMPILER=4.08.1 - - os: linux - env: COMPILER=4.07.1 - - os: linux - env: COMPILER=4.06.1 - - os: linux - env: COMPILER=4.05.0 - - os: linux - env: COMPILER=4.04.2 - - os: linux - env: COMPILER=4.03.0 - - os: linux - env: COMPILER=4.02.3 - -before_install: - - '[ "$TRAVIS_EVENT_TYPE" != cron ] || rm -rf ~/.opam ./_opam' - -install: - - | - case $TRAVIS_OS_NAME in - linux) - sudo apt-get update -qq - sudo apt-get install -qq libev-dev - OS=linux - ;; - osx) - brew update > /dev/null - brew install libev - OS=macos - ;; - esac - - - VERSION=2.0.6 - - FILENAME=opam-$VERSION-x86_64-$OS - - wget https://github.com/ocaml/opam/releases/download/$VERSION/$FILENAME - - sudo mv $FILENAME /usr/local/bin/opam - - sudo chmod a+x /usr/local/bin/opam - - - opam init -y --bare --disable-sandboxing --disable-shell-hook - - | - if [ ! -d _opam/bin ] - then - rm -rf _opam - opam switch create . $COMPILER $REPOSITORIES --no-install - fi - - eval `opam config env` - - opam --version - - ocaml -version - - - opam install conf-libev - - opam install -y --deps-only . - -script: - - dune build - - opam lint - -before_cache: - - opam clean - -cache: - directories: - - $HOME/.opam - - ./_opam - -notifications: - email: - on_success: always - on_failure: always diff --git a/Makefile b/Makefile deleted file mode 100644 index 5a3d657..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY : build -build : - dune build - -.PHONY : clean -clean : - dune clean diff --git a/dune-project b/dune-project index deebcb3..fc0705d 100644 --- a/dune-project +++ b/dune-project @@ -1,2 +1,25 @@ -(lang dune 1.0) +(lang dune 3.16) + (name lwt_ssl) + +(license "LGPL with OpenSSL linking exception") + +(authors "Jérôme Vouillon" "Jérémie Dimino") + +(maintainers "Anton Bachin ") + +(source + (github ocsigen/lwt_ssl)) + +(generate_opam_files true) + +(package + (name lwt_ssl) + (synopsis "OpenSSL binding with concurrent I/O") + (depends + ocaml + base-unix + (lwt + (>= 3.0.0)) + (ssl + (>= 0.5.13)))) diff --git a/lwt_ssl.opam b/lwt_ssl.opam index 175d243..dad31e2 100644 --- a/lwt_ssl.opam +++ b/lwt_ssl.opam @@ -1,28 +1,31 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" - synopsis: "OpenSSL binding with concurrent I/O" - -version: "dev" +maintainer: ["Anton Bachin "] +authors: ["Jérôme Vouillon" "Jérémie Dimino"] license: "LGPL with OpenSSL linking exception" homepage: "https://github.com/ocsigen/lwt_ssl" -doc: "https://github.com/ocsigen/lwt_ssl/blob/master/src/lwt_ssl.mli" bug-reports: "https://github.com/ocsigen/lwt_ssl/issues" - -authors: [ - "Jérôme Vouillon" - "Jérémie Dimino" -] -maintainer: "Anton Bachin " -dev-repo: "git+https://github.com/ocsigen/lwt_ssl.git" - depends: [ + "dune" {>= "3.16"} + "ocaml" "base-unix" - "dune" "lwt" {>= "3.0.0"} - "ocaml" "ssl" {>= "0.5.13"} + "odoc" {with-doc} ] - build: [ - ["dune" "build" "-p" name "-j" jobs] + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] ] +dev-repo: "git+https://github.com/ocsigen/lwt_ssl.git"