|
10 | 10 |
|
11 | 11 | permissions: |
12 | 12 | contents: read |
13 | | - packages: write |
14 | 13 |
|
15 | 14 | concurrency: |
16 | 15 | group: ${{ github.workflow }}-${{ github.ref }} |
@@ -105,45 +104,18 @@ jobs: |
105 | 104 | echo "CC=gcc-13" >> "$GITHUB_ENV" |
106 | 105 | echo "CXX=g++-13" >> "$GITHUB_ENV" |
107 | 106 |
|
108 | | - - name: Create vcpkg manifest (Windows) |
| 107 | + - name: Install OpenSSL (Windows) |
109 | 108 | if: matrix.platform == 'windows-2022' |
110 | | - shell: bash |
111 | 109 | 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" |
147 | 119 |
|
148 | 120 | - name: Install Rust stable |
149 | 121 | uses: dtolnay/rust-toolchain@stable |
|
0 commit comments