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

ruby-changes:61585

From: Nobuyoshi <ko1@a...>
Date: Sat, 6 Jun 2020 11:02:30 +0900 (JST)
Subject: [ruby-changes:61585] e38a2ecffd (master): Run tests in more parallel

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

From e38a2ecffd51a2fe09548b322cb19293c6d024ef Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 6 Jun 2020 00:35:45 +0900
Subject: Run tests in more parallel


diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index c109790..2a01215 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -75,7 +75,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L75
       - name: download unicode, gems, etc
         working-directory: build
         run: |
-          $jobs = [int]$env:NUMBER_OF_PROCESSORS + 1
+          $jobs = [int]$env:NUMBER_OF_PROCESSORS * 2
           make -j $jobs update-unicode
           make -j $jobs update-gems
 
@@ -83,7 +83,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L83
         timeout-minutes: 40
         working-directory: build
         run: |
-          $jobs = [int]$env:NUMBER_OF_PROCESSORS + 1
+          $jobs = [int]$env:NUMBER_OF_PROCESSORS * 2
           make -j $jobs
 
       - name: make install
@@ -109,7 +109,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L109
           $PSDefaultParameterValues['*:Encoding'] = 'utf8'
           [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
           [Console]::InputEncoding  = [System.Text.Encoding]::GetEncoding("IBM437")
-          $jobs = [int]$env:NUMBER_OF_PROCESSORS
+          $jobs = [int]$env:NUMBER_OF_PROCESSORS * 2
           make test-all TESTOPTS="-j $jobs --retry --job-status=normal --show-skip --timeout-scale=1.5"
 
       - name: test-spec
diff --git a/defs/gmake.mk b/defs/gmake.mk
index a4347ff..7de43ce 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -4,6 +4,7 @@ reconfig config.status: export MAKE:=$(MAKE) https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L4
 override gnumake_recursive := $(if $(findstring n,$(firstword $(MFLAGS))),,+)
 override mflags := $(filter-out -j%,$(MFLAGS))
 MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
+nproc = $(subst -j,,$(filter -j%,$(MFLAGS)))
 
 CHECK_TARGETS := great exam love check test check% test% btest%
 # expand test targets, and those dependents
@@ -90,6 +91,8 @@ sudo-precheck: test yes-test-testframework no-test-testframework https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L91
 install-prereq: sudo-precheck
 yes-test-all no-test-all: install
 endif
+yes-test-bundler-parallel: PARALLELRSPECOPTS += $(if $(nproc),-n$(shell expr $(nproc) + $(nproc) / 2))
+
 # Cross reference needs to parse all files at once
 love install reinstall: RDOCFLAGS = --force-update
 
-- 
cgit v0.10.2


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

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