From f9d8eb72201877e50d63e03e1e1d32bd6c60851b Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 22 Jul 2021 10:59:16 -0400 Subject: [PATCH] move to github actions --- .github/workflows/gh-pages.yml | 43 ++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 32 +++++++++++++++++++++++++ .travis.yml | 18 -------------- 3 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/gh-pages.yml create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..3d865eb --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,43 @@ +name: github pages + +on: + push: + branches: + - master # Set a branch name to trigger deployment + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + + - name: Cache opam + id: cache-opam + uses: actions/cache@v2 + with: + path: ~/.opam + key: opam-ubuntu-latest-4.12.0 + + - uses: avsm/setup-ocaml@v1 + with: + ocaml-version: '4.12.0' + + - name: Pin + run: opam pin -n . + + - name: Depext + run: opam depext -yt ezcurl ezcurl-lwt + + - name: Deps + run: opam install -d . --deps-only + + - name: Build + run: opam exec -- dune build @doc + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_build/default/_doc/_html/ + destination_dir: dev + enable_jekyll: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..28491c7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: build +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + run: + name: Build + strategy: + matrix: + os: + - ubuntu-latest + #- macos-latest + #- windows-latest + ocaml-compiler: + - 4.03.x + - 4.12.x + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + - run: opam pin -n . + - run: opam depext -yt ezcurl ezcurl-lwt + - run: opam install -t . --deps-only + - run: opam exec -- dune build + - run: opam exec -- dune runtest + if: ${{ matrix.os == 'ubuntu-latest'}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 97e6a85..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: c -install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-docker.sh -script: bash -ex .travis-docker.sh -services: -- docker -env: - global: - - PINS="ezcurl:. ezcurl-lwt:." - - DISTRO="ubuntu-16.04" - matrix: - - PACKAGE="ezcurl" OCAML_VERSION="4.03" - - PACKAGE="ezcurl-lwt" OCAML_VERSION="4.03" - #- PACKAGE="ezcurl-lwt" OCAML_VERSION="4.04" - #- PACKAGE="ezcurl-lwt" OCAML_VERSION="4.05" EXTRA_DEPS="base-bigarray" - - PACKAGE="ezcurl-lwt" OCAML_VERSION="4.06" - - PACKAGE="ezcurl" OCAML_VERSION="4.07" - - PACKAGE="ezcurl-lwt" OCAML_VERSION="4.07" - - PACKAGE="ezcurl-lwt" OCAML_VERSION="4.10"