Skip to content

Commit

Permalink
zz
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Dec 26, 2024
1 parent 76a2965 commit 15fdf1d
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 版权 @2024 凹语言 作者。保留所有权利。

name: Run Wa App
on:
pull_request:
push:
branches:
- main
- master
- "releases/*"
jobs:
build-and-test-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Set up Wa(凹语言)
uses: wa-lang/setup-wa

- run: wa -v
- run: wa run heart.wa

build-and-test-windows:
runs-on: windows-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Set up Wa(凹语言)
uses: wa-lang/setup-wa

- run: wa -v
- run: wa run heart.wa

build-and-test-macos:
runs-on: macos-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Set up Wa(凹语言)
uses: wa-lang/setup-wa

- run: wa -v
- run: wa run heart.wa
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# Setup Wa Language Action
# Setup Wa Language

```yaml
name: Test
on: push
jobs:
build:
name: Run Wa App
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Set up Wa(凹语言)
uses: wa-lang/setup-wa

- run: wa -v
- run: wa run heart.wa
```
Output:
```text
$ wa run heart.wa


@@@@@@ @@@@@@
@@@@@@@@@@@@@ @@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@
@@@@@@@@
@@
```
16 changes: 16 additions & 0 deletions heart.wa
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 版权 @2019 凹语言 作者。保留所有权利。

func main {
a := 0.0
for y := 1.5; y > -1.5; y = y - 0.15 {
for x := -1.5; x < 1.5; x = x + 0.07 {
a = x*x + y*y - 1.0
if a*a*a < x*x*y*y*y {
print("@")
} else {
print(" ")
}
}
println()
}
}

0 comments on commit 15fdf1d

Please # to comment.