Skip to content

Commit 78daa20

Browse files
[ci] Use vcpkg to install openssl for windows (#217)
1 parent 9347c35 commit 78daa20

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,22 @@ jobs:
131131
run: |
132132
echo "PERL=$(which perl)" >> $GITHUB_ENV
133133
echo "OPENSSL_SRC_PERL=$(which perl)" >> $GITHUB_ENV
134-
choco install openssl --version 3.4.1 --install-arguments="'/DIR=C:\OpenSSL'" -y
135-
echo "OPENSSL_LIB_DIR=C:\OpenSSL\lib\VC\x64\MT" >> $GITHUB_ENV
136-
echo "OPENSSL_INCLUDE_DIR=C:\OpenSSL\include" >> $GITHUB_ENV
134+
cat > vcpkg.json <<EOL
135+
{
136+
"dependencies": ["openssl"],
137+
"overrides": [
138+
{
139+
"name": "openssl",
140+
"version": "3.4.1"
141+
}
142+
],
143+
"builtin-baseline": "5ee5eee0d3e9c6098b24d263e9099edcdcef6631"
144+
}
145+
EOL
146+
vcpkg install --triplet x64-windows-static-md
147+
rm vcpkg.json
148+
echo "OPENSSL_LIB_DIR=$GITHUB_WORKSPACE/vcpkg_installed/x64-windows-static-md/lib" >> $GITHUB_ENV
149+
echo "OPENSSL_INCLUDE_DIR=$GITHUB_WORKSPACE/vcpkg_installed/x64-windows-static-md/include" >> $GITHUB_ENV
137150
138151
- name: Run clippy
139152
shell: bash

0 commit comments

Comments
 (0)