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:
|
2021-08-31 23:57:39 +02:00
|
|
|
IRRLICHT_TAG: "1.9.0mt3"
|
2017-04-21 10:22:20 +02:00
|
|
|
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
|
2021-03-10 15:27:19 +01:00
|
|
|
before_script:
|
|
|
|
- apt-get update
|
2021-09-01 10:41:36 +02:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libleveldb-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev
|
2017-04-08 10:19:07 +02:00
|
|
|
script:
|
2021-07-27 19:11:27 +02:00
|
|
|
- git clone https://github.com/minetest/irrlicht -b $IRRLICHT_TAG lib/irrlichtmt
|
2017-04-08 10:19:07 +02:00
|
|
|
- mkdir cmakebuild
|
|
|
|
- cd cmakebuild
|
2021-07-27 19:11:27 +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
|
2021-01-02 15:43:35 +01:00
|
|
|
expire_in: 1h
|
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:
|
2021-03-10 15:27:19 +01:00
|
|
|
- apt-get update
|
2017-04-21 10:22:20 +02:00
|
|
|
- apt-get install -y git
|
|
|
|
- mkdir -p build/deb/minetest/DEBIAN/
|
|
|
|
- cp misc/debpkg-control build/deb/minetest/DEBIAN/control
|
2021-01-02 15:43:35 +01:00
|
|
|
- cp -a artifact/minetest/usr build/deb/minetest/
|
2017-04-21 10:22:20 +02:00
|
|
|
script:
|
2020-11-15 17:38:04 +01:00
|
|
|
- git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest_game
|
2021-01-02 15:43:35 +01:00
|
|
|
- rm -rf build/deb/minetest/usr/share/minetest/games/minetest/.git
|
2017-04-21 10:22:20 +02:00
|
|
|
- sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control
|
2021-03-10 15:27:19 +01:00
|
|
|
- sed -i 's/JPEG_PLACEHOLDER/'$JPEG_PKG'/g' build/deb/minetest/DEBIAN/control
|
2017-04-21 10:22:20 +02:00
|
|
|
- sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control
|
2021-08-27 11:19:15 +02:00
|
|
|
- sed -i 's/JSONCPP_PLACEHOLDER/'$JSONCPP_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:
|
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:
|
2021-08-27 11:19:15 +02:00
|
|
|
- apt-get update -qy
|
2017-04-21 10:22:20 +02:00
|
|
|
script:
|
2021-01-02 15:43:35 +01:00
|
|
|
- apt-get install -y ./*.deb
|
|
|
|
- minetest --version
|
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
|
|
|
|
|
|
|
# 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
|
|
|
|
|
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
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2017-04-21 10:22:20 +02:00
|
|
|
- build:debian-9
|
|
|
|
variables:
|
2021-08-27 11:19:15 +02:00
|
|
|
JSONCPP_PKG: libjsoncpp1
|
2017-04-21 10:22:20 +02:00
|
|
|
LEVELDB_PKG: libleveldb1v5
|
2021-03-10 15:27:19 +01:00
|
|
|
JPEG_PKG: libjpeg62-turbo
|
2017-04-21 10:22:20 +02:00
|
|
|
|
|
|
|
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
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2017-04-21 10:22:20 +02:00
|
|
|
- package:debian-9
|
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
# Buster
|
2020-04-09 20:46:06 +02:00
|
|
|
|
|
|
|
build:debian-10:
|
|
|
|
extends: .build_template
|
|
|
|
image: debian:10
|
|
|
|
|
|
|
|
package:debian-10:
|
|
|
|
extends: .debpkg_template
|
|
|
|
image: debian:10
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2020-04-09 20:46:06 +02:00
|
|
|
- build:debian-10
|
|
|
|
variables:
|
2021-08-27 11:19:15 +02:00
|
|
|
JSONCPP_PKG: libjsoncpp1
|
2020-04-09 20:46:06 +02:00
|
|
|
LEVELDB_PKG: libleveldb1d
|
2021-03-10 15:27:19 +01:00
|
|
|
JPEG_PKG: libjpeg62-turbo
|
2020-04-09 20:46:06 +02:00
|
|
|
|
|
|
|
deploy:debian-10:
|
|
|
|
extends: .debpkg_install
|
|
|
|
image: debian:10
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2020-04-09 20:46:06 +02:00
|
|
|
- package:debian-10
|
2021-01-02 15:43:35 +01:00
|
|
|
|
2021-08-27 11:19:15 +02:00
|
|
|
# Bullseye
|
|
|
|
|
|
|
|
build:debian-11:
|
|
|
|
extends: .build_template
|
|
|
|
image: debian:11
|
|
|
|
|
|
|
|
package:debian-11:
|
|
|
|
extends: .debpkg_template
|
|
|
|
image: debian:11
|
|
|
|
needs:
|
|
|
|
- build:debian-11
|
|
|
|
variables:
|
|
|
|
JSONCPP_PKG: libjsoncpp24
|
|
|
|
LEVELDB_PKG: libleveldb1d
|
|
|
|
JPEG_PKG: libjpeg62-turbo
|
|
|
|
|
|
|
|
deploy:debian-11:
|
|
|
|
extends: .debpkg_install
|
|
|
|
image: debian:11
|
|
|
|
needs:
|
|
|
|
- package:debian-11
|
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
##
|
|
|
|
## Ubuntu
|
|
|
|
##
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
# Bionic
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
build:ubuntu-18.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:bionic
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
package:ubuntu-18.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:bionic
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2021-09-01 10:41:36 +02:00
|
|
|
- build:ubuntu-18.04
|
2017-04-21 10:22:20 +02:00
|
|
|
variables:
|
2021-08-27 11:19:15 +02:00
|
|
|
JSONCPP_PKG: libjsoncpp1
|
2020-11-15 17:38:04 +01:00
|
|
|
LEVELDB_PKG: libleveldb1v5
|
2021-03-10 15:27:19 +01:00
|
|
|
JPEG_PKG: libjpeg-turbo8
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
deploy:ubuntu-18.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:bionic
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2021-09-01 10:41:36 +02:00
|
|
|
- package:ubuntu-18.04
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
# Focal
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
build:ubuntu-20.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:focal
|
2017-04-08 10:19:07 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
package:ubuntu-20.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_template
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:focal
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2021-09-01 10:41:36 +02:00
|
|
|
- build:ubuntu-20.04
|
2017-04-21 10:22:20 +02:00
|
|
|
variables:
|
2021-08-27 11:19:15 +02:00
|
|
|
JSONCPP_PKG: libjsoncpp1
|
2021-09-01 10:41:36 +02:00
|
|
|
LEVELDB_PKG: libleveldb1d
|
2021-03-10 15:27:19 +01:00
|
|
|
JPEG_PKG: libjpeg-turbo8
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-09-01 10:41:36 +02:00
|
|
|
deploy:ubuntu-20.04:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .debpkg_install
|
2021-09-01 10:41:36 +02:00
|
|
|
image: ubuntu:focal
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2021-09-01 10:41:36 +02:00
|
|
|
- package:ubuntu-20.04
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2017-04-08 10:19:07 +02:00
|
|
|
##
|
|
|
|
## Fedora
|
|
|
|
##
|
2017-04-21 10:22:20 +02:00
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
# Fedora 28 <-> RHEL 8
|
|
|
|
build:fedora-28:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_template
|
2021-01-02 15:43:35 +01:00
|
|
|
image: fedora:28
|
2017-04-08 10:19:07 +02:00
|
|
|
before_script:
|
2021-09-01 02:32:31 +02:00
|
|
|
- dnf -y install make git gcc gcc-c++ kernel-devel cmake libjpeg-devel libpng-devel libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel libzstd-devel
|
2017-06-08 16:30:30 +02:00
|
|
|
|
|
|
|
##
|
2021-01-02 15:43:35 +01:00
|
|
|
## MinGW for Windows
|
2017-06-08 16:30:30 +02:00
|
|
|
##
|
|
|
|
|
2020-04-09 20:46:06 +02:00
|
|
|
.generic_win_template:
|
2021-04-27 23:41:35 +02:00
|
|
|
image: ubuntu:focal
|
2017-06-08 16:30:30 +02:00
|
|
|
before_script:
|
2021-03-10 15:27:19 +01:00
|
|
|
- apt-get update
|
2021-04-27 23:41:35 +02:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y wget xz-utils unzip git cmake gettext
|
2021-01-02 15:43:35 +01:00
|
|
|
- wget -nv http://minetest.kitsunemimi.pw/mingw-w64-${WIN_ARCH}_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz
|
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:
|
2021-01-02 15:43:35 +01:00
|
|
|
expire_in: 1h
|
2017-06-08 16:30:30 +02:00
|
|
|
paths:
|
2021-04-27 23:41:35 +02:00
|
|
|
- build/build/*.zip
|
2017-06-08 16:30:30 +02:00
|
|
|
|
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:
|
2021-04-27 23:41:35 +02:00
|
|
|
- unzip build/build/*.zip
|
2021-01-02 15:43:35 +01:00
|
|
|
- cp -p /usr/${WIN_ARCH}-w64-mingw32/bin/libgcc*.dll minetest-*-win*/bin/
|
|
|
|
- cp -p /usr/${WIN_ARCH}-w64-mingw32/bin/libstdc++*.dll minetest-*-win*/bin/
|
|
|
|
- cp -p /usr/${WIN_ARCH}-w64-mingw32/bin/libwinpthread*.dll minetest-*-win*/bin/
|
2017-06-08 16:30:30 +02:00
|
|
|
artifacts:
|
|
|
|
expire_in: 90 day
|
|
|
|
paths:
|
2021-01-02 15:43:35 +01:00
|
|
|
- minetest-*-win*/*
|
2017-06-08 16:30:30 +02:00
|
|
|
|
|
|
|
build:win32:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
script:
|
2021-03-10 15:27:19 +01:00
|
|
|
- EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh build
|
2017-06-08 16:30:30 +02:00
|
|
|
variables:
|
|
|
|
WIN_ARCH: "i686"
|
|
|
|
|
|
|
|
package:win32:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .package_win_template
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2017-06-08 16:30:30 +02:00
|
|
|
- build:win32
|
|
|
|
variables:
|
|
|
|
WIN_ARCH: "i686"
|
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
|
2017-06-08 16:30:30 +02:00
|
|
|
build:win64:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .build_win_template
|
2017-06-08 16:30:30 +02:00
|
|
|
script:
|
2021-03-10 15:27:19 +01:00
|
|
|
- EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh build
|
2017-06-08 16:30:30 +02:00
|
|
|
variables:
|
|
|
|
WIN_ARCH: "x86_64"
|
|
|
|
|
|
|
|
package:win64:
|
2020-04-09 20:46:06 +02:00
|
|
|
extends: .package_win_template
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2017-06-08 16:30:30 +02:00
|
|
|
- build:win64
|
|
|
|
variables:
|
|
|
|
WIN_ARCH: "x86_64"
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
##
|
|
|
|
## Docker
|
|
|
|
##
|
|
|
|
|
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
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
##
|
|
|
|
## Gitlab Pages (Lua API documentation)
|
|
|
|
##
|
|
|
|
|
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
|
|
|
|
2021-01-02 15:43:35 +01:00
|
|
|
##
|
|
|
|
## AppImage
|
|
|
|
##
|
|
|
|
|
2020-11-15 17:38:04 +01:00
|
|
|
package:appimage-client:
|
|
|
|
stage: package
|
|
|
|
image: appimagecrafters/appimage-builder
|
2021-01-02 15:43:35 +01:00
|
|
|
needs:
|
2020-11-15 17:38:04 +01:00
|
|
|
- build:ubuntu-18.04
|
|
|
|
before_script:
|
|
|
|
- apt-get update -y
|
2021-05-15 23:56:33 +02:00
|
|
|
- apt-get install -y git
|
2020-11-15 17:38:04 +01:00
|
|
|
# Collect files
|
|
|
|
- mkdir AppDir
|
|
|
|
- cp -a artifact/minetest/usr/ AppDir/usr/
|
|
|
|
- rm AppDir/usr/bin/minetestserver
|
2021-01-02 15:43:35 +01:00
|
|
|
- cp -a clientmods AppDir/usr/share/minetest
|
2020-11-15 17:38:04 +01:00
|
|
|
script:
|
|
|
|
- git clone $MINETEST_GAME_REPO AppDir/usr/share/minetest/games/minetest_game
|
2021-01-02 15:43:35 +01:00
|
|
|
- rm -rf AppDir/usr/share/minetest/games/minetest/.git
|
2020-11-15 17:38:04 +01:00
|
|
|
- export VERSION=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA
|
|
|
|
# Remove PrefersNonDefaultGPU property due to validation errors
|
|
|
|
- sed -i '/PrefersNonDefaultGPU/d' AppDir/usr/share/applications/net.minetest.minetest.desktop
|
|
|
|
- appimage-builder --skip-test
|
|
|
|
artifacts:
|
|
|
|
expire_in: 90 day
|
|
|
|
paths:
|
|
|
|
- ./*.AppImage
|