<TBBAS-2530> Add example module ci #115
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: [ubuntu-latest, 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: Configure simple device module with CMake Windows | |
| if: runner.os == 'Windows' | |
| run: cmake -B build/output -S . -G "Visual Studio 17 2022" -DEXAMPLE_MODULE_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release | |
| # - name: Build simple device module with CMake | |
| # # if: runner.os == 'Windows' | |
| # run: cmake --build build/output --config Release | |
| - name: Configure simple device module with CMake | |
| if: runner.os != 'Windows' | |
| run: cmake -B build/output -S . -G Ninja -DEXAMPLE_MODULE_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: 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 |