Skip to content

Commit

Permalink
Merge pull request #2 from melezhik/patch-2
Browse files Browse the repository at this point in the history
use system Rakudo
  • Loading branch information
antononcube authored Dec 25, 2023
2 parents 39e5940 + 3ec4162 commit 985b1f0
Showing 1 changed file with 4 additions and 77 deletions.
81 changes: 4 additions & 77 deletions sparrow.yaml
Original file line number Diff line number Diff line change
@@ -1,83 +1,10 @@
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
-
name: multi-versions
language: Raku
config:
list:
# - 2022.04
- 2022.06
- 2022.07
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)"
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 apt-get install -y time
zef install --/test Text::Table::Simple
set -e
cd source/
zef install --/test .
zef test .

0 comments on commit 985b1f0

Please sign in to comment.