Skip to content

Commit

Permalink
Initialize lab4
Browse files Browse the repository at this point in the history
  • Loading branch information
fduTristin authored Jan 31, 2025
0 parents commit 9f6b697
Show file tree
Hide file tree
Showing 31 changed files with 272,272 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Autograding Tests
'on':
- push
- repository_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Part A
id: part-a
uses: kooWZ/autograding-io-grader@v4
with:
test-name: Part A
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
command: python3 driver.py -A > grade && cat grade
input: ''
expected-output: '0'
comparison-method: cachelab
timeout: 10
max-score: 39
- name: Part B 48*48
id: part-b-48-48
uses: kooWZ/autograding-io-grader@v4
with:
test-name: Part B 48*48
setup-command:
command: cat grade
input: ''
expected-output: '1'
comparison-method: cachelab
timeout: 10
max-score: 17
- name: Part B 96*96
id: part-b-96-96
uses: kooWZ/autograding-io-grader@v4
with:
test-name: Part B 96*96
setup-command:
command: cat grade
input: ''
expected-output: '2'
comparison-method: cachelab
timeout: 10
max-score: 17
- name: Part C
id: part-c
uses: kooWZ/autograding-io-grader@v4
with:
test-name: Part C
setup-command:
command: cat grade
input: ''
expected-output: '3'
comparison-method: cachelab
timeout: 10
max-score: 9
- name: Autograding Reporter
uses: kooWZ/autograding-grading-reporter@v5
env:
PART-A_RESULTS: "${{steps.part-a.outputs.result}}"
PART-B-48-48_RESULTS: "${{steps.part-b-48-48.outputs.result}}"
PART-B-96-96_RESULTS: "${{steps.part-b-96-96.outputs.result}}"
PART-C_RESULTS: "${{steps.part-c.outputs.result}}"
with:
runners: part-a,part-b-48-48,part-b-96-96,part-c
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.csim_results
.marker
trace.tmp
tracegen
*.o
trace.f*
csim
test-trans
test-mul
heatgen
test-heat
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Student makefile for Cache Lab
# Note: requires a 64-bit x86-64 system
#
CC = gcc
CFLAGS = -g -Wall -Werror -std=c99 -m64

all: csim test-trans tracegen

csim: csim.c cachelab.c cachelab.h
$(CC) $(CFLAGS) -o csim csim.c cachelab.c queue.c -lm

test-trans: test-trans.c trans.o cachelab.c cachelab.h
$(CC) $(CFLAGS) -o test-trans test-trans.c cachelab.c trans.o

tracegen: tracegen.c trans.o cachelab.c
$(CC) $(CFLAGS) -O0 -o tracegen tracegen.c trans.o cachelab.c

trans.o: trans.c
$(CC) $(CFLAGS) -O0 -c trans.c

#
# Clean the src dirctory
#
clean:
rm -rf *.o
rm -f *.tar
rm -f csim
rm -f test-trans tracegen
rm -f trace.all trace.f*
rm -f .csim_results .marker
1,577 changes: 1,577 additions & 0 deletions README.html

Large diffs are not rendered by default.

Loading

0 comments on commit 9f6b697

Please sign in to comment.