Skip to content

Commit

Permalink
Add new workflow to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Iandiehard committed Oct 2, 2023
1 parent a8ab3e9 commit ff30ce8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/clang14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
6 changes: 0 additions & 6 deletions .github/workflows/gcc9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
45 changes: 45 additions & 0 deletions .github/workflows/gcc9_with_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Gcc9_Gtest

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
COMPILER_NAME: gcc9
jobs:
Build-gcc-9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: sudo sh .github/setup.sh

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build/${{env.COMPILER_NAME}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_WITH_DLT:BOOL=ON -DBUILD_WITH_TEST:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=toolchains/linux_gcc_9.cmake

- name: Build
run: cmake --build ${{github.workspace}}/build/${{env.COMPILER_NAME}} --config ${{env.BUILD_TYPE}}

- name: Network Setup
run: sudo sh tools/setup_network_interface.sh

- name: Configure DLT Logging
run: |
export DLT_LOCAL_PRINT_MODE=FORCE_ON
export DLT_INITIAL_LOG_LEVEL="::6"
- name: Test
working-directory: ${{github.workspace}}/build/${{env.COMPILER_NAME}}/test
run: |
./gtest-diag-client-lib --gtest_output="xml:test-report.xml"
ls .
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: test-run-report
path: ${{github.workspace}}/build/${{env.COMPILER_NAME}}/test/test-report.html

0 comments on commit ff30ce8

Please sign in to comment.