4949 c_compiler : gcc
5050
5151 steps :
52- - uses : actions/checkout@v3
52+ - uses : actions/checkout@v7
5353
5454 - name : Set Env
5555 shell : bash
@@ -79,18 +79,60 @@ jobs:
7979 # because the default Windows generator is a multi-config generator (Visual Studio generator).
8080 run : cmake --build ${{ env.BUILD_OUTPUT_DIR }} --config ${{ matrix.build_type }}
8181
82- - uses : actions/upload-artifact@v4
82+ - name : Upload Compile Commands
83+ uses : actions/upload-artifact@v7
8384 if : matrix.os == 'ubuntu-latest' && matrix.build_type == 'Release' && matrix.c_compiler == 'clang'
8485 with :
8586 name : compile_commands.json
8687 path : ${{ env.BUILD_OUTPUT_DIR }}/compile_commands.json
88+ archive : false
89+
90+ - name : Upload CppSockets lib
91+ uses : actions/upload-artifact@v6
92+ with :
93+ name : libcppsockets-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}
94+ path : " ${{ env.BUILD_OUTPUT_DIR }}/**/libcppsockets.*"
95+
96+ - name : Upload UnitTests
97+ uses : actions/upload-artifact@v6
98+ if : matrix.os != 'windows-latest'
99+ with :
100+ name : unit_tests-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}
101+ path : " ${{ env.BUILD_OUTPUT_DIR }}/tests/**/unit_tests*"
102+
103+ - name : Upload UnitTests
104+ uses : actions/upload-artifact@v6
105+ if : matrix.os == 'windows-latest'
106+ with :
107+ name : unit_tests-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}
108+ path : |
109+ "${{ env.BUILD_OUTPUT_DIR }}/tests/**/unit_tests*"
110+ "${{ env.BUILD_OUTPUT_DIR }}/tests/**/*.dll"
111+
112+ - name : Setup DLL PATH (Windows)
113+ if : runner.os == 'Windows'
114+ shell : bash
115+ run : |
116+ echo "$VCPKG_ROOT/installed/x64-windows/bin" >> "$GITHUB_PATH"
117+ echo "$BUILD_OUTPUT_DIR/${{ matrix.build_type }}" >> "$GITHUB_PATH"
118+
119+ - name : Diagnostics (Windows)
120+ if : runner.os == 'Windows'
121+ shell : bash
122+ run : |
123+ echo "=== EXE search ==="
124+ find "$BUILD_OUTPUT_DIR/tests" -name "*.exe" 2>/dev/null
125+ echo "=== DLLs in tests dir ==="
126+ find "$BUILD_OUTPUT_DIR/tests" -name "*.dll" 2>/dev/null
127+ echo "=== DLLs in build dir ==="
128+ find "$BUILD_OUTPUT_DIR/${{ matrix.build_type }}" -name "*.dll" 2>/dev/null
87129
88130 - name : Test
89131 working-directory : ${{ env.BUILD_OUTPUT_DIR }}
90132 # Execute tests defined by the CMake configuration. Note that --build-config is needed
91133 # because the default Windows generator is a multi-config generator (Visual Studio generator).
92134 # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
93- run : ctest --build-config ${{ matrix.build_type }} --test-dir tests --output-on-failure
135+ run : ctest --timeout 60 -- build-config ${{ matrix.build_type }} --test-dir tests --output-on-failure
94136
95137 clang-tidy :
96138 needs : ' build'
@@ -99,14 +141,14 @@ jobs:
99141
100142 steps :
101143 - name : Checkout Code
102- uses : actions/checkout@v4
144+ uses : actions/checkout@v7
103145
104- - uses : actions/download-artifact@v4
146+ - uses : actions/download-artifact@v8
105147 with :
106148 name : compile_commands.json
107149
108150 - name : clang-tidy review
109- uses : ZedThree/clang-tidy-review@v0.21 .0
151+ uses : ZedThree/clang-tidy-review@v0.22 .0
110152
111153 # If there are any comments, fail the check
112154 - if : steps.review.outputs.total_comments > 0
0 commit comments