summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2021-01-08 20:32:08 +0900
committerKOBAYASHI Shuji <[email protected]>2021-01-08 20:36:54 +0900
commit3a8d7bdf82dddb8d5e54330503d9ed11b4f68ad0 (patch)
treee5c1e9c5f62a9bd4e495593c59b0d035a1d193ff /.github
parent04561cd999431264e10bb96915a26049cff29d92 (diff)
downloadmruby-3a8d7bdf82dddb8d5e54330503d9ed11b4f68ad0.tar.gz
mruby-3a8d7bdf82dddb8d5e54330503d9ed11b4f68ad0.zip
Delay test code build until `rake test`
With this change, the test code will not be built unless `rake test` is run, so there will be almost no side effects even if `enable_test` is always set (but, gems specified by `add_test_dependency` are included in `libmruby.a`). Also added are `test: build` task, which only builds the test code (including the main code), and `test: run` task, which only runs tests independent of build. Therefore, the idiom for building in parallel and not running tests in parallel is `rake -m test:build && rake test:run`.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml16
1 files changed, 7 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5e530ae5e..135e39ca7 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,7 +25,7 @@ jobs:
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
- run: rake -m && rake test
+ run: rake -m test:build && rake test:run
Ubuntu-1804-gcc:
needs: Check-Skip
@@ -40,7 +40,7 @@ jobs:
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
- run: rake -m && rake test
+ run: rake -m test:build && rake test:run
Ubuntu-1804-clang:
needs: Check-Skip
@@ -55,7 +55,7 @@ jobs:
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
- run: rake -m && rake test
+ run: rake -m test:build && rake test:run
macOS:
needs: Check-Skip
@@ -70,7 +70,7 @@ jobs:
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
- run: rake -m && rake test
+ run: rake -m test:build && rake test:run
Windows-MinGW:
needs: Check-Skip
@@ -85,9 +85,7 @@ jobs:
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
- # If build and test are separated like `rake && rake test`, somehow
- # it will be fully built even at `rake test`, so it is not separated.
- run: rake test
+ run: rake -m test:build && rake test:run
Windows-Cygwin:
needs: Check-Skip
@@ -130,7 +128,7 @@ jobs:
run: ${{ env.CC }} --version
- name: Build and test
shell: cmd
- run: ruby /usr/bin/rake -m && ruby /usr/bin/rake test
+ run: ruby /usr/bin/rake -m test:build && ruby /usr/bin/rake test:run
- name: Set PATH for cache archiving (tar)
# set Windows path so that Cygwin tar is not used for cache archiving
run: echo '::set-env name=PATH::C:\windows\System32'
@@ -148,4 +146,4 @@ jobs:
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- rake -m && rake test
+ rake -m test:build && rake test:run