Skip to content

Commit

Permalink
ci: 💚 add openssl dependency using vcpkg on windows runners
Browse files Browse the repository at this point in the history
  • Loading branch information
Xminent committed Dec 24, 2023
1 parent e47a467 commit f2d4216
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,27 @@ jobs:
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1

- name: Install OpenSSL
uses: johnwason/vcpkg-action@v5
id: vcpkg
with:
pkgs: openssl
triplet: ${{ matrix.arch }}-windows-static
cache-key: ${{ runner.os }}-vcpkg
token: ${{ github.token }}

- name: Add OPENSSL_ROOT
if: runner.os == 'Windows'
run: |
echo "OPENSSL_ROOT=${{ github.workspace }}\vcpkg\installed\${{ matrix.arch }}-windows-static" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Configure CMake (x64)
if: ${{ matrix.arch == 'x64' }}
run: cmake -S . -B build -G "Visual Studio ${{ matrix.vs.version }} ${{ matrix.vs.name }}" -A x64 -T host=x64

- name: Configure CMake (x86)
if: ${{ matrix.arch == 'x86' }}
run: cmake -S . -B build -D net_FORCE_BUILD_OPENSSL=ON -G "Visual Studio ${{ matrix.vs.version }} ${{ matrix.vs.name }}" -A Win32 -T host=x86
run: cmake -S . -B build -G "Visual Studio ${{ matrix.vs.version }} ${{ matrix.vs.name }}" -A Win32 -T host=x86

- name: Build
run: cmake --build build --config ${{ matrix.config }}
Expand Down

0 comments on commit f2d4216

Please sign in to comment.