Silinx · User's guideTry Silinx

Grading with GitHub Classroom

User's guide · Teaching with Silinx · English

A Silinx exercise (GRADING.md) can be a GitHub Classroom assignment (#3193).

The hidden tests never go in the students' repositories. Whatever runs there, a student can read or change: the template has the student's copy of the exercise only, with its visible tests and no reference.

1. The template repository

Make the template from the exercise and the project the students start from (exercises/counter4 is an example):

silinx classroom template exercises/counter4/counter4.exercise.json exercises/counter4/starter counter4-template

Leave out the starter project, and the template's starter is made from the statement: a silinx.json of the Basys2 and the top module with the statement's ports and an empty body, in VHDL (--language verilog for Verilog). In Silinx, the Exercise document's ⋮ menu makes the same template as a zip (Classroom Template…, the starter in the language chosen, on the project's board and device), and Export Student Copy saves the student's copy alone. The MCP server's grade tool does both (template, student_copy).

The folder counter4-template then holds:

Push the folder as a repository of the course's organization, and mark it a template (Settings ▸ Template repository). With the GitHub CLI:

cd counter4-template && git init -b main && git add -A && git commit -m "counter4" && gh repo create my-course/counter4-template --private --source . --push
gh repo edit my-course/counter4-template --template

2. The assignment

In GitHub Classroom, create an assignment with the template repository as its starter code. Its repository prefix is the assignment's name, here counter4: the students' repositories are then counter4-<student>. Classroom's own autograding is not needed: Silinx's workflow is the check.

3. What the students see

4. The teacher's run at the deadline

On the teacher's machine, where the GitHub CLI is signed in with access to the organization (gh auth login), run the whole exercise, the teacher's own with its hidden tests, over every repository of the assignment:

silinx classroom grade exercises/counter4/counter4.exercise.json --org my-course --assignment counter4 --out runs/counter4 --before 2026-12-01T23:59 --csv grades.csv
silinx classroom grade exercises/counter4/counter4.exercise.json --org my-course --assignment counter4 --out runs/counter4-issues --issues --quiet

The same run can be a workflow of a private repository of the teacher's, holding the exercise with its hidden tests. It is triggered by hand, runs silinx classroom grade with a token that may read the organization's repositories (a secret of that private repository, as GH_TOKEN), and keeps the CSV as an artifact. The token is never given to the students' repositories.