Skip to content

Commit

Permalink
Added GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Jan 12, 2022
1 parent 518e154 commit 00eb000
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: macOS

on:
push:
pull_request:
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build-macos:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest

steps:

- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
fetch-depth: 0


- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/_build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/_build --config ${{env.BUILD_TYPE}}

36 changes: 36 additions & 0 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Ubuntu

on:
push:
pull_request:
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build-ubuntu:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
fetch-depth: 0


- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/_build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/_build --config ${{env.BUILD_TYPE}}

36 changes: 36 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Windows

on:
push:
pull_request:
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build-windows:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest

steps:

- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
fetch-depth: 0


- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/_build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/_build --config ${{env.BUILD_TYPE}}

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Windows](https://github.com/continental/tcp_pubsub/actions/workflows/build-windows.yml/badge.svg)](https://github.com/continental/tcp_pubsub/actions/workflows/build-windows.yml) [![Ubuntu](https://github.com/continental/tcp_pubsub/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/continental/tcp_pubsub/actions/workflows/build-ubuntu.yml) [![macOS](https://github.com/continental/tcp_pubsub/actions/workflows/build-macos.yml/badge.svg)](https://github.com/continental/tcp_pubsub/actions/workflows/build-macos.yml)

# tcp_pubsub - TCP Publish/Subscribe library

Expand Down

0 comments on commit 00eb000

Please sign in to comment.