<TBBAS-2530> Add example module ci #50
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: ubuntu-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: Check openDAQ framework package is detected | |
| run: | | |
| if [[ -z "${{ steps.opendaq-framework.outputs.uri }}" ]]; then | |
| echo "::error::openDAQ framework URI is empty!" | |
| exit 1 | |
| fi | |
| if [[ -z "${{ steps.opendaq-framework.outputs.artefact }}" ]]; then | |
| echo "::error::openDAQ artefact name is empty!" | |
| exit 1 | |
| fi | |
| - name: Prepare temporary directory | |
| run: mkdir -p ${{ runner.temp }} | |
| - 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: | |
| src-opendaq-framework: ${{ runner.temp }}/${{ steps.opendaq-framework.outputs.artefact }} | |
| - 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 |