1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Set VCVARS

This commit is contained in:
Kazuhiro NISHIYAMA 2021-08-25 11:51:45 +09:00 committed by Kazuhiro NISHIYAMA
parent 5e65f31b5a
commit b1f58d3e91
Notes: git 2021-08-26 19:48:10 +09:00

View file

@ -6,17 +6,10 @@ jobs:
matrix: matrix:
test_task: [check] # to make job names consistent test_task: [check] # to make job names consistent
os: [windows-2019, windows-2022] os: [windows-2019, windows-2022]
vs: [2019, 2022]
exclude:
- os: windows-2019
vs: 2022
- os: windows-2022
vs: 2019
fail-fast: false fail-fast: false
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
GITPULLOPTIONS: --no-tags origin ${{github.ref}} 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 PATCH: C:\msys64\usr\bin\patch.exe
steps: steps:
- run: md build - run: md build
@ -28,6 +21,13 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-vcpkg-download-${{ matrix.os }}- ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-
${{ runner.os }}-vcpkg-download- ${{ 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 - name: Install libraries with vcpkg
run: | run: |
vcpkg --triplet x64-windows install readline zlib vcpkg --triplet x64-windows install readline zlib
@ -56,11 +56,11 @@ jobs:
path: src path: src
- name: Configure - name: Configure
run: | 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" ../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 - name: nmake
run: | run: |
call "%VCVARS%" call %VCVARS%
set YACC=win_bison set YACC=win_bison
echo on echo on
nmake incs nmake incs
@ -69,12 +69,12 @@ jobs:
- name: nmake test - name: nmake test
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
call "%VCVARS%" call %VCVARS%
nmake test nmake test
- name: nmake test-all - name: nmake test-all
timeout-minutes: 60 timeout-minutes: 60
run: | run: |
call "%VCVARS%" call %VCVARS%
::- %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
set TMP=%USERPROFILE%\AppData\Local\Temp set TMP=%USERPROFILE%\AppData\Local\Temp
@ -83,7 +83,7 @@ jobs:
- name: nmake test-spec - name: nmake test-spec
timeout-minutes: 10 timeout-minutes: 10
run: | run: |
call "%VCVARS%" call %VCVARS%
nmake test-spec nmake test-spec
- uses: k0kubun/action-slack@v2.0.0 - uses: k0kubun/action-slack@v2.0.0
with: with: