[前][次][番号順一覧][スレッド一覧]

ruby-changes:71099

From: Nobuyoshi <ko1@a...>
Date: Mon, 7 Feb 2022 00:03:41 +0900 (JST)
Subject: [ruby-changes:71099] 402d76485c (master): [MSWin] Install libffi using vcpkg

https://git.ruby-lang.org/ruby.git/commit/?id=402d76485c

From 402d76485cfc20ce8307878a84967d75ccc13378 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 13 Jan 2022 17:44:09 +0900
Subject: [MSWin] Install libffi using vcpkg

---
 .appveyor.yml                 | 12 ++++++++++--
 .github/workflows/windows.yml |  4 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.appveyor.yml b/.appveyor.yml
index 75cef60dd5..e88245db8e 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -23,7 +23,7 @@ environment: https://github.com/ruby/ruby/blob/trunk/.appveyor.yml#L23
     - build: vs
       vs: 120
       ssl: OpenSSL
-      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
+      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
       GEMS_FOR_TEST: ""
     - build: vs
       vs: 140
@@ -31,6 +31,8 @@ environment: https://github.com/ruby/ruby/blob/trunk/.appveyor.yml#L31
       APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
       GEMS_FOR_TEST: ""
   RELINE_TEST_ENCODING: "UTF-8"
+cache:
+  - c:\Tools\vcpkg\installed\
 for:
 -
   matrix:
@@ -42,6 +44,12 @@ for: https://github.com/ruby/ruby/blob/trunk/.appveyor.yml#L44
     - SET BITS=%Platform:x86=32%
     - SET BITS=%BITS:x=%
     - SET OPENSSL_DIR=C:\%ssl%-Win%BITS%
+    - cd C:\Tools\vcpkg
+    - git pull -q
+    - .\bootstrap-vcpkg.bat
+    - cd %APPVEYOR_BUILD_FOLDER%
+    - vcpkg --triplet %Platform%-windows install libffi libyaml readline zlib
+    - set PATH=c:\Tools\vcpkg\installed\%Platform%-windows\bin;%PATH%
     - CALL SET vcvars=%%^VS%VS%COMNTOOLS^%%..\..\VC\vcvarsall.bat
     - SET vcvars
     - '"%vcvars%" %Platform:x64=amd64%'
@@ -72,7 +80,7 @@ for: https://github.com/ruby/ruby/blob/trunk/.appveyor.yml#L80
     - cd %Platform%-mswin_%vs%
     - >-
       ..\win32\configure.bat
-      --with-opt-dir=/usr/local
+      --with-opt-dir="/usr/local;c:/Tools/vcpkg/installed/%Platform%-windows"
       --with-openssl-dir=%OPENSSL_DIR:\=/%
     - nmake -l
     - nmake install-nodoc
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 28a07be9cd..4acb9b74fc 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -64,7 +64,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L64
             ${{ runner.os }}-vcpkg-installed-
       - name: Install libraries with vcpkg
         run: |
-          vcpkg --triplet x64-windows install readline zlib
+          vcpkg --triplet x64-windows install libffi readline zlib
       - uses: actions/cache@v2
         with:
           path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
@@ -104,10 +104,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L104
           set | C:\msys64\usr\bin\sort > new.env
           C:\msys64\usr\bin\comm -13 old.env new.env >> %GITHUB_ENV%
           del *.env
+          for %%I in (libffi) do mklink %%I.dll C:\vcpkg\installed\x64-windows\bin\%%I.dll
       - name: Configure
         run: >-
           ../src/win32/configure.bat --disable-install-doc
-          --enable-bundled-libffi
           --with-opt-dir=C:/vcpkg/installed/x64-windows
           --with-openssl-dir="C:/Program Files/OpenSSL-Win64"
       - run: nmake incs
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]