Skip to content

<TBBAS-2530> Add example module ci #89

<TBBAS-2530> Add example module ci

<TBBAS-2530> Add example module ci #89

Workflow file for this run

name: Build and Test simple device module with latest openDAQ release
on:
pull_request:
branches:
- main
- jira/*
env:
GH_TOKEN: ${{ github.token }}
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout simple device module repo
uses: actions/checkout@v4
- name: Determine openDAQ framework package
id: opendaq-framework
uses: ./.github/actions/framework-latest-release
- 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: Archive installed openDAQ
# if: runner.os == 'Windows'
# shell: pwsh
# run: |
# Compress-Archive -Path "C:/Program Files/openDAQ" -DestinationPath "$env:RUNNER_TEMP/opendaq.zip"
# - name: Upload openDAQ artifact
# if: runner.os == 'Windows'
# uses: actions/upload-artifact@v4
# with:
# name: opendaq-install
# path: ${{ runner.temp }}/opendaq.zip
# - name: Install Windows dependencies
# id: windows-dependencies-install
# if: runner.os == 'Windows'
# uses: ./.github/actions/dependencies-install
- name: Configure simple device module with CMake Windows
if: runner.os == 'Windows'
# run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ steps.windows-dependencies-install.outputs.vcpkg-toolchain-file }}
run: cmake -B build/output -S . -G "Visual Studio 17 2022" -DOPENDAQ_ENABLE_TESTS=ON -DOPENDAQ_MSVC_SINGLE_PROCESS_BUILD=ON -DDAQMODULES_PARQUET_RECORDER_MODULE=ON -DCMAKE_BUILD_TYPE=Release
- name: Build simple device module with CMake Windows
if: runner.os == 'Windows'
run: cmake --build build/output --config Release
- name: Run simple device module tests via CTest with GTest report Windows
if: runner.os == 'Windows'
run: |
New-Item -ItemType Directory -Force -Path build/reports | Out-Null
$env:GTEST_OUTPUT = "xml:$PWD/build/reports/gtest-report.xml"
ctest --test-dir build/output --output-on-failure -C Release -V
- name: Configure simple device module with CMake
if: runner.os != 'Windows'
run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build simple device module with CMake
if: runner.os != 'Windows'
run: cmake --build build/output --target all
- name: Run simple device module tests via CTest with GTest report
if: runner.os != 'Windows'
run: |
mkdir -p build/reports
GTEST_OUTPUT=xml:$(pwd)/build/reports/gtest-report.xml ctest --test-dir build/output --output-on-failure -V