diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-09-20 06:57:12 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-09-26 08:51:18 +0000 |
commit | 698f3fd86ef82701014ecaecd634e449aa14026e (patch) | |
tree | 39c2fcfcccf1ddd04fcaafb88333993634c4429f /.github | |
parent | f3589814ab7492ea2605bc780a72c9b3b8d521c0 (diff) | |
download | perl-698f3fd86ef82701014ecaecd634e449aa14026e.tar.gz |
Run t/TEST directly on cygwin in the CI workflow
`make -j2 test` causes make to re-run the build in all the extension
directories, which takes about 40 seconds on the GH servers - ie this alone
is roughly 1% of the total test time.
Hence change the build target to `test_prep`, the Makefile pre-requisite for
testing, and then run t/TEST.pl directly with the same environment as the
Makefile and ./runtests would have set up. As we already set
PERL_SKIP_TTY_TEST=1 in the global environment we don't have anything else
to set up.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/testsuite.yml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 3b25c07fd1..61994e7a48 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -434,7 +434,7 @@ jobs: shell: cmd run: | path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin - sh -c "cd ~/work; make -j2" + sh -c "cd ~/work; make -j2 test_prep" - name: Show Config shell: cmd run: | @@ -442,9 +442,20 @@ jobs: sh -c "cd ~/work; ./perl -Ilib -V; ./perl -Ilib -e 'use Config; print Config::config_sh'" - name: Run Tests shell: cmd + # Descend far enough down the cygwin yak warren, and one discovers that + # hints/cygwin.sh sets ldlibpthname=PATH + # Meaning that the Makefile variable LDLIBPTH is "PATH=..." + # Meaning that the command to invoke ./runtests is PATH=... ./perl.exe + # *Not* LD_LIBRARY_PATH or anything conventionally unix-like + # + # Cygwin is the slowest CI test. Breaking the abstractions described + # above/committing this DRY violation means that we avoid needing to + # `make -j2 test` to invoke t/TEST, and avoiding that likely saves us + # about 40 seconds, which is nearly 1% of the total wallclock time for + # complete all CI runs. run: | path %GITHUB_WORKSPACE%\cygwin\bin;%GITHUB_WORKSPACE%\cygwin\usr\bin - sh -c "cd ~/work; make -j2 test" + sh -c "cd ~/work; PATH=`pwd`:.:$PATH ./perl.exe t/TEST" # _ _ _ _ # _ __ ___ (_)_ __ (_) |_ ___ ___| |_ |