Skip to content

Jira/tbbas 2595 create shared workflow #130

Jira/tbbas 2595 create shared workflow

Jira/tbbas 2595 create shared workflow #130

Workflow file for this run

name: Build and Test simple device module with latest openDAQ release
on:
push:
branches:
- main
pull_request:
branches:
- main
- jira/*
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
opendaq-framework-version:
required: false
type: string
default: latest
env:
GH_TOKEN: ${{ github.token }}
jobs:
build-and-test:
strategy:
matrix:
include:
- os: ubuntu-latest
generator: Ninja
- os: windows-latest
generator: "Visual Studio 17 2022"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout simple device module repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || github.event.client_payload.branch || github.ref }}
- name: Determine openDAQ framework package
id: opendaq-framework
uses: ./.github/actions/framework-latest-release
with:
opendaq-framework-release-version: ${{ github.event.inputs.opendaq-framework-version || 'latest' }}
- name: Download openDAQ framework
uses: ./.github/actions/framework-download
with:
src-opendaq-framework-dev: ${{ steps.opendaq-framework.outputs.uri }}
dst-opendaq-framework-dev: ${{ runner.temp }}/${{ steps.opendaq-framework.outputs.artefact }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
- name: Install openDAQ framework package
uses: ./.github/actions/framework-install
with:
opendaq-framework-package-filename: ${{ steps.opendaq-framework.outputs.artefact }}
- name: Configure simple device module with CMake
run: cmake -B build/output -S . -G "${{ matrix.generator }}" -DEXAMPLE_MODULE_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build simple device module with CMake
run: cmake --build build/output --config Release
- name: Run simple device module tests with CMake
run: ctest --test-dir build/output --output-on-failure -C Release -V