Skip to content

Commit

Permalink
workflow changes
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Mazur <mateusz.mazur@e.email>
  • Loading branch information
Mazurel committed Oct 20, 2024
1 parent f8ecbae commit efc2719
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 1

- name: Install dependencies
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y libnet1-dev
fi
sudo apt-get update
sudo apt-get install -y libnet1-dev
if: matrix.os == 'ubuntu-latest'

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
Expand All @@ -68,7 +70,7 @@ jobs:
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DMODBUS_EXAMPLE=ON
-DMODBUS_TEST=ON
-DMODBUS_TESTS=ON
-DMODBUS_COMMUNICATION=${{ matrix.os == 'windows-latest' && 'OFF' || matrix.os == 'ubuntu-latest' && 'ON' }}
-S ${{ github.workspace }}
Expand All @@ -77,7 +79,4 @@ jobs:
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: build/tests/Google_Tests_run
run: ${{ steps.strings.outputs.build-output-dir }}/tests/Google_Tests_run

0 comments on commit efc2719

Please sign in to comment.