Merge branch 'main' of github.com:ucb-bar/ra-isam2 into main #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.name }} ${{ matrix.build_type }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: ON | |
CTEST_PARALLEL_LEVEL: 2 | |
CMAKE_BUILD_TYPE: ${{ matrix.build_type }} | |
GTSAM_BUILD_UNSTABLE: ${{ matrix.build_unstable }} | |
BOOST_VERSION: 1.67.0 | |
strategy: | |
fail-fast: false | |
matrix: | |
# Github Actions requires a single row to be added to the build matrix. | |
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions. | |
name: [ | |
ubuntu-18.04-gcc-5, | |
ubuntu-18.04-gcc-9, | |
ubuntu-18.04-clang-9, | |
] | |
build_type: [Debug, Release] | |
build_unstable: [ON] | |
include: | |
- name: ubuntu-18.04-gcc-5 | |
os: ubuntu-18.04 | |
compiler: gcc | |
version: "5" | |
- name: ubuntu-18.04-gcc-9 | |
os: ubuntu-18.04 | |
compiler: gcc | |
version: "9" | |
- name: ubuntu-18.04-clang-9 | |
os: ubuntu-18.04 | |
compiler: clang | |
version: "9" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
# LLVM (clang) 9 is not in Bionic's repositories so we add the official LLVM repository. | |
if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then | |
# (ipv4|ha).pool.sks-keyservers.net is the SKS GPG global keyserver pool | |
# ipv4 avoids potential timeouts because of crappy IPv6 infrastructure | |
# 15CF4D18AF4F7421 is the GPG key for the LLVM apt repository | |
# This key is not in the keystore by default for Ubuntu so we need to add it. | |
LLVM_KEY=15CF4D18AF4F7421 | |
gpg --keyserver keyserver.ubuntu.com --recv-key $LLVM_KEY || gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key $LLVM_KEY | |
gpg -a --export $LLVM_KEY | sudo apt-key add - | |
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" | |
fi | |
sudo apt-get -y update | |
sudo apt-get -y install cmake build-essential pkg-config libpython-dev python-numpy libicu-dev | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
fi | |
- name: Install Boost | |
run: | | |
bash .github/scripts/boost.sh | |
- name: Build and Test | |
run: bash .github/scripts/unix.sh -t |