diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-08 16:30:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-08 16:30:30 +0200 |
commit | d74385be24f0c11b34d4af6a92c7bc8d18e5748e (patch) | |
tree | 8d9fbd1581045d450dcce1ed407f73f03ab30742 /.gitlab-ci.yml | |
parent | 4221c1b4412f2bf889bd603a26424003f5367f6a (diff) | |
download | minetest-d74385be24f0c11b34d4af6a92c7bc8d18e5748e.tar.gz minetest-d74385be24f0c11b34d4af6a92c7bc8d18e5748e.tar.bz2 minetest-d74385be24f0c11b34d4af6a92c7bc8d18e5748e.zip |
Implement GItlab CI daily builds for windows platform (32 & 64) (#5923)
* Implement win32 & win64 builds in Gitlab CI + pkg improvements
* windows buildbot: split build & deploy steps
* move deb artifacts to root folder to have a nicer artifact
* add windows build + packaging on xenial
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 87 |
1 files changed, 82 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad1b9a8c3..d48dd5fcd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ variables: - make install artifacts: when: on_success - expire_in: 1h + expire_in: 2h paths: - artifact/* @@ -39,12 +39,12 @@ variables: - rm -Rf build/deb/minetest/usr/share/minetest/games/minetest/.git - sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control - sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control - - cd build/deb/ && dpkg-deb -b minetest/ + - cd build/deb/ && dpkg-deb -b minetest/ && mv minetest.deb ../../ artifacts: when: on_success - expire_in: 30 day + expire_in: 90 day paths: - - build/deb/*.deb + - ./*.deb .debpkg_install: &debpkg_install stage: deploy @@ -52,7 +52,7 @@ variables: - apt-get update -y - apt-get install -y libc6 libcurl3-gnutls libfreetype6 libirrlicht1.8 $LEVELDB_PKG liblua5.1-0 libluajit-5.1-2 libopenal1 libstdc++6 libvorbisfile3 libx11-6 zlib1g script: - - dpkg -i build/deb/*.deb + - dpkg -i ./*.deb ## ## Debian @@ -231,3 +231,80 @@ build:fedora-24: image: fedora:24 before_script: - dnf -y install make automake gcc gcc-c++ kernel-devel cmake libcurl* openal* libvorbis* libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel + + +## +## Mingw for Windows +## + +.generic_win_template: &generic_win_template + image: ubuntu:xenial + before_script: + - apt-get update -y + - apt-get install -y p7zip-full wget unzip git cmake gettext + - wget http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_7.1.1_ubuntu14.04.7z -O mingw.7z > /dev/null + - sed -e "s|%PREFIX%|${WIN_ARCH}-w64-mingw32|" -e "s|%ROOTPATH%|/usr/${WIN_ARCH}-w64-mingw32|" < util/travis/toolchain_mingw.cmake.in > ${TOOLCHAIN_OUTPUT} + - 7z x -y -o/usr mingw.7z > /dev/null + +.build_win_template: &build_win_template + <<: *generic_win_template + stage: build + artifacts: + when: on_success + expire_in: 2h + paths: + - build/* + +.package_win_template: &package_win_template + <<: *generic_win_template + stage: package + script: + - cd build/minetest/_build + - make package + - cd ../../../ + - mkdir minetest-win-${WIN_ARCH} + - unzip build/minetest/_build/minetest-*-win*.zip -d minetest-win-${WIN_ARCH} + - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libgcc*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin + - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libstdc++*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin + - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libwinpthread*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin + artifacts: + when: on_success + expire_in: 90 day + paths: + - minetest-win-*/* + +build:win32: + <<: *build_win_template + script: + - ./util/buildbot/buildwin32.sh build + variables: + NO_PACKAGE: "1" + WIN_ARCH: "i686" + TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake" + +package:win32: + <<: *package_win_template + dependencies: + - build:win32 + variables: + NO_PACKAGE: "1" + WIN_ARCH: "i686" + TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake" + +build:win64: + <<: *build_win_template + script: + - ./util/buildbot/buildwin64.sh build + variables: + NO_PACKAGE: "1" + WIN_ARCH: "x86_64" + TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake" + +package:win64: + <<: *package_win_template + dependencies: + - build:win64 + variables: + NO_PACKAGE: "1" + WIN_ARCH: "x86_64" + TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake" |