Skip to content

Commit 23018cc

Browse files
authored
Add SuperML (#433)
* Add SuperML I'm doing this as a PR for testing the new workflow * Whoops, don't include empty GitLab * Add ``` to results.txt * Lets try this * Proper script * don't fail * fixes * typo fix
1 parent 30577c9 commit 23018cc

File tree

6 files changed

+34
-2
lines changed

6 files changed

+34
-2
lines changed

.github/workflows/pull-request.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,23 @@ jobs:
1919
env:
2020
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
run: |
22-
UPDATED_APPS=$(git diff --name-only HEAD~1 | grep source/apps)
23-
source/generate.py app-test $UPDATED_APPS > results.txt
22+
UPDATED_APPS=$(git diff --name-only HEAD | grep source/apps || true)
23+
24+
if [ -n "$UPDATED_APPS" ]; then
25+
echo '<details><summary>Test Results</summary>' > results.txt
26+
echo '' >> results.txt
27+
echo '```json' >> results.txt
28+
source/generate.py app-test $UPDATED_APPS >> results.txt
29+
if [ $? -eq 0 ]; then
30+
echo '```' >> results.txt
31+
echo '</details>' >> results.txt
32+
else
33+
rm results.txt
34+
fi
35+
fi
2436
2537
- name: Comment results
38+
if: ${{ hashFiles('results.txt') != '' }}
2639
uses: thollander/actions-comment-pull-request@v3
2740
with:
2841
file-path: results.txt
55 KB
Loading
31.6 KB
Loading
33.2 KB
Loading

source/apps/superml.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"github": "CharlesAverill/SuperML",
3+
"systems": [
4+
"3ds"
5+
],
6+
"categories": [
7+
"app"
8+
],
9+
"image": "https://raw.githubusercontent.com/CharlesAverill/SuperML/refs/heads/main/resources/banner/banner.png",
10+
"icon": "https://raw.githubusercontent.com/CharlesAverill/SuperML/refs/heads/main/resources/icon.png",
11+
"unique_ids": [
12+
260525
13+
],
14+
"long_description": "An interpreter and text editor for a subset of the [Caml Programming Language](https://en.wikipedia.org/wiki/Caml) for the Nintendo 3DS.\n\nGreat thanks to\n- [Notepad3DS](https://github.com/MaeveMcT/Notepad3DS) as a jumping-off point for the text editor segment of this project.\n- [min-caml](https://esumii.github.io/min-caml/index-e.html) as a minimal Caml implementation I've based mine on\n\n## Progress\n\n### Application Features\n\n### Language Features\n\n- Parser bulit with Flex+Bison\n- Hindley-Milner Type Inference (slightly janky)\n- Rudimentary builtin functions for input and output\n\n### Application Features\n\n- Text editing\n- Development interpreter target for host system\n- Load/Save on SD Card"
15+
}

source/generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,10 @@ def app_test(apps: TextIO, github_token: Optional[str], docs: str):
10801080
global DOCS_DIR
10811081
DOCS_DIR = docs_path
10821082

1083+
if len(apps) < 1:
1084+
click.echo("Please specifiy at least one app")
1085+
exit(1)
1086+
10831087
for app in apps:
10841088
content = json.loads(app.read())
10851089

0 commit comments

Comments
 (0)