From 63c1a9ff9043f6d1fe3066d83a96338af5b7f308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Fri, 19 Jun 2020 19:41:08 +0200 Subject: [PATCH 1/2] Experiment with GH actions --- .github/workflows/workflow.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 00000000..a98e0103 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,37 @@ +name: Main workflow + +on: + - push + - pull_request + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-version: + - 4.09.1 + - 4.08.1 + - 4.07.1 + - 4.02.3 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use OCaml ${{ matrix.ocaml-version }} + uses: avsm/setup-ocaml@v1 + with: + ocaml-version: ${{ matrix.ocaml-version }} + + - run: opam install . --deps-only --with-doc --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest From 998c6b7a5625acb173ab7f54a4c82eea6f206f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Fri, 19 Jun 2020 19:52:00 +0200 Subject: [PATCH 2/2] Remove Travis script --- .travis-ci.sh | 61 --------------------------------------------------- .travis.yml | 29 ------------------------ 2 files changed, 90 deletions(-) delete mode 100755 .travis-ci.sh delete mode 100755 .travis.yml diff --git a/.travis-ci.sh b/.travis-ci.sh deleted file mode 100755 index 3fd29fd2..00000000 --- a/.travis-ci.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -xue - -PATH=~/ocaml/bin:$PATH; export PATH -OPAMYES="true"; export OPAMYES - -TARGET="$1"; shift - -case "$TARGET" in - prepare) - echo -en "travis_fold:start:ocaml\r" - if [ ! -e ~/ocaml/cached-version -o "$(cat ~/ocaml/cached-version)" != "$OCAML_VERSION.$OCAML_RELEASE" ] ; then - rm -rf ~/ocaml - mkdir -p ~/ocaml/src - cd ~/ocaml/src - wget http://caml.inria.fr/pub/distrib/ocaml-$OCAML_VERSION/ocaml-$OCAML_VERSION.$OCAML_RELEASE.tar.gz - tar -xzf ocaml-$OCAML_VERSION.$OCAML_RELEASE.tar.gz - cd ocaml-$OCAML_VERSION.$OCAML_RELEASE - ./configure -prefix ~/ocaml - make world.opt - make install - cd ../.. - rm -rf src - echo "$OCAML_VERSION.$OCAML_RELEASE" > ~/ocaml/cached-version - fi - echo -en "travis_fold:end:ocaml\r" - - echo -en "travis_fold:start:opam.init\r" - PREFIX=/home/travis - if [ ! -e ~/ocaml/bin/opam -o "$OPAM_RESET" = "1" ] ; then - mkdir ~/ocaml/src - cd ~/ocaml/src - wget https://github.com/ocaml/opam/releases/download/2.0.0-rc4/opam-full-2.0.0.tar.gz - tar -xzf opam-full-2.0.0.tar.gz - cd opam-full-2.0.0 - ./configure --prefix=$PREFIX/ocaml - make lib-ext - make all - make install - cd ../.. - rm -rf src - rm -rf ~/.opam - opam init --disable-sandboxing - eval $(opam config env) - opam install dune uchar - rm -rf ~/.opam-start - mv ~/.opam ~/.opam-start - fi - cp -a ~/.opam-start ~/.opam - echo -en "travis_fold:end:opam.init\r" - ;; - build) - eval $(opam config env) - dune build --display=short - dune clean - dune runtest - opam pin add omd . - ;; - *) - echo "bad command $TARGET">&2; exit 1 - ;; -esac diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index cae03728..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: c -sudo: false - -cache: - directories: - - $HOME/ocaml - - $HOME/.opam-start - -install: bash -ex .travis-ci.sh prepare -script: bash -ex .travis-ci.sh build - -matrix: - allow_failures: - - os: linux - env: OCAML_VERSION=4.03 OCAML_RELEASE=0 - stage: Build - - os: linux - env: OCAML_VERSION=4.04 OCAML_RELEASE=2 - stage: Build - - os: linux - env: OCAML_VERSION=4.05 OCAML_RELEASE=0 - stage: Build - include: - - os: linux - env: OCAML_VERSION=4.06 OCAML_RELEASE=0 - stage: Build - - os: linux - env: OCAML_VERSION=4.07 OCAML_RELEASE=0 - stage: Build