2 # Github repository is cloned every day on Gitlab.com
3 # https://gitlab.com/minetest/minetest
4 # Pipelines URL: https://gitlab.com/minetest/minetest/pipelines
12 MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
13 CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
19 - mkdir -p artifact/minetest/usr/
21 - cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
34 - apt-get install -y git
35 - mkdir -p build/deb/minetest/DEBIAN/
36 - cp misc/debpkg-control build/deb/minetest/DEBIAN/control
37 - cp -Rp artifact/minetest/usr build/deb/minetest/
39 - git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest
40 - rm -Rf build/deb/minetest/usr/share/minetest/games/minetest/.git
41 - sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control
42 - sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control
43 - cd build/deb/ && dpkg-deb -b minetest/ && mv minetest.deb ../../
54 - 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
65 extends: .build_template
68 - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
69 - apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
71 - apt-get -y install build-essential gcc-6 g++-6 libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
77 extends: .debpkg_template
82 LEVELDB_PKG: libleveldb1
85 extends: .debpkg_install
90 LEVELDB_PKG: libleveldb1
95 extends: .build_template
99 - apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
102 extends: .debpkg_template
107 LEVELDB_PKG: libleveldb1v5
110 extends: .debpkg_install
115 LEVELDB_PKG: libleveldb1v5
120 extends: .build_template
124 - apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
127 extends: .debpkg_template
132 LEVELDB_PKG: libleveldb1d
135 extends: .debpkg_install
140 LEVELDB_PKG: libleveldb1d
148 extends: .build_template
151 - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
152 - apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
154 - apt-get -y install build-essential gcc-6 g++-6 libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
159 package:ubuntu-14.04:
160 extends: .debpkg_template
165 LEVELDB_PKG: libleveldb1
168 extends: .debpkg_install
171 - package:ubuntu-14.04
173 LEVELDB_PKG: libleveldb1
178 extends: .build_template
182 - apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
184 package:ubuntu-16.04:
185 extends: .debpkg_template
190 LEVELDB_PKG: libleveldb1v5
193 extends: .debpkg_install
196 - package:ubuntu-16.04
198 LEVELDB_PKG: libleveldb1v5
204 # Do we need to support this old version ?
206 extends: .build_template
209 - 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
216 .generic_win_template:
220 - apt-get install -y wget xz-utils unzip git cmake gettext
221 - wget -q http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
222 - tar -xaf mingw.tar.xz -C /usr
225 extends: .generic_win_template
233 .package_win_template:
234 extends: .generic_win_template
237 - cd build/minetest/_build
240 - mkdir minetest-win-${WIN_ARCH}
241 - unzip build/minetest/_build/minetest-*-win*.zip -d minetest-win-${WIN_ARCH}
242 - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libgcc*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
243 - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libstdc++*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
244 - cp /usr/${WIN_ARCH}-w64-mingw32/bin/libwinpthread*.dll minetest-win-${WIN_ARCH}/minetest-*-win*/bin
252 extends: .build_win_template
254 - ./util/buildbot/buildwin32.sh build
260 extends: .package_win_template
268 extends: .build_win_template
270 - ./util/buildbot/buildwin64.sh build
276 extends: .package_win_template
289 - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
291 - docker build . -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME -t ${CONTAINER_IMAGE}/server:latest
292 - docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA
293 - docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME
294 - docker push ${CONTAINER_IMAGE}/server:latest
300 - pip install git+https://github.com/Python-Markdown/markdown.git
301 - pip install git+https://github.com/mkdocs/mkdocs.git
302 - pip install pygments
304 - cd doc/mkdocs && ./build.sh