|
1 | | -name: Build and Test example module |
| 1 | +name: Build and Test simple device module with latest openDAQ release |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | branches: |
6 | 6 | - main |
7 | 7 | - jira/* |
8 | 8 |
|
| 9 | +env: |
| 10 | + GH_TOKEN: ${{ github.token }} |
| 11 | + |
9 | 12 | jobs: |
10 | 13 | build-and-test: |
11 | 14 | runs-on: ubuntu-latest |
12 | 15 | steps: |
13 | | - - name: Stop |
14 | | - run: exit 1 |
15 | | - |
16 | | - - name: Checkout repo |
17 | | - uses: actions/checkout@v4 |
18 | | - |
19 | | - - name: Install dependencies |
20 | | - run: | |
21 | | - sudo apt-get update && sudo apt-get install -y git wget cmake ninja-build mono-complete g++ libgmock-dev |
22 | | - wget -v https://docs.opendaq.com/download/SDK/opendaq-3.20.4-ubuntu22.04-x86_64.deb -O /tmp/opendaq.deb |
23 | | - sudo dpkg -i /tmp/opendaq.deb || sudo apt-get install -f -y |
24 | | -
|
25 | | - - name: Configure CMake |
26 | | - run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release |
27 | | - |
28 | | - - name: Build |
29 | | - run: cmake --build build/output --target all |
30 | | - |
31 | | - - name: Run tests with GTest report |
32 | | - run: | |
33 | | - mkdir -p build/reports |
34 | | - export GTEST_OUTPUT=xml:$(pwd)/build/reports/gtest-report.xml |
35 | | - ctest --test-dir build/output --output-on-failure -V |
36 | | -
|
37 | | - - name: Upload test report artifact |
38 | | - if: always() |
39 | | - uses: actions/upload-artifact@v4 |
40 | | - with: |
41 | | - name: gtest-report |
42 | | - path: build/reports/gtest-report.xml |
| 16 | + |
| 17 | + - name: Checkout simple device module repo |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Determine openDAQ framework package |
| 21 | + id: opendaq-framework |
| 22 | + uses: ./.github/actions/framework-latest-release |
| 23 | + |
| 24 | + - name: Donwload openDAQ framework |
| 25 | + uses: ./.github/actions/framework-download |
| 26 | + with: |
| 27 | + src-opendaq-framework-dev: ${{ steps.opendaq-framework.outputs.uri }} |
| 28 | + dst-opendaq-framework-dev: ${{ runner.temp }}/${{ steps.opendaq-framework.outputs.artefact }} |
| 29 | + aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 30 | + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 31 | + aws_region: ${{ secrets.AWS_REGION }} |
| 32 | + |
| 33 | + - name: Install openDAQ framework package |
| 34 | + uses: ./.github/actions/framework-install |
| 35 | + with: |
| 36 | + src-opendaq-framework: ${{ runner.temp }}/${{ steps.opendaq-framework.outputs.artefact }} |
| 37 | + |
| 38 | + - name: Configure CMake |
| 39 | + run: cmake -B build/output -S . -G Ninja -DOPENDAQ_ENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release |
| 40 | + |
| 41 | + - name: Build |
| 42 | + run: cmake --build build/output --target all |
| 43 | + |
| 44 | + - name: Run tests with GTest report |
| 45 | + run: | |
| 46 | + mkdir -p build/reports |
| 47 | + export GTEST_OUTPUT=xml:$(pwd)/build/reports/gtest-report.xml |
| 48 | + ctest --test-dir build/output --output-on-failure -V |
0 commit comments