Summary: Closes https://github.com/facebook/infer/issues/1270 Attempt to switch from Travis to Github Actions. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for how to set up your development environment and run tests. Pull Request resolved: https://github.com/facebook/infer/pull/1271 Reviewed By: mityal Differential Revision: D21881443 Pulled By: jvillard fbshipit-source-id: f711bbf27master
parent
a090551d69
commit
1459505540
@ -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
|
@ -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
|
|
Loading…
Reference in new issue