Skip to content

Commit

Permalink
10.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 10, 2024
1 parent 79c7ebc commit 0c187de
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 40 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- ubuntu-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
28 changes: 28 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: MacOS

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- macos-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
12 changes: 5 additions & 7 deletions .github/workflows/test.yml → .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Windows

on:
push:
Expand All @@ -13,18 +13,16 @@ jobs:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef -v install --/test --test-depends --deps-only .
- name: Run Tests
run: raku run-tests
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Revision history for uniname-words

{{$NEXT}}

10.0.14 2024-08-10T13:51:34+02:00
- Up dependency on Map::Match
- Add sponsor button
- Add separate CI badges for each OS
- Update copyright year

10.0.13 2023-12-19T11:21:02+01:00
- Up dependency on Map::Match
- Update copyright year
Expand Down
4 changes: 2 additions & 2 deletions META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build-depends": [
],
"depends": [
"Map::Match:ver<0.0.4>:auth<zef:lizmat>"
"Map::Match:ver<0.0.5>:auth<zef:lizmat>"
],
"description": "look for words in unicode character names",
"license": "Artistic-2.0",
Expand All @@ -23,5 +23,5 @@
],
"test-depends": [
],
"version": "10.0.13"
"version": "10.0.14"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Actions Status](https://github.com/lizmat/uniname-words/workflows/test/badge.svg)](https://github.com/lizmat/uniname-words/actions)
[![Actions Status](https://github.com/lizmat/uniname-words/actions/workflows/linux.yml/badge.svg)](https://github.com/lizmat/uniname-words/actions) [![Actions Status](https://github.com/lizmat/uniname-words/actions/workflows/macos.yml/badge.svg)](https://github.com/lizmat/uniname-words/actions) [![Actions Status](https://github.com/lizmat/uniname-words/actions/workflows/windows.yml/badge.svg)](https://github.com/lizmat/uniname-words/actions)

NAME
====
Expand Down Expand Up @@ -59,7 +59,7 @@ If you like this module, or what I’m doing more generally, committing to a [sm
COPYRIGHT AND LICENSE
=====================

Copyright 2021, 2022, 2023 Elizabeth Mattijsen
Copyright 2021, 2022, 2023, 2024 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

4 changes: 3 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ filename = lib/uniname-words.rakumod
; match = ^ 'xt/'

[Badges]
provider = github-actions/test
provider = github-actions/linux.yml
provider = github-actions/macos.yml
provider = github-actions/windows.yml

[UploadToZef]
4 changes: 2 additions & 2 deletions lib/uniname-words.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ my $match;
my multi sub uniname-words(Regex:D $regex) {
without $match {
use nqp;
use Map::Match:ver<0.0.4>:auth<zef:lizmat>;
use Map::Match:ver<0.0.5>:auth<zef:lizmat>;
$match := nqp::create(Map::Match);
nqp::bindattr($match,Map::Match,'%!map',%uniname-words);
nqp::bindattr($match,Map::Match,'$!keys',nqp::decont($words));
Expand Down Expand Up @@ -211,7 +211,7 @@ deal to me!
=head1 COPYRIGHT AND LICENSE
Copyright 2021, 2022, 2023 Elizabeth Mattijsen
Copyright 2021, 2022, 2023, 2024 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
Expand Down
60 changes: 34 additions & 26 deletions run-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit sub MAIN(:$author);
unit sub MAIN(:a($author), :i($install));

say run(<raku --version>, :out).out.slurp.chomp;
say "Running on $*DISTRO.gist().\n";
Expand All @@ -12,42 +12,50 @@ say "Testing {
my @failed;
my $done = 0;

sub test-dir($dir) {
for $dir.IO.dir(:test(*.ends-with: '.t' | '.rakutest')).map(*.Str).sort {
say "=== $_";
my $proc := run "raku", "--ll-exception", "-I.", $_, :out,:err,:merge;
if $proc {
$proc.out.slurp;
}
else {
@failed.push($_);
if $proc.out.slurp -> $stdout {
my @lines = $stdout.lines;
with @lines.first(
*.starts-with(" from gen/moar/stage2"),:k)
-> $index {
say @lines[^$index].join("\n");
}
else {
say $stdout;
}
}
elsif $proc.err -> $stderr {
say .slurp with $stderr;
sub process($proc, $filename) {
if $proc {
$proc.out.slurp;
}
else {
@failed.push($filename);
if $proc.out.slurp -> $stdout {
my @lines = $stdout.lines;
with @lines.first(
*.starts-with(" from gen/moar/stage2"),:k)
-> $index {
say @lines[^$index].join("\n");
}
else {
say "No output received, exit-code $proc.exitcode() ($proc.signal())";
say $stdout;
}
}
else {
say "No output received, exit-code $proc.exitcode() ($proc.signal()):\n$proc.os-error()";
}
}
}

sub install() {
my $zef := $*DISTRO.is-win ?? 'zef.bat' !! 'zef';
my $proc := run $zef, "install", ".", "--verbose", "--/test", :out,:err,:merge;
process($proc, "*installation*");
}

sub test-dir($dir) {
for $dir.IO.dir(:test(*.ends-with: '.t' | '.rakutest')).map(*.Str).sort {
say "=== $_";
my $proc := run "raku", "--ll-exception", "-I.", $_, :out,:err,:merge;
process($proc, $_);
$done++;
}
}

test-dir("t");
test-dir("xt") if $author;
test-dir("xt") if $author && "xt".IO.e;
install if $install;

if @failed {
say "FAILED: {+@failed} of $done:";
say "\nFAILED: {+@failed} of $done:";
say " $_" for @failed;
exit +@failed;
}
Expand Down

0 comments on commit 0c187de

Please sign in to comment.