diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..a924ba3 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,58 @@ +name: Build and test + +on: + - pull_request + - push + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-compiler: + - 5.00.x + - 4.13.x + - 4.08.x + - 4.06.x + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + - run: opam install . --deps-only --with-doc --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest + + - name: Upload the build artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-${{ matrix.ocaml-version }}-world.exe + path: _build/default/world.exe + + lint-doc: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Use OCaml 4.13.x + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 4.13.x + dune-cache: true + + - name: Lint doc + uses: ocaml/setup-ocaml/lint-doc@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d041b68..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: c -sudo: required -os: - - linux - - osx - -matrix: - allow_failures: - - os: osx - -install: - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then - brew install gcc || true; - brew link --overwrite gcc; - fi - - wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh -script: bash -ex .travis-opam.sh - -env: - global: - - PACKAGE=lbfgs - matrix: - - OCAML_VERSION=4.08 - - OCAML_VERSION=4.07 - - OCAML_VERSION=4.06 - - OCAML_VERSION=4.05 - - OCAML_VERSION=4.04 - -notifications: - email: - - Christophe.Troestler@umons.ac.be