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

ruby-changes:67254

From: Kazuhiro <ko1@a...>
Date: Thu, 26 Aug 2021 19:48:03 +0900 (JST)
Subject: [ruby-changes:67254] b1f58d3e91 (master): Set VCVARS

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

From b1f58d3e91060730e259b293b47e04e889ecf36e Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Wed, 25 Aug 2021 11:51:45 +0900
Subject: Set VCVARS

---
 .github/workflows/windows.yml | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 28f795b..a10c94d 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -6,17 +6,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L6
       matrix:
         test_task: [check] # to make job names consistent
         os: [windows-2019, windows-2022]
-        vs: [2019, 2022]
-        exclude:
-          - os: windows-2019
-            vs: 2022
-          - os: windows-2022
-            vs: 2019
       fail-fast: false
     runs-on: ${{ matrix.os }}
     env:
       GITPULLOPTIONS: --no-tags origin ${{github.ref}}
-      VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat
       PATCH: C:\msys64\usr\bin\patch.exe
     steps:
       - run: md build
@@ -28,6 +21,13 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L21
           restore-keys: |
             ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-
             ${{ runner.os }}-vcpkg-download-
+      - name: Set VCVARS
+        run: |
+          IF ${{ matrix.os }}==windows-2022 (
+            echo VCVARS="C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvars64.bat" >> %GITHUB_ENV%
+          ) ELSE IF ${{ matrix.os }}==windows-2019 (
+            echo VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" >> %GITHUB_ENV%
+          )
       - name: Install libraries with vcpkg
         run: |
           vcpkg --triplet x64-windows install readline zlib
@@ -56,11 +56,11 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L56
           path: src
       - name: Configure
         run: |
-          call "%VCVARS%"
+          call %VCVARS%
           ../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"
       - name: nmake
         run: |
-          call "%VCVARS%"
+          call %VCVARS%
           set YACC=win_bison
           echo on
           nmake incs
@@ -69,12 +69,12 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L69
       - name: nmake test
         timeout-minutes: 5
         run: |
-          call "%VCVARS%"
+          call %VCVARS%
           nmake test
       - name: nmake test-all
         timeout-minutes: 60
         run: |
-          call "%VCVARS%"
+          call %VCVARS%
           ::- %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
           ::- https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
           set TMP=%USERPROFILE%\AppData\Local\Temp
@@ -83,7 +83,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L83
       - name: nmake test-spec
         timeout-minutes: 10
         run: |
-          call "%VCVARS%"
+          call %VCVARS%
           nmake test-spec
       - uses: k0kubun/action-slack@v...
         with:
-- 
cgit v1.1


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

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