mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Switch to use manifest mode of vcpkg.
We should avoid to accidentally upgrade of OpenSSL 3.4.x
This commit is contained in:
parent
326a6cbf9b
commit
3e4289c24a
2 changed files with 27 additions and 10 deletions
29
.github/workflows/windows.yml
vendored
29
.github/workflows/windows.yml
vendored
|
@ -34,6 +34,7 @@ jobs:
|
||||||
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
|
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
|
||||||
VCVARS: ${{ matrix.vcvars }}
|
VCVARS: ${{ matrix.vcvars }}
|
||||||
PATCH: C:\msys64\usr\bin\patch.exe
|
PATCH: C:\msys64\usr\bin\patch.exe
|
||||||
|
VCPKG_DEFAULT_TRIPLET: ${{ matrix.target || 'x64' }}-windows
|
||||||
steps:
|
steps:
|
||||||
- run: md build
|
- run: md build
|
||||||
working-directory:
|
working-directory:
|
||||||
|
@ -46,16 +47,18 @@ jobs:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: echo PATCH=$(cygpath -wa $(command -v patch)) >> $GITHUB_ENV
|
run: echo PATCH=$(cygpath -wa $(command -v patch)) >> $GITHUB_ENV
|
||||||
if: ${{ steps.setup-msys2.outcome == 'success' }}
|
if: ${{ steps.setup-msys2.outcome == 'success' }}
|
||||||
- uses: actions/cache@v3
|
- name: Export GitHub Actions cache environment variables
|
||||||
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
path: C:\vcpkg\downloads
|
script: |
|
||||||
key: ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-${{ github.sha }}
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
restore-keys: |
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
${{ runner.os }}-vcpkg-download-${{ matrix.os }}-
|
- name: Install libraries with scoop
|
||||||
${{ runner.os }}-vcpkg-download-
|
|
||||||
- name: Install libraries with vcpkg
|
|
||||||
run: |
|
run: |
|
||||||
vcpkg --triplet x64-windows install openssl readline zlib
|
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
|
||||||
|
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
|
||||||
|
scoop install vcpkg
|
||||||
|
shell: pwsh
|
||||||
- name: git config
|
- name: git config
|
||||||
run: |
|
run: |
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
|
@ -69,6 +72,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: src/.downloaded-cache
|
path: src/.downloaded-cache
|
||||||
key: downloaded-cache
|
key: downloaded-cache
|
||||||
|
- name: Install libraries with vcpkg
|
||||||
|
run: |
|
||||||
|
vcpkg install
|
||||||
|
working-directory: src
|
||||||
|
env:
|
||||||
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||||
- name: setup env
|
- name: setup env
|
||||||
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
|
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
|
||||||
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
|
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
|
||||||
|
@ -85,7 +94,7 @@ jobs:
|
||||||
del *.env
|
del *.env
|
||||||
- name: link libraries
|
- name: link libraries
|
||||||
run: |
|
run: |
|
||||||
for %%I in (C:\vcpkg\installed\x64-windows\bin\*.dll) do (
|
for %%I in (D:\a\ruby\ruby\src\vcpkg_installed\%VCPKG_DEFAULT_TRIPLET%\bin\*.dll) do (
|
||||||
if not %%~nI == readline mklink %%~nxI %%I
|
if not %%~nI == readline mklink %%~nxI %%I
|
||||||
)
|
)
|
||||||
for %%I in (libcrypto-1_1-x64 libssl-1_1-x64) do (
|
for %%I in (libcrypto-1_1-x64 libssl-1_1-x64) do (
|
||||||
|
@ -95,7 +104,7 @@ jobs:
|
||||||
run: >-
|
run: >-
|
||||||
../src/win32/configure.bat --disable-install-doc
|
../src/win32/configure.bat --disable-install-doc
|
||||||
--enable-bundled-libffi
|
--enable-bundled-libffi
|
||||||
--with-opt-dir=C:/vcpkg/installed/x64-windows
|
--with-opt-dir=D:/a/ruby/ruby/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
|
||||||
- run: nmake incs
|
- run: nmake incs
|
||||||
- run: nmake extract-extlibs
|
- run: nmake extract-extlibs
|
||||||
- run: nmake
|
- run: nmake
|
||||||
|
|
8
vcpkg.json
Normal file
8
vcpkg.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||||
|
"dependencies": [
|
||||||
|
"openssl",
|
||||||
|
"zlib"
|
||||||
|
],
|
||||||
|
"builtin-baseline": "a4275b7eee79fb24ec2e135481ef5fce8b41c339"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue