Skip to content

Commit 27575ef

Browse files
authored
update classroom.yml .keep autograding.json for classroom CI test
1 parent e74c667 commit 27575ef

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/classroom/autograding.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tests": [
3+
{
4+
"name": "run_os2",
5+
"setup": "",
6+
"run": "make test2",
7+
"input": "",
8+
"output": "",
9+
"comparison": "included",
10+
"timeout": 15,
11+
"points": 100
12+
}
13+
]
14+
}

.github/workflows/classroom.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: GitHub Classroom Workflow
2+
3+
on: [push]
4+
5+
permissions:
6+
checks: write
7+
actions: read
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: Autograding
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
profile: minimal
19+
toolchain: nightly-2022-04-11
20+
components: rust-src, llvm-tools-preview
21+
target: riscv64gc-unknown-none-elf
22+
- uses: actions-rs/[email protected]
23+
with:
24+
crate: cargo-binutils
25+
version: latest
26+
use-tool-cache: true
27+
- name: Cache QEMU
28+
uses: actions/cache@v3
29+
with:
30+
path: qemu-7.0.0
31+
key: qemu-7.0.0-x86_64-riscv64
32+
- name: Install QEMU
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install ninja-build -y
36+
if [ ! -d qemu-7.0.0 ]; then
37+
wget https://download.qemu.org/qemu-7.0.0.tar.xz
38+
tar -xf qemu-7.0.0.tar.xz
39+
cd qemu-7.0.0
40+
./configure --target-list=riscv64-softmmu
41+
make -j
42+
else
43+
cd qemu-7.0.0
44+
fi
45+
sudo make install
46+
qemu-system-riscv64 --version
47+
- uses: education/autograding@v1

0 commit comments

Comments
 (0)