enable ctest #6
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: Module Tests (Windows) | |
| on: | |
| push: | |
| paths: | |
| - 'modules/**' | |
| - 'thirdParty/**' | |
| - '.github/workflows/Tests_Windows.yml' | |
| pull_request: | |
| paths: | |
| - 'modules/**' | |
| - 'thirdParty/**' | |
| jobs: | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Add msbuild to PATH | |
| uses: microsoft/[email protected] | |
| with: | |
| msbuild-architecture: x64 | |
| - name: Fetch base64.cpp | |
| run: | | |
| mkdir thirdParty\base64 | |
| curl -L https://raw.githubusercontent.com/ReneNyffenegger/cpp-base64/82147d6d89636217b870f54ec07ddd3e544d5f69/base64.cpp -o thirdParty\base64\base64.cpp | |
| - name: Fetch module dependencies | |
| run: | | |
| cd modules | |
| mkdir ModuleCmd\nlohmann | |
| curl -o ModuleCmd\nlohmann\json.hpp https://raw.githubusercontent.com/maxDcb/C2TeamServer/refs/heads/master/thirdParty/nlohmann/json.hpp | |
| curl -o ModuleCmd\base64.h https://raw.githubusercontent.com/ReneNyffenegger/cpp-base64/82147d6d89636217b870f54ec07ddd3e544d5f69/base64.h | |
| - name: Configure CMake for tests | |
| run: cmake -G "Visual Studio 17 2022" -S modules -B modules/build -DWITH_TESTS=ON | |
| - name: Build modules with tests | |
| run: cmake --build modules/build --config Release --parallel | |
| - name: Run unit tests | |
| run: ctest --test-dir modules/build -C Release |