Skip to content

Commit 72f7cd6

Browse files
committed
Install openssl on Windows in GH Actions
1 parent 40835b1 commit 72f7cd6

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55

66
name: CI
77

8+
env:
9+
VCPKGRS_DYNAMIC: 1
10+
811
jobs:
912
rust_tests:
1013
name: Run rust tests
@@ -15,8 +18,16 @@ jobs:
1518
fail-fast: false
1619
steps:
1720
- uses: actions/checkout@master
18-
- name: Convert symlinks to hardlink (windows only)
19-
run: powershell.exe scripts/symlinks-to-hardlinks.ps1
21+
- name: Cache Windows
22+
uses: actions/cache@v1
23+
with:
24+
key: vcpkg
25+
path: 'C:/vcpkg'
26+
if: runner.os == 'Windows'
27+
- name: Set up the Windows environment
28+
run: |
29+
powershell.exe scripts/symlinks-to-hardlinks.ps1
30+
powershell.exe scripts/install-openssl.ps1
2031
if: runner.os == 'Windows'
2132
- name: Cache cargo dependencies
2233
uses: actions/cache@v1
@@ -40,8 +51,16 @@ jobs:
4051
fail-fast: false
4152
steps:
4253
- uses: actions/checkout@master
43-
- name: Convert symlinks to hardlink (windows only)
44-
run: powershell.exe scripts/symlinks-to-hardlinks.ps1
54+
- name: Cache Windows
55+
uses: actions/cache@v1
56+
with:
57+
key: vcpkg
58+
path: 'C:/vcpkg'
59+
if: runner.os == 'Windows'
60+
- name: Set up the Windows environment
61+
run: |
62+
powershell.exe scripts/symlinks-to-hardlinks.ps1
63+
powershell.exe scripts/install-openssl.ps1
4564
if: runner.os == 'Windows'
4665
- name: Cache cargo dependencies
4766
uses: actions/cache@v1

scripts/install-openssl.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# From the Actix Web windows workflow:
2+
# https://github.com/actix/actix-web/blob/master/.github/workflows/windows.yml
3+
vcpkg integrate install
4+
vcpkg install openssl:x64-windows
5+
Copy-Item C:\vcpkg\installed\x64-windows\bin\libcrypto-1_1-x64.dll C:\vcpkg\installed\x64-windows\bin\libcrypto.dll
6+
Copy-Item C:\vcpkg\installed\x64-windows\bin\libssl-1_1-x64.dll C:\vcpkg\installed\x64-windows\bin\libssl.dll
7+
Get-ChildItem C:\vcpkg\installed\x64-windows\bin
8+
Get-ChildItem C:\vcpkg\installed\x64-windows\lib

0 commit comments

Comments
 (0)