Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also test the tutorials #335

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ jobs:
env:
NIM: ${{ matrix.compiler.name }}

- name: Tutorial
shell: bash
run: |
cd project
cd tutorial
balls '***' --path=".." --backend:c --mm:arc --mm:orc
env:
NIM: ${{ matrix.compiler.name }}

- name: Tests
shell: bash
run: |
Expand Down
6 changes: 2 additions & 4 deletions tutorial/cpstut2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import deques

type
MyCont = ref object of Continuation

var work: Deque[Continuation]

proc runWork() =
while work.len > 0:
var c = work.popFirst()
while c.running:
c = c.fn(c)
discard trampoline work.popFirst()

proc schedule(c: MyCont): MyCont {.cpsMagic.} =
work.addLast c
Expand Down
Loading