[Feature] Add optional encryption (#2) #14
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: Windows | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| name: ${{ matrix.name }} | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Windows with MSVC | |
| - name: "Windows MSVC" | |
| compiler: msvc | |
| cmake-generator: 'Visual Studio 17 2022' | |
| cmake-options: '' | |
| # Windows with MinGW (GCC) | |
| - name: "Windows MinGW" | |
| compiler: gcc | |
| cmake-generator: 'MinGW Makefiles' | |
| cmake-options: '-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install Windows build tools | |
| if: matrix.compiler != 'msvc' | |
| run: | | |
| if [ "${{ matrix.compiler }}" == "clang" ]; then | |
| choco install ninja | |
| elif [ "${{ matrix.compiler }}" == "gcc" ]; then | |
| choco install mingw | |
| fi | |
| shell: bash | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build -G "${{ matrix.cmake-generator }}" ${{ matrix.cmake-options }} | |
| - name: Build | |
| run: | | |
| cmake --build build --config Release | |
| - name: Run tests | |
| working-directory: build | |
| run: | | |
| if [ "${{ matrix.compiler }}" == "gcc" ]; then | |
| # For MinGW - copy DLLs directly (no PATH manipulation) | |
| GCC_DIR=$(dirname $(which gcc)) | |
| echo "GCC directory: $GCC_DIR" | |
| echo "Copying DLLs from $GCC_DIR" | |
| cp "$GCC_DIR"/libgcc*.dll tests/ 2>/dev/null || echo "No libgcc DLLs found" | |
| cp "$GCC_DIR"/libstdc*.dll tests/ 2>/dev/null || echo "No libstdc DLLs found" | |
| cp "$GCC_DIR"/libwinpthread*.dll tests/ 2>/dev/null || echo "No libwinpthread DLLs found" | |
| echo "Running tests" | |
| cd tests | |
| ./all_tests.exe | |
| else # MSVC | |
| echo "Running tests" | |
| ./tests/Release/all_tests.exe | |
| fi | |
| shell: bash |