Skip to content

Commit

Permalink
Use container for CMake action
Browse files Browse the repository at this point in the history
  • Loading branch information
vornkat-iis committed Aug 16, 2023
1 parent adc395e commit 270e5bd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/CMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@ jobs:
# 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-20.04
runs-on: ubuntu-latest
container:
image: ghcr.io/fraunhofer-iis/libjapi_ci
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v1
with:
submodules: recursive

- name: Install Dependencies
run: sudo apt install -y libjson-c-dev doxygen graphviz
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: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.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: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake3 --build ${{ env.GITHUB_WORKSPACE }}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ subscribed to them.
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 Down
4 changes: 2 additions & 2 deletions gitlab-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ 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

0 comments on commit 270e5bd

Please sign in to comment.