From 0a4326433fa0f97f219b4465ec87e32c59b836bb Mon Sep 17 00:00:00 2001 From: Erik Rigtorp Date: Thu, 13 Sep 2018 16:26:01 -0500 Subject: [PATCH] Add travis-ci integration --- .gitignore | 1 + .travis.yml | 105 +++++++++++++++++++++++ CMakeLists.txt | 15 ++++ LICENSE | 2 +- Makefile | 25 ------ README.md | 3 + pipe_lat.c => src/pipe_lat.c | 0 pipe_thr.c => src/pipe_thr.c | 0 tcp_lat.c => src/tcp_lat.c | 0 tcp_local_lat.c => src/tcp_local_lat.c | 0 tcp_remote_lat.c => src/tcp_remote_lat.c | 0 tcp_thr.c => src/tcp_thr.c | 0 udp_lat.c => src/udp_lat.c | 0 unix_lat.c => src/unix_lat.c | 0 unix_thr.c => src/unix_thr.c | 0 15 files changed, 125 insertions(+), 26 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 CMakeLists.txt delete mode 100644 Makefile rename pipe_lat.c => src/pipe_lat.c (100%) rename pipe_thr.c => src/pipe_thr.c (100%) rename tcp_lat.c => src/tcp_lat.c (100%) rename tcp_local_lat.c => src/tcp_local_lat.c (100%) rename tcp_remote_lat.c => src/tcp_remote_lat.c (100%) rename tcp_thr.c => src/tcp_thr.c (100%) rename udp_lat.c => src/udp_lat.c (100%) rename unix_lat.c => src/unix_lat.c (100%) rename unix_thr.c => src/unix_thr.c (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ad7beb1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,105 @@ +language: cpp + +sudo: false + +matrix: + include: + + # clang-4 + - env: COMPILER=clang-4.0 + compiler: clang + os: linux + addons: + apt: + packages: + - clang-4.0 + - libstdc++-6-dev + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-4.0 + + # clang-5 + - env: COMPILER=clang-5.0 + compiler: clang + os: linux + addons: + apt: + packages: + - clang-5.0 + - libstdc++-7-dev + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-5.0 + + # clang-6 + - env: COMPILER=clang-6.0 + compiler: clang + os: linux + addons: + apt: + packages: + - clang-6.0 + - libstdc++-7-dev + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-6.0 + + # gcc-5 + - env: COMPILER=gcc-5 + compiler: gcc + os: linux + addons: + apt: + packages: + - g++-5 + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + + # gcc-6 + - env: COMPILER=gcc-6 + compiler: gcc + os: linux + addons: + apt: + packages: + - g++-6 + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + + # gcc-7 + - env: COMPILER=gcc-7 + compiler: gcc + os: linux + addons: + apt: + packages: + - g++-7 + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + + # gcc-8 + - env: COMPILER=gcc-8 + compiler: gcc + os: linux + addons: + apt: + packages: + - g++-8 + - libsparsehash-dev + sources: + - ubuntu-toolchain-r-test + +before_script: + - export CC=$COMPILER + - mkdir build + - cd build + - cmake .. + +script: + - make \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..01e52a7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +project(ipc-bench C) + +add_compile_options(-Wall -Wextra -Wpedantic) + +add_executable(pipe_lat src/pipe_lat.c) +add_executable(pipe_thr src/pipe_thr.c) +add_executable(tcp_lat src/tcp_lat.c) +add_executable(tcp_local_lat src/tcp_local_lat.c) +add_executable(tcp_remote_lat src/tcp_remote_lat.c) +add_executable(tcp_thr src/tcp_thr.c) +add_executable(udp_lat src/udp_lat.c) +add_executable(unix_lat src/unix_lat.c) +add_executable(unix_thr src/unix_thr.c) + diff --git a/LICENSE b/LICENSE index f79318f..d49012f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Erik Rigtorp +Copyright (c) 2018 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile deleted file mode 100644 index c16b1ed..0000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -CFLAGS = -g -Wall -O3 -lrt - -all: pipe_lat pipe_thr \ - unix_lat unix_thr \ - tcp_lat tcp_thr \ - tcp_local_lat tcp_remote_lat \ - udp_lat - -run: - ./pipe_lat 100 10000 - ./unix_lat 100 10000 - ./tcp_lat 100 10000 - ./udp_lat 100 10000 - ./pipe_thr 100 10000 - ./unix_thr 100 10000 - ./tcp_thr 100 10000 - -clean: - rm -f *~ core - rm -f pipe_lat pipe_thr - rm -f unix_lat unix_thr - rm -f tcp_lat tcp_thr - rm -f tcp_local_lat tcp_remote_lat - rm -f udp_lat diff --git a/README.md b/README.md index fe2c570..6dd35ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ ipc-bench ========= +[![GitHub](https://img.shields.io/github/license/rigtorp/ipc-bench.svg)](https://github.com/rigtorp/ipc-bench/blob/master/LICENSE) +[![Travis (.org)](https://img.shields.io/travis/rigtorp/ipc-bench.svg)](https://travis-ci.org/rigtorp/ipc-bench) + Some very crude IPC benchmarks. ping-pong latency benchmarks: diff --git a/pipe_lat.c b/src/pipe_lat.c similarity index 100% rename from pipe_lat.c rename to src/pipe_lat.c diff --git a/pipe_thr.c b/src/pipe_thr.c similarity index 100% rename from pipe_thr.c rename to src/pipe_thr.c diff --git a/tcp_lat.c b/src/tcp_lat.c similarity index 100% rename from tcp_lat.c rename to src/tcp_lat.c diff --git a/tcp_local_lat.c b/src/tcp_local_lat.c similarity index 100% rename from tcp_local_lat.c rename to src/tcp_local_lat.c diff --git a/tcp_remote_lat.c b/src/tcp_remote_lat.c similarity index 100% rename from tcp_remote_lat.c rename to src/tcp_remote_lat.c diff --git a/tcp_thr.c b/src/tcp_thr.c similarity index 100% rename from tcp_thr.c rename to src/tcp_thr.c diff --git a/udp_lat.c b/src/udp_lat.c similarity index 100% rename from udp_lat.c rename to src/udp_lat.c diff --git a/unix_lat.c b/src/unix_lat.c similarity index 100% rename from unix_lat.c rename to src/unix_lat.c diff --git a/unix_thr.c b/src/unix_thr.c similarity index 100% rename from unix_thr.c rename to src/unix_thr.c