diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-11 02:39:29 +0000 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-20 00:29:05 +0300 |
commit | da3eb22cb8831553ab3ca7d8bb3249bf67b2ec47 (patch) | |
tree | 9ac65c59f2cd6e82a82db194b75429d6b00ea310 | |
parent | 85ec852201fa91664a2345cb76aa2a4fadc2ba3a (diff) | |
download | mv-da3eb22cb8831553ab3ca7d8bb3249bf67b2ec47.tar.gz mv-da3eb22cb8831553ab3ca7d8bb3249bf67b2ec47.tar.bz2 mv-da3eb22cb8831553ab3ca7d8bb3249bf67b2ec47.tar.xz mv-da3eb22cb8831553ab3ca7d8bb3249bf67b2ec47.zip |
Add azure pipeline for build and run windows tests.
-rw-r--r-- | azure-pipelines_windows.yml | 74 | ||||
-rwxr-xr-x | tools/ci/scripts/addextrafiles.cmd | 8 | ||||
-rwxr-xr-x | tools/ci/scripts/azure/mxetest.sh | 14 | ||||
-rwxr-xr-x | tools/ci/scripts/copymxedlls.sh | 44 | ||||
-rwxr-xr-x | tools/ci/scripts/docker_run_cross.sh | 17 |
5 files changed, 157 insertions, 0 deletions
diff --git a/azure-pipelines_windows.yml b/azure-pipelines_windows.yml new file mode 100644 index 000000000..26f4a83aa --- /dev/null +++ b/azure-pipelines_windows.yml @@ -0,0 +1,74 @@ +jobs: +- job: mxe_32_build + pool: + name: 'Hosted Ubuntu 1604' + steps: + - script: | + uname -a + export BITS=32 + export CROSS="i686-w64-mingw32.shared" + ./tools/ci/scripts/azure/mxetest.sh + cp ./dlls/* "$(Build.ArtifactStagingDirectory)" + cp ./src/*.exe "$(Build.ArtifactStagingDirectory)" + ls "$(Build.ArtifactStagingDirectory)" + echo done + - task: PublishBuildArtifacts@1 + inputs: + artifactName: manaplus32 + +- job: mxe_32_test + dependsOn: mxe_32_build + pool: + name: 'Hosted VS2017' + steps: + - task: DownloadBuildArtifacts@0 + inputs: + buildType: 'current' + project: 'ManaPlus' + artifactName: 'manaplus32' + - script: dir "$(Build.ArtifactStagingDirectory)\manaplus32" + - script: copy "$(Build.ArtifactStagingDirectory)\manaplus32\*" . + - script: type data\test\serverlistplus.xml + - script: tools\ci\scripts\addextrafiles.cmd + - script: dir + - script: | + set SDL_VIDEODRIVER=dummy + echo run + manaplustests.exe + +- job: mxe_64_build + pool: + name: 'Hosted Ubuntu 1604' + steps: + - script: | + uname -a + export BITS=64 + export CROSS="x86_64-w64-mingw32.shared" + ./tools/ci/scripts/azure/mxetest.sh + cp ./dlls/* "$(Build.ArtifactStagingDirectory)" + cp ./src/*.exe "$(Build.ArtifactStagingDirectory)" + ls "$(Build.ArtifactStagingDirectory)" + echo done + - task: PublishBuildArtifacts@1 + inputs: + artifactName: manaplus64 + +- job: mxe_64_test + dependsOn: mxe_64_build + pool: + name: 'Hosted VS2017' + steps: + - task: DownloadBuildArtifacts@0 + inputs: + buildType: 'current' + project: 'ManaPlus' + artifactName: 'manaplus64' + - script: dir "$(Build.ArtifactStagingDirectory)\manaplus64" + - script: copy "$(Build.ArtifactStagingDirectory)\manaplus64\*" . + - script: type data\test\serverlistplus.xml + - script: tools\ci\scripts\addextrafiles.cmd + - script: dir + - script: | + set SDL_VIDEODRIVER=dummy + echo run + manaplustests.exe diff --git a/tools/ci/scripts/addextrafiles.cmd b/tools/ci/scripts/addextrafiles.cmd new file mode 100755 index 000000000..b11dccfc3 --- /dev/null +++ b/tools/ci/scripts/addextrafiles.cmd @@ -0,0 +1,8 @@ +echo #>>data\test\Makefile.in
+echo #>>data\test\Makefile
+
+echo #>>data\test\dir1\Makefile.in
+echo #>>data\test\dir1\Makefile
+
+echo #>>data\test\dir2\Makefile.in
+echo #>>data\test\dir2\Makefile
diff --git a/tools/ci/scripts/azure/mxetest.sh b/tools/ci/scripts/azure/mxetest.sh new file mode 100755 index 000000000..1f5e97217 --- /dev/null +++ b/tools/ci/scripts/azure/mxetest.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo docker login registry.gitlab.com +docker login registry.gitlab.com + +export IMAGE="registry.gitlab.com/manaplus/mxe:gcc6_shared_${BITS}" +export COMMAND="./tools/ci/jobs/mxe_gcc6_tests.sh --without-manaplusgame --without-dyecmd" +export PACKAGES="bash" +./tools/ci/scripts/docker_run_cross.sh || exit 1 +mkdir dlls || true +export COMMAND="./tools/ci/scripts/copymxedlls.sh dlls" +ls -la dlls +echo copy dlls from docker +./tools/ci/scripts/docker_run_cross.sh || exit 1 diff --git a/tools/ci/scripts/copymxedlls.sh b/tools/ci/scripts/copymxedlls.sh new file mode 100755 index 000000000..2ddf16a23 --- /dev/null +++ b/tools/ci/scripts/copymxedlls.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +source ./tools/ci/scripts/winvars.sh || exit 1 +source ./tools/ci/flags/mingw6.sh || exit 1 + +$CC --version +$CXX --version + +export MXE="/mxe/usr/${CROSS}/bin/" +export DSTDIR="$1" + +function mxefile { + cp ${MXE}${1} ${DSTDIR} || exit 1 +} + +function mxefile1 { + cp ${MXE}${1} ${DSTDIR} || true +} + +mxefile gdb.exe +mxefile libcurl-4.dll +mxefile libdl.dll +mxefile libexpat-1.dll +mxefile libfreetype-6.dll +mxefile libiconv-2.dll +mxefile libintl-8.dll +mxefile libjpeg-9.dll +mxefile libogg-0.dll +mxefile libpng16-16.dll +mxefile libreadline6.dll +mxefile libSDL_gfx-15.dll +mxefile libstdc++-6.dll +mxefile libtermcap.dll +mxefile libvorbis-0.dll +mxefile libvorbisfile-3.dll +mxefile libxml2-2.dll +mxefile libwinpthread-1.dll +mxefile SDL.dll +mxefile SDL_image.dll +mxefile SDL_net.dll +mxefile SDL_ttf.dll +mxefile zlib1.dll +mxefile1 libgcc_s_sjlj-1.dll +mxefile1 libgcc_s_seh-1.dll diff --git a/tools/ci/scripts/docker_run_cross.sh b/tools/ci/scripts/docker_run_cross.sh new file mode 100755 index 000000000..e07df0cf4 --- /dev/null +++ b/tools/ci/scripts/docker_run_cross.sh @@ -0,0 +1,17 @@ +#!/bin/bash -x + +echo "IMAGE: ${IMAGE}" +echo "PACKAGES: ${PACKAGES}" +echo "CROSS: ${CROSS}" +echo "COMMAND: ${COMMAND}" +echo "JOBS: ${JOBS}" + +docker pull ${IMAGE} +docker run \ + --volume=$(pwd):/build:rw \ + -e PACKAGES="${PACKAGES}" \ + -e COMMAND="${COMMAND}" \ + -e JOBS="${JOBS}" \ + -e CROSS="${CROSS}" \ + ${IMAGE} \ + /bin/sh -x -c "cd /build; pwd; ./tools/ci/scripts/docker_incontainer.sh" |