diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 00000000..bfd4f6ca --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,41 @@ +name: Build tool on Linux +on: + push: + pull_request: +jobs: + build-linux: + runs-on: ubuntu-latest + + env: + PYTHONPATH: /opt/ikos/lib/python3.10/site-packages/ + MAKEFLAGS: -j4 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get install --yes \ + gcc g++ cmake libgmp-dev libboost-dev libboost-filesystem-dev \ + libboost-thread-dev libboost-test-dev \ + libsqlite3-dev libtbb-dev libz-dev libedit-dev \ + python3 python3-pygments python3-distutils python3-pip \ + llvm-14 llvm-14-dev llvm-14-tools clang-14 + - name: Compile IKOS + run: | + mkdir build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX="/opt/ikos" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm-14/bin/llvm-config" \ + .. + make + sudo make install + - name: Add IKOS to the path + run: | + echo "/opt/ikos/bin" >> $GITHUB_PATH + - name: Confirm that it runs + run: | + ikos --version diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 00000000..edae755e --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,45 @@ +name: Build tool on OSX +on: + push: + pull_request: +jobs: + build: + runs-on: macos-latest + env: + LDFLAGS: "-L/usr/local/opt/llvm@14/lib" + CPPFLAGS: "-I/usr/local/opt/llvm@14/include" + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install dependencies + run: | + pip3 install setuptools + - name: Install dependencies + run: | + brew tap nasa-sw-vnv/core + brew install cmake gmp boost tbb llvm@14 apron sqlite + - name: Adjust path + run: + echo "/usr/local/opt/llvm@14/bin" >> $GITHUB_PATH + - name: Test LLVM + run: | + which llvm-config + - name: Compile IKOS + run: | + mkdir build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX="/usr/local/opt/ikos" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DLLVM_CONFIG_EXECUTABLE="$(which llvm-config)" \ + -DPYTHON_EXECUTABLE:FILEPATH="$(which python3)" \ + .. + make + make install + - name: Add IKOS to the path + run: | + echo "/usr/local/opt/ikos/bin" >> $GITHUB_PATH + - name: Confirm that it runs + run: | + ikos --version diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index efa071f8..00000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: cpp -os: - - linux - - osx -addons: - apt: - update: true - sources: - - sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" - key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key" - packages: - - gcc - - g++ - - cmake - - libgmp-dev - - libboost-dev - - libboost-filesystem-dev - - libboost-thread-dev - - libboost-test-dev - - python - - python-pygments - - libsqlite3-dev - - libtbb-dev - - libz-dev - - libedit-dev - - llvm-9 - - llvm-9-dev - - llvm-9-tools - - clang-9 - homebrew: - update: true - taps: nasa-sw-vnv/core - packages: - - cmake - - gmp - - boost - - tbb - - llvm - - apron -script: - - mkdir build - - cd build - - if [ $TRAVIS_OS_NAME == linux ]; then cmake -DCMAKE_BUILD_TYPE="Debug" -DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm-9/bin/llvm-config" ..; fi - - if [ $TRAVIS_OS_NAME == osx ]; then cmake -DCMAKE_BUILD_TYPE="Debug" -DLLVM_CONFIG_EXECUTABLE="/usr/local/opt/llvm/bin/llvm-config" ..; fi - - make - - make install - - make check -env: - global: - - MAKEFLAGS="-j2" diff --git a/README.md b/README.md index 28eb6df9..1291b8f1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ IKOS ==== -[![Build Status](https://travis-ci.org/NASA-SW-VnV/ikos.svg?branch=master)](https://travis-ci.org/NASA-SW-VnV/ikos) [![License](https://img.shields.io/badge/license-NOSA%201.3-blue.svg)](LICENSE.pdf) [![Release](https://img.shields.io/badge/release-v3.1-orange.svg)](https://github.com/NASA-SW-VnV/ikos/releases/tag/v3.1) +[![Linux Build](https://github.com/NASA-SW-VnV/ikos/actions/workflows/build-linux.yml/badge.svg)](https://github.com/NASA-SW-VnV/ikos/actions/workflows/build-linux.yml) +[![MacOS Build](https://github.com/NASA-SW-VnV/ikos/actions/workflows/build-macos.yml/badge.svg)](https://github.com/NASA-SW-VnV/ikos/actions/workflows/build-macos.yml) IKOS (Inference Kernel for Open Static Analyzers) is a static analyzer for C/C++ based on the theory of Abstract Interpretation.