BuildID: 2382
Status: OK
Image: melezhik/sparrow:debian
Worker status: OK
---
Date: 30.12.2022 @ 00:22
Time elapsed: 175 sec
---
SCM:
https://github.com/melezhik/Text-Sorensen.git
Git sha: 79cb661
Git comment: no build
image:
- melezhik/sparrow:debian
tasks:
-
name: main
default: true
language: Raku
code: |
use Text::Table::Simple;
my @columns = ("Rakudo Version", "Status", "Time", "Linux Dist");
my @rows;
my $fail = False;
for config()<tasks><multi-versions><state><list><> -> $i {
@rows.push: [ $i<version>, $i<status>, $i<time>, os() ];
$fail = True unless $i<status> eq "OK";
}
my @table = lol2table(@columns,@rows);
.say for @table;
die "some tests failed" if $fail == True;
depends:
-
name: multi-versions
followup:
-
name: good-doc
-
name: good-doc
plugin: good-doc
config:
path: source/README.md
rakudo_path: "{{ CWD }}/rakudo-moar-2022.12-01-linux-x86_64-gcc"
-
name: multi-versions
language: Raku
config:
list:
# - 2022.04
#- 2022.07
- 2022.12
code: |
my @state;
for config()<list><> -> $v {
my $s = %( version => $v );
if "{cache_root_dir()}/{$v}_ok".IO ~~ :e {
$s<status> = "OK";
} else {
$s<status> = "FAIL";
}
if "{cache_root_dir()}/{$v}_time".IO ~~ :e {
$s<time> = "{cache_root_dir()}/{$v}_time".IO.slurp();
} else {
$s<time> = "NA";
}
@state.push: $s;
}
update_state %( list => @state );
init: |
for config()<list><> -> $v {
run_task("test", %( version => $v ));
}
subtasks:
-
name: test
language: Bash
init: |
ignore_error
code: |
set -e
echo "Linux version: $os"
curl -sL https://rakudo.org/dl/rakudo/rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz \
-o rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz
tar -xzf rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz
eval "$(rakudo-moar-$version-01-linux-x86_64-gcc/scripts/set-env.sh --quiet)"
which raku
which zef
raku --version
zef --version
cd source/
zef install . --deps-only --test-depends --build-depends --/test -to=home
/usr/bin/time -f "%E real,%U user,%S sys | CPU Percentage: %P" -o "${cache_root_dir}/${version}_time" \
zef test . && touch "${cache_root_dir}/${version}_ok"
depends:
-
name: install-deps
-
name: install-deps
language: Bash
code: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq time < /dev/null > /dev/null
zef install --/test Text::Table::Simple > /dev/null
[35m00:22:06[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[35m00:22:11[0m :: [repository] - installing good-doc, version 0.000014
[1;36m[task run: task.bash - good-doc][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2]
[3] cd $dir
[4]
[5] cat $file
[6]
[7] rakudo_path=$(config rakudo_path)
[8]
[9] if ! test -z $rakudo_path; then
[10] echo "Using rakudo from $rakudo_path:"
[11] eval "$($rakudo_path/scripts/set-env.sh --quiet)"
[12] raku --version
[13] fi
[14]
[15] echo "run raku -I lib $file ..."
[16]
[17] raku -I lib $file || echo "warn: good_doc failed"
[18]
[1;36m[task stdout][0m
[35m00:22:13[0m ::
[35m00:22:13[0m :: use Text::Sorensen :sorensen;
[35m00:22:13[0m ::
[35m00:22:13[0m :: # test a word against a small list
[35m00:22:13[0m :: say sorensen('compition', 'completion', 'competition');
[35m00:22:13[0m ::
[35m00:22:13[0m :: # ([0.777778 competition] [0.705882 completion])
[35m00:22:13[0m ::
[35m00:22:13[0m ::
[35m00:22:13[0m :: # or against a large one
[35m00:22:13[0m :: my %hash = './unixdict.txt'.IO.slurp.words.race.map: { $_ => .&bi-gram };
[35m00:22:13[0m ::
[35m00:22:13[0m :: .say for sorensen('compition', %hash).head(5);
[35m00:22:13[0m :: # [0.777778 competition]
[35m00:22:13[0m :: # [0.777778 compilation]
[35m00:22:13[0m :: # [0.777778 composition]
[35m00:22:13[0m :: # [0.705882 completion]
[35m00:22:13[0m :: # [0.7 decomposition]
[35m00:22:13[0m ::
[35m00:22:13[0m ::
[35m00:22:13[0m :: use Text::Sorensen :jaccard;
[35m00:22:13[0m ::
[35m00:22:13[0m :: .say for jaccard('compition', %hash).head(5);
[35m00:22:13[0m :: # [0.636364 competition]
[35m00:22:13[0m :: # [0.636364 compilation]
[35m00:22:13[0m :: # [0.636364 composition]
[35m00:22:13[0m :: # [0.545455 completion]
[35m00:22:13[0m :: # [0.538462 decomposition]
[35m00:22:14[0m :: Using rakudo from /var/.sparrowdo/env/main/.sparrowdo/rakudo-moar-2022.12-01-linux-x86_64-gcc:
[35m00:22:14[0m :: Welcome to Rakudo™ v2022.12.
[35m00:22:14[0m :: Implementing the Raku® Programming Language v6.d.
[35m00:22:14[0m :: Built on MoarVM version 2022.12.
[35m00:22:14[0m :: run raku -I lib /home/worker/.sparrow6/tmp/35020/code.raku ...
[35m00:22:16[0m :: ([0.777778 competition] [0.705882 completion])
[35m00:22:16[0m :: warn: good_doc failed
[1;36m[task stderr][0m
[35m00:22:16[0m :: Failed to open file /var/.sparrowdo/env/main/.sparrowdo/source/unixdict.txt: No such file or directory
[35m00:22:16[0m :: in block <unit> at /home/worker/.sparrow6/tmp/35020/code.raku line 11
[35m00:22:16[0m ::
[35m00:20:27[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
source directory does not yet exist, download source archive from storage
[35m00:20:31[0m :: [repository] - installing pack-unpack, version 0.000001
[1;36m[task run: task.bash - unpack source archive][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2]
[3] file=$(config file)
[4] dir=$(config dir)
[5]
[6] echo "tar -xzf $file "
[7]
[8] tar -xzf $file
[9]
[10] if test $dir; then
[11] ls -l $dir
[12] fi
[13]
[14]
[1;36m[task stdout][0m
[35m00:20:35[0m :: tar -xzf source.tar.gz
[1;36m[task run: task.raku - tasks/main][0m
[1;36m[dump code: task.raku][0m
[1] use Text::Table::Simple;
[2] my @columns = ("Rakudo Version", "Status", "Time", "Linux Dist");
[3] my @rows;
[4] my $fail = False;
[5] for config()<tasks><multi-versions><state><list><> -> $i {
[6] @rows.push: [ $i<version>, $i<status>, $i<time>, os() ];
[7] $fail = True unless $i<status> eq "OK";
[8] }
[9] my @table = lol2table(@columns,@rows);
[10] .say for @table;
[11] die "some tests failed" if $fail == True;
[12]
[1;36m[task stdout][0m
[35m00:21:54[0m :: O----------------O--------O--------------------------------------------------------O------------O
[35m00:21:54[0m :: | Rakudo Version | Status | Time | Linux Dist |
[35m00:21:54[0m :: O================O========O========================================================O============O
[35m00:21:54[0m :: | 2022.12 | OK | 0:05.06 real,6.98 user,0.76 sys | CPU Percentage: 153% | debian |
[35m00:21:54[0m :: -------------------------------------------------------------------------------------------------
[35m00:21:00[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.bash - tasks/multi-versions][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] echo "Linux version: $os"
[3] curl -sL https://rakudo.org/dl/rakudo/rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz \
[4] -o rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz
[5] tar -xzf rakudo-moar-$version-01-linux-x86_64-gcc.tar.gz
[6] eval "$(rakudo-moar-$version-01-linux-x86_64-gcc/scripts/set-env.sh --quiet)"
[7] which raku
[8] which zef
[9] raku --version
[10] zef --version
[11]
[12] cd source/
[13] zef install . --deps-only --test-depends --build-depends --/test -to=home
[14] /usr/bin/time -f "%E real,%U user,%S sys | CPU Percentage: %P" -o "${cache_root_dir}/${version}_time" \
[15] zef test . && touch "${cache_root_dir}/${version}_ok"
[16]
[1;36m[task stdout][0m
[35m00:21:36[0m :: Linux version: debian
[35m00:21:37[0m :: /var/.sparrowdo/env/main/.sparrowdo/rakudo-moar-2022.12-01-linux-x86_64-gcc/bin/raku
[35m00:21:37[0m :: /var/.sparrowdo/env/main/.sparrowdo/rakudo-moar-2022.12-01-linux-x86_64-gcc/share/perl6/site/bin/zef
[35m00:21:37[0m :: Welcome to Rakudo™ v2022.12.
[35m00:21:37[0m :: Implementing the Raku® Programming Language v6.d.
[35m00:21:37[0m :: Built on MoarVM version 2022.12.
[35m00:21:38[0m :: v0.14.5
[35m00:21:43[0m :: ===> Testing: Text::Sorensen:ver<0.0.2>:auth<zef:thundergnat>
[35m00:21:46[0m :: ===> Testing [OK] for Text::Sorensen:ver<0.0.2>:auth<zef:thundergnat>
[1;36m[task stderr][0m
[35m00:21:46[0m :: All candidates are currently installed
[1;36m[task run: task.raku - tasks/multi-versions][0m
[1;36m[dump code: task.raku][0m
[1] my @state;
[2] for config()<list><> -> $v {
[3] my $s = %( version => $v );
[4] if "{cache_root_dir()}/{$v}_ok".IO ~~ :e {
[5] $s<status> = "OK";
[6] } else {
[7] $s<status> = "FAIL";
[8] }
[9] if "{cache_root_dir()}/{$v}_time".IO ~~ :e {
[10] $s<time> = "{cache_root_dir()}/{$v}_time".IO.slurp();
[11] } else {
[12] $s<time> = "NA";
[13] }
[14] @state.push: $s;
[15] }
[16] update_state %( list => @state );
[17]
[1;36m[task stdout][0m
[35m00:21:12[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.bash - tasks/install-deps][0m
[1;36m[dump code: task.bash][0m
[1] sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq time < /dev/null > /dev/null
[2] zef install --/test Text::Table::Simple > /dev/null
[3]
[1;36m[task stdout][0m
[1;36m[task stderr][0m
[35m00:21:33[0m :: debconf: delaying package configuration, since apt-utils is not installed
[35m00:21:33[0m :: ===> Updating fez mirror: https://360.zef.pm/
[35m00:21:33[0m :: ===> Updated fez mirror: https://360.zef.pm/
[35m00:21:33[0m :: ===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
[35m00:21:33[0m :: ===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json