Skip to content

Commit dcd4422

Browse files
committed
CI Windows: prebuilt openssl.light via choco, pass lib dir via LIB
1 parent 03fc847 commit dcd4422

1 file changed

Lines changed: 10 additions & 38 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010

1111
permissions:
1212
contents: read
13-
packages: write
1413

1514
concurrency:
1615
group: ${{ github.workflow }}-${{ github.ref }}
@@ -105,45 +104,18 @@ jobs:
105104
echo "CC=gcc-13" >> "$GITHUB_ENV"
106105
echo "CXX=g++-13" >> "$GITHUB_ENV"
107106
108-
- name: Create vcpkg manifest (Windows)
107+
- name: Install OpenSSL (Windows)
109108
if: matrix.platform == 'windows-2022'
110-
shell: bash
111109
run: |
112-
cat > vcpkg.json << 'EOF'
113-
{
114-
"name": "bugscope-deps",
115-
"version": "1.0.0",
116-
"dependencies": [
117-
"openssl"
118-
]
119-
}
120-
EOF
121-
122-
- name: Setup vcpkg (Windows)
123-
if: matrix.platform == 'windows-2022'
124-
uses: lukka/run-vcpkg@v11
125-
with:
126-
vcpkgGitCommitId: 'b322364f06308bdd24823f9d8f03fe0cc86fd46f'
127-
128-
- name: Authenticate vcpkg NuGet (Windows)
129-
if: matrix.platform == 'windows-2022'
130-
shell: pwsh
131-
run: |
132-
$nuget = & $env:VCPKG_ROOT/vcpkg fetch nuget | Out-String
133-
$nuget = $nuget.Trim()
134-
& $nuget sources add -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -Name "GitHubPackages" -Username "${{ github.repository_owner }}" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText -Verbosity detailed
135-
& $nuget setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
136-
137-
- name: Install vcpkg packages (Windows)
138-
if: matrix.platform == 'windows-2022'
139-
shell: pwsh
140-
run: |
141-
& $env:VCPKG_ROOT/vcpkg install --recurse --clean-after-build --triplet x64-windows
142-
# lbug's build script honors OPENSSL_DIR before vcpkg/pkg-config;
143-
# point it at the manifest install like bugscope sets PKG_CONFIG_PATH.
144-
echo "OPENSSL_DIR=$env:GITHUB_WORKSPACE\vcpkg_installed\x64-windows" >> "$env:GITHUB_ENV"
145-
env:
146-
VCPKG_BINARY_SOURCES: 'clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite'
110+
choco install openssl.light --no-progress -y
111+
$root = 'C:\Program Files\OpenSSL-Win64'
112+
echo "OPENSSL_DIR=$root" >> "$GITHUB_ENV"
113+
# Shining Light nests import libs (e.g. lib\VC\...); hand the
114+
# exact dir to the MSVC linker via LIB instead of guessing layout.
115+
$lib = Get-ChildItem $root -Recurse -Filter libssl.lib | Select-Object -First 1 -ExpandProperty DirectoryName
116+
if (-not $lib) { Get-ChildItem $root -Recurse | Select-Object FullName; exit 1 }
117+
echo "Windows OpenSSL lib dir: $lib"
118+
echo "LIB=$lib" >> "$GITHUB_ENV"
147119
148120
- name: Install Rust stable
149121
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)