Skip to content

Commit

Permalink
0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 25, 2024
1 parent aceb936 commit 2117e6d
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 32 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
32 changes: 32 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 NotmuchMail
run: brew install notmuch
- name: Make NotMuchMailD reachable
run: raku -e 'symlink "/opt/homebrew/lib/libnotmuch.5.dylib".IO, $*EXECUTABLE.parent.sibling("lib/libnotmuch.5.dylib")'
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
10 changes: 4 additions & 6 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 install --/test --test-depends --deps-only .
- name: Run Tests
run: raku run-tests
- name: Run Special Tests
run: raku run-tests -i
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Revision history for Wasm-Emitter

{{$NEXT}}

0.9.1 2024-12-25T12:08:43+01:00
- Initial version in the zef ecosystem
4 changes: 2 additions & 2 deletions META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
},
"resources": [
],
"source-url": "https://github.com/raku-community-modules/raku-wasm-emitter",
"source-url": "https://github.com/raku-community-modules/Wasm-Emitter.git",
"tags": [
],
"test-depends": [
],
"version": "0.9"
"version": "0.9.1"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Actions Status](https://github.com/lizmat/Wasm-Emitter/actions/workflows/test.yml/badge.svg)](https://github.com/lizmat/Wasm-Emitter/actions)
[![Actions Status](https://github.com/raku-community-modules/Wasm-Emitter/actions/workflows/linux.yml/badge.svg)](https://github.com/raku-community-modules/Wasm-Emitter/actions) [![Actions Status](https://github.com/raku-community-modules/Wasm-Emitter/actions/workflows/macos.yml/badge.svg)](https://github.com/raku-community-modules/Wasm-Emitter/actions) [![Actions Status](https://github.com/raku-community-modules/Wasm-Emitter/actions/workflows/windows.yml/badge.svg)](https://github.com/raku-community-modules/Wasm-Emitter/actions)

NAME
====
Expand Down
4 changes: 3 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ filename = lib/Wasm/Emitter.rakumod
[UploadToZef]

[Badges]
provider = github-actions/test.yml
provider = github-actions/linux.yml
provider = github-actions/macos.yml
provider = github-actions/windows.yml
56 changes: 34 additions & 22 deletions run-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit sub MAIN(:a($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,39 +12,51 @@ 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;
}
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($_) for dir("t", :test({ !.starts-with(".") && "t/$_".IO.d})).map(*.Str).sort;
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 2117e6d

Please sign in to comment.