Skip to content

Commit

Permalink
CI: Build and test using GitHub Actions
Browse files Browse the repository at this point in the history
This commit builds all executables and runs the unit tests whenever a
push (to any branch) happens or a pull request gets created.

Please note: While compilation errors break the build, failing tests do
not as there are currently failing unit tests in master.

Signed-off-by: Reto Schneider <[email protected]>
  • Loading branch information
rettichschnidi committed Nov 4, 2020
1 parent 31d64c0 commit 837dce9
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Test

on:
push:
branches: '**'
pull_request:
branches: '**'

jobs:
build_and_test:
runs-on: ubuntu-20.04

steps:
- name: Checkout code including full history and submodules
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
path: wakaama

- name: Install dependencies from APT repository
run: sudo apt-get install libcunit1-dev wget unzip

- name: Install CMake
uses: lukka/get-cmake@latest

- name: Install Ninja
uses: ashutoshvarma/setup-ninja@master
with:
version: 1.10.0

- name: Build and execute unit tests
run: |
cmake -GNinja -S wakaama/tests -B build-wakaama-tests
cmake --build build-wakaama-tests
build-wakaama-tests/lwm2munittests
working-directory: ${{ github.workspace }}

- name: Build examples
run: |
cmake -GNinja -S wakaama/examples -B build-wakaama-examples
cmake --build build-wakaama-examples
working-directory: ${{ github.workspace }}

0 comments on commit 837dce9

Please sign in to comment.