Build simple device module with openDAQ framework and run tests #8
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 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: true | |
| type: string | |
| artifact-run-id: | |
| required: true | |
| type: string | |
| artifact-name: | |
| required: true | |
| type: string | |
| workflow_call: | |
| inputs: | |
| runner: | |
| description: "Runner label" | |
| required: true | |
| type: string | |
| branch: | |
| description: "Branch to checkout" | |
| required: true | |
| type: string | |
| artifact-run-id: | |
| required: true | |
| type: string | |
| artifact-name: | |
| required: true | |
| type: string | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| jobs: | |
| build: | |
| runs-on: ${{ inputs.runner }} | |
| steps: | |
| - name: Checkout openDAQ module repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.branch }} | |
| - name: Download openDAQ framework package | |
| uses: ./.github/actions/opendaq-github-download-artifact | |
| with: | |
| opendaq-artifact-run-id: ${{ inputs.artifact-run-id }} | |
| opendaq-artifact-name: ${{ inputs.artifact-name }} | |
| - name: Install openDAQ framework package | |
| uses: ./.github/actions/framework-install | |
| with: | |
| opendaq-framework-package-filename: ${{ runner.temp }}/${{ inputs.opendaq-framework-filename }} | |
| - name: Configure simple device module with CMake | |
| run: cmake -B build/output -S . -G "${{ matrix.generator }}" -DEXAMPLE_MODULE_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release | |
| - 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 | |