diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 564e02af..807c8645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | diff --git a/tutorial/cpstut2.nim b/tutorial/cpstut2.nim index d1fce4ac..8cf26bc6 100644 --- a/tutorial/cpstut2.nim +++ b/tutorial/cpstut2.nim @@ -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