diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..6ca88db --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,15 @@ +jobs: +- template: script/azure-pipelines-template-mac.yml + parameters: + name: macOS + vmImage: macOS-10.13 + +- template: script/azure-pipelines-template-unix.yml + parameters: + name: Linux + vmImage: ubuntu-16.04 + +- template: script/azure-pipelines-template-win.yml + parameters: + name: Windows + vmImage: vs2017-win2016 diff --git a/script/Dockerfile.bionic b/script/Dockerfile.bionic new file mode 100644 index 0000000..4fd0cbd --- /dev/null +++ b/script/Dockerfile.bionic @@ -0,0 +1,21 @@ +FROM ubuntu:18.04 + +RUN apt-get update -yq && apt-get install -yq build-essential cmake python3.6 python3.6-dev python3-pip python3-setuptools python3-wheel +RUN echo `g++ --version` + +ADD . /app + +# Run UnitTest +WORKDIR /app/test/build +RUN cmake .. && \ + make -j `nproc` && \ + ./unittest + +# Run Additional Test +WORKDIR /app/sample/build +RUN cmake .. && \ + make -j `nproc` + +WORKDIR /app +RUN python -m script.merge && \ + python -m script.string_obfs_tester ./sample/build/string_obfs "Hello World !" diff --git a/script/azure-pipelines-template-mac.yml b/script/azure-pipelines-template-mac.yml new file mode 100644 index 0000000..77ca308 --- /dev/null +++ b/script/azure-pipelines-template-mac.yml @@ -0,0 +1,40 @@ +jobs: +- job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + steps: +# Initialize + - script: git submodule update --init + displayName: Initialize submodule +# UnitTest + - task: CMake@1 + inputs: + workingDirectory: ./test/build + cmakeArgs: ../ + displayName: CMake unittest + + - script: cd ./test/build && make; + displayName: GNU Make unittest + + - script: ./test/build/unittest + displayName: Run unittest +# Additional tests + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.6 + architecture: 'x64' + + - script: python -m script.merge + displayName: Remerge obfuscator.hpp + + - task: CMake@1 + inputs: + workingDirectory: ./sample/build + cmakeArgs: ../ + displayName: CMake sample + + - script: cd ./sample/build && make; + displayName: GNU Make sample + + - script: python -m script.string_obfs_tester ./sample/build/string_obfs "Hello World !" + displayName: String OBFS test diff --git a/script/azure-pipelines-template-unix.yml b/script/azure-pipelines-template-unix.yml new file mode 100644 index 0000000..206fb4c --- /dev/null +++ b/script/azure-pipelines-template-unix.yml @@ -0,0 +1,10 @@ +jobs: +- job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + steps: + - script: git submodule update --init + displayName: initialize submodule + + - script: docker build -f script/Dockerfile.bionic -t cpp_concurrency . + displayName: run docker-bionic diff --git a/script/azure-pipelines-template-win.yml b/script/azure-pipelines-template-win.yml new file mode 100644 index 0000000..ff7715e --- /dev/null +++ b/script/azure-pipelines-template-win.yml @@ -0,0 +1,45 @@ +jobs: +- job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + steps: +# Initialize + - script: git submodule update --init + displayName: Initialize submodule +# UnitTest + - task: CMake@1 + inputs: + workingDirectory: .\test\build + cmakeArgs: ..\ + displayName: CMake unittest + + - task: MSBuild@1 + inputs: + solution: .\test\build\unittest.sln + displayName: MSBuild unittest + + - script: .\test\build\Debug\unittest.exe + displayName: Start unittest +# Additional tests + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.6 + architecture: 'x64' + + - script: python -m script.merge + displayName: Remerge obfuscator.hpp + + - task: CMake@1 + inputs: + workingDirectory: .\sample\build + cmakeArgs: ..\ + displayName: CMake sample + + - task: MSBuild@1 + inputs: + solution: .\sample\build\sample.sln + displayName: MSBuild sample + + - script: python -m script.string_obfs_tester .\sample\build\Debug\string_obfs.exe "Hello World !" + displayName: String OBFS test + \ No newline at end of file