Skip to content

Commit

Permalink
Merge 8ab153e into sapling-pr-archive-shish
Browse files Browse the repository at this point in the history
  • Loading branch information
shish authored Sep 23, 2023
2 parents 62941c5 + 8ab153e commit e03a022
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 4 deletions.
19 changes: 19 additions & 0 deletions all.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,22 @@ def trace(lang: str, rom: Path) -> bool:
print(f"{lang:>5s}: {GREEN}Wrote {lang}.cpu{END}")
return True

def version(lang: str) -> bool:
proc = subprocess.run(
[f"./version.sh"],
cwd=lang,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
)
v = proc.stdout.strip()
if proc.returncode != 0:
print(f"{lang:>5s}: {RED}{v}{END}")
return False
else:
print(f"{lang:>5s}: {GREEN}{v}{END}")
return True

def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down Expand Up @@ -247,6 +263,9 @@ def main() -> int:
if args.command == "trace":
results = p.starmap(trace, [(l, args.test_rom) for l in args.langs])

if args.command == "version":
results = p.starmap(version, [(l, ) for l in args.langs])

if all(results):
return 0
else:
Expand Down
2 changes: 2 additions & 0 deletions c/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
cc --version | head -n 1
2 changes: 2 additions & 0 deletions cpp/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
cpp --version | head -n 1
2 changes: 2 additions & 0 deletions go/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
go version
2 changes: 2 additions & 0 deletions nim/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
nim --version | head -n 1
2 changes: 2 additions & 0 deletions php/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
php --version | head -n 1
2 changes: 2 additions & 0 deletions pxd/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
python --version
2 changes: 2 additions & 0 deletions py/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
python --version
2 changes: 2 additions & 0 deletions rs/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cargo --version
23 changes: 21 additions & 2 deletions zig/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
RosettaBoy - Zig Edition
========================

Make sure you fetch the GIT submodules if you didn't clone recursively:
Ideally, clone recursively:

```
$ git clone https://github.com/shish/rosettaboy --recursive
```

Or retroactively:

```
$ git submodule update --recursive
```

And to update submodules because the build.zig API changed again:

```
cd lib/sdl
git pull
git checkout master
cd ../clap
git pull
git checkout master
cd ../../
git commit -a -m "bump dependencies"
```

Usage
-----
```
Expand Down Expand Up @@ -102,4 +121,4 @@ Thoughts on Zig
fast, almost twice as fast as C++ and Rust for this use-case; I have no
idea how it manages that. The zig implementation is still missing a
couple of bits, like the audio processor implementation - but I can't
think of anything that would have any significant effect on performance.
think of anything that would have any significant effect on performance.
2 changes: 1 addition & 1 deletion zig/lib/clap
Submodule clap updated 2 files
+1 −1 build.zig
+14 −14 clap.zig
2 changes: 1 addition & 1 deletion zig/lib/sdl
Submodule sdl updated from fbe5f5 to 602aeb
2 changes: 2 additions & 0 deletions zig/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
zig version

0 comments on commit e03a022

Please sign in to comment.