Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .github/actions/framework-download/action.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/actions/framework-install/action.yml

This file was deleted.

111 changes: 0 additions & 111 deletions .github/actions/framework-latest-release/action.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/actions/module-build-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and test simple device module
description: Configure, build and test simple device module with CMake

inputs:
enable-32bit:
description: 'Enable 32-bit build for Windows'
required: false
default: 'false'

runs:
using: composite
steps:
- name: Set CMake generator and architecture
id: cmake-config
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "cmake-generator=-G \"Visual Studio 17 2022\"" >> $GITHUB_OUTPUT
if [[ "${{ inputs.enable-32bit }}" == "true" ]]; then
echo "cmake-arch=-A Win32" >> $GITHUB_OUTPUT
else
echo "cmake-arch=" >> $GITHUB_OUTPUT
fi
else
echo "cmake-generator=-G Ninja" >> $GITHUB_OUTPUT
echo "cmake-arch=" >> $GITHUB_OUTPUT
fi
echo "cmake-build-dir=build" >> $GITHUB_OUTPUT
echo "cmake-config-name=Release" >> $GITHUB_OUTPUT

- name: Configure simple device module with CMake
shell: bash
run: |
cmake -B ${{ steps.cmake-config.outputs.cmake-build-dir }} -S . \
${{ steps.cmake-config.outputs.cmake-generator }} \
${{ steps.cmake-config.outputs.cmake-arch }} \
-DCMAKE_BUILD_TYPE=${{ steps.cmake-config.outputs.cmake-config-name }} \
-DEXAMPLE_MODULE_ENABLE_TESTS=ON

- name: Build simple device module with CMake
shell: bash
run: |
cmake --build ${{ steps.cmake-config.outputs.cmake-build-dir }} \
--config ${{ steps.cmake-config.outputs.cmake-config-name }}

- name: Run simple device module tests with CMake
shell: bash
run: |
ctest --test-dir ${{ steps.cmake-config.outputs.cmake-build-dir }} \
--output-on-failure \
-C ${{ steps.cmake-config.outputs.cmake-config-name }} \
-V
84 changes: 84 additions & 0 deletions .github/workflows/ci-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build simple device module with openDAQ framework and run tests

on:
workflow_dispatch:
inputs:
runner:
description: "Runner label"
required: true
type: string

branch:
description: "Branch to checkout"
required: false
type: string
default: ""

artifact-run-id:
required: true
type: string

artifact-name:
required: true
type: string

file-name:
required: true
type: string

workflow_call:
inputs:
runner:
description: "Runner label"
required: true
type: string

branch:
description: "Branch to checkout"
required: false
type: string
default: ""

artifact-run-id:
required: true
type: string

artifact-name:
required: true
type: string

file-name:
required: true
type: string

env:
GH_TOKEN: ${{ github.token }}

jobs:
test-artifact:
runs-on: ${{ inputs.runner }}

steps:
- name: Checkout openDAQ module repository
uses: actions/checkout@v4
with:
repository: openDAQ/SimpleDeviceModule
ref: ${{ inputs.branch }}

- name: Download openDAQ framework artifact
id: download
uses: actions/download-artifact@v5
with:
repository: openDAQ/openDAQ
github-token: ${{ github.token }}
run-id: ${{ inputs.artifact-run-id }}
name: ${{ inputs.artifact-name }}
path: ${{ runner.temp }}/artifacts

- name: Install openDAQ framework artifact
uses: openDAQ/actions/framework-install@jira/TBBAS-2680-opendaq-gh-actions-github-api-wrapper-unit-tests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the target branch with main

with:
framework-filename: ${{ steps.download.outputs.download-path }}/${{ inputs.file-name }}

- name: Build and test simple device module
uses: ./.github/actions/module-build-test
Loading