From ca8fd0d90689b63e799eafe05d6b3eeb7b5c476a Mon Sep 17 00:00:00 2001 From: Anton Bagliy <taccessviolation@gmail.com> Date: Wed, 27 Jan 2021 01:52:29 +0300 Subject: [PATCH] ADD: standalone Dockerfile and gitlab-ci integration --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ Dockerfile | 8 ++++++++ grade.sh | 16 ++++++++++++++++ prebuild.sh | 2 ++ 4 files changed, 50 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100755 Dockerfile create mode 100755 grade.sh create mode 100755 prebuild.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..72cdc0a --- /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 0000000..409719a --- /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 0000000..4d27c44 --- /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 0000000..a5069aa --- /dev/null +++ b/prebuild.sh @@ -0,0 +1,2 @@ +#!/bin/bash +nuget restore Compilers.sln \ No newline at end of file -- GitLab