[MinGW] Set job env vars at once

This commit is contained in:
Nobuyoshi Nakada 2021-02-08 00:02:20 +09:00
Родитель ac642df228
Коммит 5eb54c495f
1 изменённых файлов: 10 добавлений и 8 удалений

18
.github/workflows/mingw.yml поставляемый
Просмотреть файл

@ -56,6 +56,12 @@ jobs:
setup-ruby-ref: MSP-Greg/ruby-setup-ruby/00-win-ucrt setup-ruby-ref: MSP-Greg/ruby-setup-ruby/00-win-ucrt
mingw: _upgrade_ gmp libffi libyaml openssl ragel readline gcc mingw: _upgrade_ gmp libffi libyaml openssl ragel readline gcc
msys2: automake1.16 bison msys2: automake1.16 bison
- name: set env
run: |
$build_jobs = [int](2 * $env:NUMBER_OF_PROCESSORS)
$test_jobs = [int](1.5 * $env:NUMBER_OF_PROCESSORS)
Write-Output "BUILD_JOBS=$build_jobs" >> $env:GITHUB_ENV
Write-Output "TEST_JOBS=$test_jobs" >> $env:GITHUB_ENV
- name: where check - name: where check
run: | run: |
# show where # show where
@ -88,19 +94,16 @@ jobs:
- name: update - name: update
run: | run: |
$jobs = [int](2 * $env:NUMBER_OF_PROCESSORS) make -j $env:BUILD_JOBS incs
make -j $jobs incs
- name: download gems - name: download gems
run: | run: |
$jobs = [int](2 * $env:NUMBER_OF_PROCESSORS) make -j $env:BUILD_JOBS update-gems
make -j $jobs update-gems
- name: make all - name: make all
timeout-minutes: 20 timeout-minutes: 20
run: | run: |
$jobs = [int](2 * $env:NUMBER_OF_PROCESSORS) make -j $env:BUILD_JOBS
make -j $jobs
- run: make leaked-globals - run: make leaked-globals
@ -124,9 +127,8 @@ jobs:
$PSDefaultParameterValues['*:Encoding'] = 'utf8' $PSDefaultParameterValues['*:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
$jobs = [int](1.5 * $env:NUMBER_OF_PROCESSORS)
if ($env:BUNDLER_VERSION) { Remove-Item env:\BUNDLER_VERSION } if ($env:BUNDLER_VERSION) { Remove-Item env:\BUNDLER_VERSION }
make test-all TESTOPTS="-j $jobs --retry --job-status=normal --show-skip --timeout-scale=1.5" make test-all TESTOPTS="-j $env:TEST_JOBS --retry --job-status=normal --show-skip --timeout-scale=1.5"
- name: test-spec - name: test-spec
timeout-minutes: 10 timeout-minutes: 10