Skip to content

Add CI for building on linux #12

Add CI for building on linux

Add CI for building on linux #12

Workflow file for this run

name: CI-Linux
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-linux:
name: build on ubuntu
runs-on: ubuntu-latest
strategy:
matrix:
openssl: [true, false]
gcc-version: [5, 7]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
run: |
if [ {{ matrix.openssl }} == "true" ]; then
sudo apt-get install -y libssl-dev
fi
- name: Install libuv
run: |
sudo apt-get install -y wget pkg-config
wget -q -O libuv-v1.49.2.tar.gz https://dist.libuv.org/dist/v1.49.2/libuv-v1.49.2.tar.gz
tar xf libuv-v1.49.2.tar.gz
cd libuv-v1.49.2
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local
sudo make install
- name: Install googletest
run: |
wget -q -O googletest-release-1.15.2.tar.gz https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz
tar xf googletest-release-1.15.2.tar.gz
cd googletest-1.15.2
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local
sudo make install
- name: Build
run: |
sudo apt-get install -y gcc-{{ matrix.gcc-version }} g++-{{ matrix.gcc-version }}
export CC=gcc-${{ matrix.gcc-version }}
export CXX=g++-${{ matrix.gcc-version }}
mkdir -p build
cd build
cmake ../ -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_TEST=ON
- name: Test
run: |
build/gloo/test/gloo_test