diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 000000000..9cf719013 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,52 @@ +name: Install + +on: + - push + - pull_request + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + ocaml-version: + - 4.09.1 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: true + + - name: Use OCaml ${{ matrix.ocaml-version }} + uses: avsm/setup-ocaml@v1 + with: + ocaml-version: ${{ matrix.ocaml-version }} + + - name: Restore opam cache + uses: actions/cache@v2 + with: + path: ${HOME}/.opam + key: ${{ runner.os }}-${{ hashFiles('opam.locked') }} + + - name: Install Required Brew Packages for MacOS + run: brew install pkg-config automake + if: runner.os == 'macOS' + + # ensure infer isn't installed in this switch, then deal with dependencies + - run: opam remove infer || true + + - run: opam update --upgrade + + - run: opam pin add --no-action infer . + + - run: opam depext --update infer; + + - run: opam install --deps-only infer + + - run: opam install infer diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 69336cc32..000000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -language: c -env: - - OCAML_VERSION=4.09.1 OPAM_VERSION=2.0.7 -cache: - directories: - - ${HOME}/.opam - - facebook-clang-plugins -addons: - apt: - packages: - - libmpfr-dev - homebrew: - packages: - - aspcud - - automake - - gmp - - libtool - - lzlib - - mpfr - - pkg-config - - sqlite -before_install: - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ARCH="macos"; else ARCH="linux"; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/bin:${PATH}"; fi - - wget -O ${HOME}/opam https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-${OPAM_VERSION}-x86_64-${ARCH} - - chmod +x ${HOME}/opam - - export PATH=${HOME}:${PATH} - - export OPAMYES=1 - - export OPAMJOBS=2 - - export INFER_OPAM_SWITCH="ocaml-variants.${OCAML_VERSION}+flambda" - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export OPAMEXTERNALSOLVER=$(which aspcud); fi - - opam init --compiler=${OCAML_VERSION} --disable-sandboxing - - eval $(opam env) - - export OPAMVERBOSE=1 -install: - # ensure infer isn't installed in this switch, then deal with dependencies - - opam remove infer || true - - opam update --upgrade - - opam pin add --no-action infer . - - if [ "$TRAVIS_OS_NAME" != "osx" ]; then opam depext --update infer; fi - - opam install --deps-only infer -script: - - opam install infer -before_cache: - - opam remove infer || true -os: -- linux -- osx