Skip to content

Commit

Permalink
Merge pull request #119 from Fraunhofer-IIS/add-github-actions
Browse files Browse the repository at this point in the history
Add GitHub actions
  • Loading branch information
vornkat-iis authored Aug 21, 2023
2 parents 276c051 + d9f9c35 commit cb89ca9
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 139 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/CMake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CMake

on:
push:

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

jobs:
build:
# 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
container:
image: ghcr.io/fraunhofer-iis/libjapi_ci
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v1
with:
submodules: true

- 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: cmake3 -B ${{ env.GITHUB_WORKSPACE }}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake3 --build ${{ env.GITHUB_WORKSPACE }}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{ env.GITHUB_WORKSPACE }}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: make run_test
28 changes: 28 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: package

on:
push:
branches: ["master", "dev"]

jobs:
package:
runs-on: ubuntu-latest
container:
image: ghcr.io/fraunhofer-iis/libjapi_ci
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Build RPM package
run: ls -la; package/create_rpm.sh

- name: Upload package
uses: actions/upload-artifact@v3
with:
name: Binary RPM
path: package/rpmbuild/RPMS/x86_64/libjapi*.rpm
65 changes: 65 additions & 0 deletions .github/workflows/pages_static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/fraunhofer-iis/libjapi_ci
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Configure CMake
run: cmake3 -B ${{ env.GITHUB_WORKSPACE }}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Create Docs
working-directory: ${{ env.GITHUB_WORKSPACE }}/build
run: make doc

- name: Upload artifacts
uses: actions/upload-pages-artifact@v2
with:
path: '${{ env.GITHUB_WORKSPACE }}/build/doc/html/'


deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest

steps:
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
94 changes: 0 additions & 94 deletions .gitlab-ci.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"matepek.vscode-catch2-test-adapter",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools"
]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ create push services, which asynchronously push JSON messages to the clients
subscribed to them.

## Documentation
The documentation can be found [here](http://ks-ip-lib.git01.iis.fhg.de/software/libjapi/doc/html/index.html).
The documentation can be found [here](https://fraunhofer-iis.github.io/libjapi/).

## Packages
Prebuild packages can be downloaded [here](http://ks-ip-lib.git01.iis.fhg.de/software/libjapi/repo/index.html).
Prebuild packages for CentOS 7 can be downloaded from the [latest package Action](https://github.com/Fraunhofer-IIS/libjapi/actions/workflows/package.yml).

## Features
* Synchronous communication (request, response)
Expand All @@ -26,7 +26,7 @@ Prebuild packages can be downloaded [here](http://ks-ip-lib.git01.iis.fhg.de/sof
### Installation
Clone the git repository and it's submodules:

$ git clone --recurse-submodules git@git01.iis.fhg.de:ks-ip-lib/software/libjapi.git
$ git clone --recurse-submodules git@github.com:Fraunhofer-IIS/libjapi.git

Create a build directory and call *cmake* in that directory.

Expand Down
2 changes: 1 addition & 1 deletion doxydir/2_examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Examples

To view the full example take a look <a href="https://git01.iis.fhg.de/ks-ip-lib/software/libjapi/-/blob/master/doxydir/demo.cpp">here</a>.
To view the full example take a look <a href="https://github.com/Fraunhofer-IIS/libjapi/blob/master/doxydir/demo.cpp">here</a>.

\anchor serverExample
## Server example
Expand Down
4 changes: 1 addition & 3 deletions gitlab-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM centos:7
MAINTAINER Deniz Armagan <[email protected]>

# Install dependencies
RUN yum install -y epel-release json-c-devel gcc gcc-c++ make git rpm-build doxygen graphviz createrepo
RUN yum install -y cmake3
RUN yum install -y epel-release json-c-devel gcc gcc-c++ make rpm-build doxygen graphviz createrepo cmake3
22 changes: 0 additions & 22 deletions gitlab-ci/docker-build.sh

This file was deleted.

16 changes: 0 additions & 16 deletions gitlab-ci/docker-upload.sh

This file was deleted.

0 comments on commit cb89ca9

Please sign in to comment.