Skip to content

Commit 9f6b697

Browse files
authored
Initialize lab4
0 parents  commit 9f6b697

31 files changed

+272272
-0
lines changed

.github/workflows/classroom.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Autograding Tests
2+
'on':
3+
- push
4+
- repository_dispatch
5+
permissions:
6+
checks: write
7+
actions: read
8+
contents: read
9+
jobs:
10+
run-autograding-tests:
11+
runs-on: ubuntu-latest
12+
if: github.actor != 'github-classroom[bot]'
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Part A
17+
id: part-a
18+
uses: kooWZ/autograding-io-grader@v4
19+
with:
20+
test-name: Part A
21+
setup-command: sudo apt install valgrind && make clean && make && chmod +x ./test-csim && chmod +x ./csim-ref && cd heat-sim && make clean && make && chmod +x ./test-heat
22+
command: python3 driver.py -A > grade && cat grade
23+
input: ''
24+
expected-output: '0'
25+
comparison-method: cachelab
26+
timeout: 10
27+
max-score: 39
28+
- name: Part B 48*48
29+
id: part-b-48-48
30+
uses: kooWZ/autograding-io-grader@v4
31+
with:
32+
test-name: Part B 48*48
33+
setup-command:
34+
command: cat grade
35+
input: ''
36+
expected-output: '1'
37+
comparison-method: cachelab
38+
timeout: 10
39+
max-score: 17
40+
- name: Part B 96*96
41+
id: part-b-96-96
42+
uses: kooWZ/autograding-io-grader@v4
43+
with:
44+
test-name: Part B 96*96
45+
setup-command:
46+
command: cat grade
47+
input: ''
48+
expected-output: '2'
49+
comparison-method: cachelab
50+
timeout: 10
51+
max-score: 17
52+
- name: Part C
53+
id: part-c
54+
uses: kooWZ/autograding-io-grader@v4
55+
with:
56+
test-name: Part C
57+
setup-command:
58+
command: cat grade
59+
input: ''
60+
expected-output: '3'
61+
comparison-method: cachelab
62+
timeout: 10
63+
max-score: 9
64+
- name: Autograding Reporter
65+
uses: kooWZ/autograding-grading-reporter@v5
66+
env:
67+
PART-A_RESULTS: "${{steps.part-a.outputs.result}}"
68+
PART-B-48-48_RESULTS: "${{steps.part-b-48-48.outputs.result}}"
69+
PART-B-96-96_RESULTS: "${{steps.part-b-96-96.outputs.result}}"
70+
PART-C_RESULTS: "${{steps.part-c.outputs.result}}"
71+
with:
72+
runners: part-a,part-b-48-48,part-b-96-96,part-c

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.csim_results
2+
.marker
3+
trace.tmp
4+
tracegen
5+
*.o
6+
trace.f*
7+
csim
8+
test-trans
9+
test-mul
10+
heatgen
11+
test-heat

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Student makefile for Cache Lab
3+
# Note: requires a 64-bit x86-64 system
4+
#
5+
CC = gcc
6+
CFLAGS = -g -Wall -Werror -std=c99 -m64
7+
8+
all: csim test-trans tracegen
9+
10+
csim: csim.c cachelab.c cachelab.h
11+
$(CC) $(CFLAGS) -o csim csim.c cachelab.c queue.c -lm
12+
13+
test-trans: test-trans.c trans.o cachelab.c cachelab.h
14+
$(CC) $(CFLAGS) -o test-trans test-trans.c cachelab.c trans.o
15+
16+
tracegen: tracegen.c trans.o cachelab.c
17+
$(CC) $(CFLAGS) -O0 -o tracegen tracegen.c trans.o cachelab.c
18+
19+
trans.o: trans.c
20+
$(CC) $(CFLAGS) -O0 -c trans.c
21+
22+
#
23+
# Clean the src dirctory
24+
#
25+
clean:
26+
rm -rf *.o
27+
rm -f *.tar
28+
rm -f csim
29+
rm -f test-trans tracegen
30+
rm -f trace.all trace.f*
31+
rm -f .csim_results .marker

README.html

Lines changed: 1577 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)