From c097e0ab7c517ff79643affaaef5c54e0605206f Mon Sep 17 00:00:00 2001 From: Yu Chen Date: Tue, 28 Jun 2022 23:34:25 +0800 Subject: [PATCH] update Makfile for classroom autograding --- Makefile | 110 ++++++++++++++++++++++++++++++++- scripts/autograding-test1.json | 14 +++++ scripts/autograding-test2.json | 14 +++++ scripts/autograding-test3.json | 14 +++++ scripts/autograding-test4.json | 14 +++++ scripts/autograding-test5.json | 14 +++++ scripts/autograding-test6.json | 14 +++++ scripts/autograding-test8.json | 14 +++++ 8 files changed, 205 insertions(+), 3 deletions(-) create mode 100644 scripts/autograding-test1.json create mode 100644 scripts/autograding-test2.json create mode 100644 scripts/autograding-test3.json create mode 100644 scripts/autograding-test4.json create mode 100644 scripts/autograding-test5.json create mode 100644 scripts/autograding-test6.json create mode 100644 scripts/autograding-test8.json diff --git a/Makefile b/Makefile index 3e3dcd7..bd98266 100644 --- a/Makefile +++ b/Makefile @@ -69,11 +69,115 @@ docker: build_docker: docker build -t ${DOCKER_NAME} . -setupclassroom: +setupclassroom_test1: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test1.json .github/classroom/autograding.json cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json git add .github/workflows/classroom.yml - git commit -m"update classroom.yml for classroom CI test" - git push + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test2: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test2.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test3: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test3.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test4: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test4.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test5: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test5.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test1: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test1.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test6: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test6.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test7: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test7.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + +setupclassroom_test8: + mkdir -p .github/classroom/ + mkdir -p .github/workflows/ + touch .github/.keep + cp scripts/autograding-test8.json .github/classroom/autograding.json + cp scripts/classroom.yml .github/workflows/classroom.yml + git add .github/classroom/autograding.json + git add .github/workflows/classroom.yml + git add .github/.keep + git commit -m"update classroom.yml .keep autograding.json for classroom CI test" + git push + + # setupenv: # sudo apt-get update # sudo apt-get install -y curl wget autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc xz-utils zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev git tmux python3 diff --git a/scripts/autograding-test1.json b/scripts/autograding-test1.json new file mode 100644 index 0000000..4c73428 --- /dev/null +++ b/scripts/autograding-test1.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os1", + "setup": "", + "run": "make test1", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test2.json b/scripts/autograding-test2.json new file mode 100644 index 0000000..cc80191 --- /dev/null +++ b/scripts/autograding-test2.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os2", + "setup": "", + "run": "make test2", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test3.json b/scripts/autograding-test3.json new file mode 100644 index 0000000..218e11c --- /dev/null +++ b/scripts/autograding-test3.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os3", + "setup": "", + "run": "make test3", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test4.json b/scripts/autograding-test4.json new file mode 100644 index 0000000..6c94cd3 --- /dev/null +++ b/scripts/autograding-test4.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os4", + "setup": "", + "run": "make test4", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test5.json b/scripts/autograding-test5.json new file mode 100644 index 0000000..8d75b33 --- /dev/null +++ b/scripts/autograding-test5.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os5", + "setup": "", + "run": "make test5", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test6.json b/scripts/autograding-test6.json new file mode 100644 index 0000000..27faa98 --- /dev/null +++ b/scripts/autograding-test6.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "run_os6", + "setup": "", + "run": "make test6", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file diff --git a/scripts/autograding-test8.json b/scripts/autograding-test8.json new file mode 100644 index 0000000..f153230 --- /dev/null +++ b/scripts/autograding-test8.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "name": "rust_os8", + "setup": "", + "run": "make test8", + "input": "", + "output": "", + "comparison": "included", + "timeout": 15, + "points": 100 + } + ] +} \ No newline at end of file