Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for building on linux #402

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/build_linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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]
cmake_args: ["", "-DUSE_IBVERBS=ON -DUSE_LIBUV=ON -DUSE_TCP_OPENSSL_LINK=ON", "-DUSE_TCP_OPENSSL_LOAD=ON"]

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 apt packages
run: |
sudo apt-get install -y wget perl build-essential cmake libibverbs-dev libssl-dev
- name: Install openssl # TODO: upgrade to latest
run: |
sudo wget -q https://www.openssl.org/source/openssl-1.1.1b.tar.gz
sudo tar -xzf openssl-1.1.1b.tar.gz
cd openssl-1.1.1b
sudo ./config --prefix=/opt/openssl --openssldir=/opt/openssl/ssl
sudo make -j 2
sudo make install
- 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 add-apt-repository universe
sudo apt-get update
sudo apt install build-essential
sudo apt-get install -y gcc g++
# 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 ${{matrix.cmake_args}} -DOPENSSL_ROOT_DIR=/opt/openssl/
make
- name: Test
run: |
pwd
find .
./build/gloo/test/gloo_test
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ include_directories(${PROJECT_BINARY_DIR})
# Compiler flags

if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC")
endif()

# Recurse into main project directory
Expand Down
Loading