2017-04-08 10:19:07 +02:00
|
|
|
---
|
|
|
|
# Github repository is cloned every day on Gitlab.com
|
|
|
|
# https://gitlab.com/minetest/minetest
|
|
|
|
# Pipelines URL: https://gitlab.com/minetest/minetest/pipelines
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2017-04-21 10:22:20 +02:00
|
|
|
- package
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
variables:
|
|
|
|
MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
|
2018-12-12 00:00:08 +01:00
|
|
|
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.build_template:
|
2017-04-08 10:19:07 +02:00
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- mkdir cmakebuild
|
|
|
|
- mkdir -p artifact/minetest/usr/
|
|
|
|
- cd cmakebuild
|
2017-04-21 10:22:20 +02:00
|
|
|
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
|
2017-04-08 10:19:07 +02:00
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
artifacts:
|
|
|
|
when: on_success
|
2017-06-08 16:30:30 +02:00
|
|
|
expire_in: 2h
|
2017-04-08 10:19:07 +02:00
|
|
|
paths:
|
|
|
|
- artifact/*
|
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.debpkg_template:
|
2017-04-21 10:22:20 +02:00
|
|
|
stage: package
|
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
|
|
|
- apt-get install -y git
|
|
|
|
- mkdir -p build/deb/minetest/DEBIAN/
|
|
|
|
- cp misc/debpkg-control build/deb/minetest/DEBIAN/control
|
|
|
|
- cp -Rp artifact/minetest/usr build/deb/minetest/
|
|
|
|
script:
|
|
|
|
- git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest
|
|
|
|
- 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
|
2017-06-08 16:30:30 +02:00
|
|
|
- cd build/deb/ && dpkg-deb -b minetest/ && mv minetest.deb ../../
|
2017-04-21 10:22:20 +02:00
|
|
|
artifacts:
|
|
|
|
when: on_success
|
2017-06-08 16:30:30 +02:00
|
|
|
expire_in: 90 day
|
2017-04-21 10:22:20 +02:00
|
|
|
paths:
|
2017-06-08 16:30:30 +02:00
|
|
|
- ./*.deb
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.debpkg_install:
|
2017-04-21 10:22:20 +02:00
|
|
|
stage: deploy
|
|
|
|
before_script:
|
|
|
|
- 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:
|
2017-06-08 16:30:30 +02:00
|
|
|
- dpkg -i ./*.deb
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
##
|
|
|
|
## Debian
|
|
|
|
##
|
2017-04-21 10:22:20 +02:00
|
|
|
|
|
|
|
# Jessie
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
build:debian-8:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2017-04-08 10:19:07 +02:00
|
|
|
image: debian:8
|
|
|
|
before_script:
|
2017-06-04 23:07:45 +02:00
|
|
|
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
|
|
|
|
- apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
|
2017-04-08 10:19:07 +02:00
|
|
|
- apt-get update -y
|
2017-06-04 23:07:45 +02:00
|
|
|
- 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
|
|
|
|
variables:
|
|
|
|
CC: gcc-6
|
|
|
|
CXX: g++-6
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2017-04-21 10:22:20 +02:00
|
|
|
package:debian-8:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2017-04-21 10:22:20 +02:00
|
|
|
image: debian:8
|
|
|
|
dependencies:
|
|
|
|
- build:debian-8
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1
|
|
|
|
|
|
|
|
deploy:debian-8:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2017-04-21 10:22:20 +02:00
|
|
|
image: debian:8
|
|
|
|
dependencies:
|
|
|
|
- package:debian-8
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1
|
|
|
|
|
|
|
|
# Stretch
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
build:debian-9:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2017-04-08 10:19:07 +02:00
|
|
|
image: debian:9
|
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
|
|
|
- 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
|
|
|
|
|
2017-04-21 10:22:20 +02:00
|
|
|
package:debian-9:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2017-04-21 10:22:20 +02:00
|
|
|
image: debian:9
|
|
|
|
dependencies:
|
|
|
|
- build:debian-9
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1v5
|
|
|
|
|
|
|
|
deploy:debian-9:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2017-04-21 10:22:20 +02:00
|
|
|
image: debian:9
|
|
|
|
dependencies:
|
|
|
|
- package:debian-9
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1v5
|
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
# Stretch
|
|
|
|
|
|
|
|
build:debian-10:
|
|
|
|
extends: .build_template
|
|
|
|
image: debian:10
|
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
|
|
|
- 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
|
|
|
|
|
|
|
|
package:debian-10:
|
|
|
|
extends: .debpkg_template
|
|
|
|
image: debian:10
|
|
|
|
dependencies:
|
|
|
|
- build:debian-10
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1d
|
|
|
|
|
|
|
|
deploy:debian-10:
|
|
|
|
extends: .debpkg_install
|
|
|
|
image: debian:10
|
|
|
|
dependencies:
|
|
|
|
- package:debian-10
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1d
|
2017-04-08 10:19:07 +02:00
|
|
|
##
|
|
|
|
## Ubuntu
|
|
|
|
##
|
2017-04-21 10:22:20 +02:00
|
|
|
|
|
|
|
# Trusty
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
build:ubuntu-14.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2017-06-04 23:07:45 +02:00
|
|
|
image: ubuntu:trusty
|
|
|
|
before_script:
|
|
|
|
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/uptodate-toolchain.list
|
|
|
|
- apt-key adv --keyserver keyserver.ubuntu.com --recv BA9EF27F
|
|
|
|
- apt-get update -y
|
|
|
|
- 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
|
|
|
|
variables:
|
|
|
|
CC: gcc-6
|
|
|
|
CXX: g++-6
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2017-04-21 10:22:20 +02:00
|
|
|
package:ubuntu-14.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2017-04-21 10:22:20 +02:00
|
|
|
image: ubuntu:trusty
|
|
|
|
dependencies:
|
|
|
|
- build:ubuntu-14.04
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1
|
|
|
|
|
|
|
|
deploy:ubuntu-14.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2017-04-21 10:22:20 +02:00
|
|
|
image: ubuntu:trusty
|
|
|
|
dependencies:
|
|
|
|
- package:ubuntu-14.04
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1
|
|
|
|
|
|
|
|
# Xenial
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
build:ubuntu-16.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2017-06-04 23:07:45 +02:00
|
|
|
image: ubuntu:xenial
|
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
|
|
|
- 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
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2017-04-21 10:22:20 +02:00
|
|
|
package:ubuntu-16.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2017-04-21 10:22:20 +02:00
|
|
|
image: ubuntu:xenial
|
|
|
|
dependencies:
|
|
|
|
- build:ubuntu-16.04
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1v5
|
|
|
|
|
|
|
|
deploy:ubuntu-16.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2017-04-21 10:22:20 +02:00
|
|
|
image: ubuntu:xenial
|
|
|
|
dependencies:
|
|
|
|
- package:ubuntu-16.04
|
|
|
|
variables:
|
|
|
|
LEVELDB_PKG: libleveldb1v5
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
##
|
|
|
|
## Fedora
|
|
|
|
##
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
# Do we need to support this old version ?
|
2017-04-08 10:19:07 +02:00
|
|
|
build:fedora-24:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2017-04-08 10:19:07 +02:00
|
|
|
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
|
2017-06-08 16:30:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Mingw for Windows
|
|
|
|
##
|
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.generic_win_template:
|
2020-03-08 21:05:12 +01:00
|
|
|
image: ubuntu:bionic
|
2017-06-08 16:30:30 +02:00
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
2020-03-08 21:05:12 +01:00
|
|
|
- apt-get install -y wget xz-utils unzip git cmake gettext
|
|
|
|
- wget -q http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
|
2017-06-08 16:30:30 +02:00
|
|
|
- sed -e "s|%PREFIX%|${WIN_ARCH}-w64-mingw32|" -e "s|%ROOTPATH%|/usr/${WIN_ARCH}-w64-mingw32|" < util/travis/toolchain_mingw.cmake.in > ${TOOLCHAIN_OUTPUT}
|
2020-03-08 21:05:12 +01:00
|
|
|
- tar -xaf mingw.tar.xz -C /usr
|
2017-06-08 16:30:30 +02:00
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.build_win_template:
|
|
|
|
extends: .generic_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
stage: build
|
|
|
|
artifacts:
|
|
|
|
when: on_success
|
|
|
|
expire_in: 2h
|
|
|
|
paths:
|
|
|
|
- build/*
|
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.package_win_template:
|
|
|
|
extends: .generic_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
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:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
script:
|
|
|
|
- ./util/buildbot/buildwin32.sh build
|
|
|
|
variables:
|
|
|
|
NO_PACKAGE: "1"
|
|
|
|
WIN_ARCH: "i686"
|
|
|
|
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
|
|
|
|
|
|
|
|
package:win32:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .package_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
dependencies:
|
|
|
|
- build:win32
|
|
|
|
variables:
|
|
|
|
NO_PACKAGE: "1"
|
|
|
|
WIN_ARCH: "i686"
|
|
|
|
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw.cmake"
|
|
|
|
|
|
|
|
build:win64:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
script:
|
|
|
|
- ./util/buildbot/buildwin64.sh build
|
|
|
|
variables:
|
|
|
|
NO_PACKAGE: "1"
|
|
|
|
WIN_ARCH: "x86_64"
|
|
|
|
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"
|
|
|
|
|
|
|
|
package:win64:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .package_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
dependencies:
|
|
|
|
- build:win64
|
|
|
|
variables:
|
|
|
|
NO_PACKAGE: "1"
|
|
|
|
WIN_ARCH: "x86_64"
|
|
|
|
TOOLCHAIN_OUTPUT: "util/buildbot/toolchain_mingw64.cmake"
|
2018-12-12 00:00:08 +01:00
|
|
|
|
|
|
|
package:docker:
|
|
|
|
stage: package
|
|
|
|
image: docker:stable
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
before_script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
|
|
|
script:
|
2018-12-12 09:47:32 +01:00
|
|
|
- docker build . -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME -t ${CONTAINER_IMAGE}/server:latest
|
|
|
|
- docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA
|
|
|
|
- docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME
|
|
|
|
- docker push ${CONTAINER_IMAGE}/server:latest
|
2019-04-12 14:29:29 +02:00
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
2020-04-11 20:38:39 +02:00
|
|
|
image: python:3.8
|
2019-04-12 14:29:29 +02:00
|
|
|
before_script:
|
|
|
|
- pip install git+https://github.com/Python-Markdown/markdown.git
|
|
|
|
- pip install git+https://github.com/mkdocs/mkdocs.git
|
|
|
|
- pip install pygments
|
|
|
|
script:
|
|
|
|
- cd doc/mkdocs && ./build.sh
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
only:
|
|
|
|
- master
|
2020-04-09 20:46:06 +02:00
|
|
|
|