-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from melezhik/patch-2
use system Rakudo
- Loading branch information
Showing
1 changed file
with
4 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |