<TBBAS-2530> Add example module ci #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: Setup cmake | |
| if: runner.os == 'Windows' | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '4.0' | |
| - name: Install ninja-build | |
| if: runner.os == 'Windows' | |
| uses: seanmiddleditch/gha-setup-ninja@v5 | |
| - name: Configure simple device module with CMake | |
| run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release | |
| - name: Build simple device module with CMake | |
| run: cmake --build build/output --target all | |
| - name: Run simple device module tests via CTest with GTest report | |
| run: | | |
| mkdir -p build/reports | |
| GTEST_OUTPUT=xml:$(pwd)/build/reports/gtest-report.xml ctest --test-dir build/output --output-on-failure -V |