diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..72cdc0a2441972af25eba599ad6a979839c50641 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +stages: + - test + +test: + stage: test + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - ./run_tests.sh + tags: + - docker + +grade: + stage: grade + image: czen/ubuntu_xbuild + script: + - ./prebuild.sh + - ./build.sh + - ./grade.sh + only: + - master + tags: + - docker diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000000000000000000000000000000000000..409719af10c23aed2a8f5d0bee8b5dec18ef8cf3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +#FROM gitpod/workspace-dotnet +FROM ubuntu:latest + +RUN apt-get update && apt install -y nuget mono-devel mono-xbuild +RUN nuget update -self +RUN mkdir /compilers + +WORKDIR /compilers \ No newline at end of file diff --git a/grade.sh b/grade.sh new file mode 100755 index 0000000000000000000000000000000000000000..4d27c440a4dda7df31badd01682f4b3d698a0bff --- /dev/null +++ b/grade.sh @@ -0,0 +1,16 @@ + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestSimpleLexer/bin/Debug/TestSimpleLexer.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestLexer/bin/Debug/TestLexer.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestDescentParser/bin/Debug/TestDescentParser.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedParser/bin/Debug/TestGeneratedParser.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestASTParser/bin/Debug/TestASTParser.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestVisitors/bin/Debug/TestVisitors.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} + mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestCodeGenerator/bin/Debug/TestCodeGenerator.dll + mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG} \ No newline at end of file diff --git a/prebuild.sh b/prebuild.sh new file mode 100755 index 0000000000000000000000000000000000000000..a5069aaa835efd7bbf1d85e087cf65e9a6c5e7d0 --- /dev/null +++ b/prebuild.sh @@ -0,0 +1,2 @@ +#!/bin/bash +nuget restore Compilers.sln \ No newline at end of file