123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- ---
- # Github repository is cloned every day on Gitlab.com
- # https://gitlab.com/minetest/minetest
- # Pipelines URL: https://gitlab.com/minetest/minetest/pipelines
- stages:
- - build
- - package
- - deploy
- variables:
- MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
- .build_template: &build_definition
- stage: build
- script:
- - mkdir cmakebuild
- - mkdir -p artifact/minetest/usr/
- - cd cmakebuild
- - cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
- - make -j2
- - make install
- artifacts:
- when: on_success
- expire_in: 2h
- paths:
- - artifact/*
- .debpkg_template: &debpkg_template
- 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
- - cd build/deb/ && dpkg-deb -b minetest/ && mv minetest.deb ../../
- artifacts:
- when: on_success
- expire_in: 90 day
- paths:
- - ./*.deb
- .debpkg_install: &debpkg_install
- 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:
- - dpkg -i ./*.deb
- ##
- ## Debian
- ##
- # Jessie
- build:debian-8:
- <<: *build_definition
- image: debian:8
- 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
- package:debian-8:
- image: debian:8
- dependencies:
- - build:debian-8
- variables:
- LEVELDB_PKG: libleveldb1
- <<: *debpkg_template
- deploy:debian-8:
- image: debian:8
- dependencies:
- - package:debian-8
- variables:
- LEVELDB_PKG: libleveldb1
- <<: *debpkg_install
- # Stretch
- build:debian-9:
- <<: *build_definition
- 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
- package:debian-9:
- image: debian:9
- dependencies:
- - build:debian-9
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_template
- deploy:debian-9:
- image: debian:9
- dependencies:
- - package:debian-9
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_install
- ##
- ## Ubuntu
- ##
- # Trusty
- build:ubuntu-14.04:
- <<: *build_definition
- 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
- package:ubuntu-14.04:
- image: ubuntu:trusty
- dependencies:
- - build:ubuntu-14.04
- variables:
- LEVELDB_PKG: libleveldb1
- <<: *debpkg_template
- deploy:ubuntu-14.04:
- image: ubuntu:trusty
- dependencies:
- - package:ubuntu-14.04
- variables:
- LEVELDB_PKG: libleveldb1
- <<: *debpkg_install
- # Xenial
- build:ubuntu-16.04:
- <<: *build_definition
- 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
- package:ubuntu-16.04:
- image: ubuntu:xenial
- dependencies:
- - build:ubuntu-16.04
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_template
- deploy:ubuntu-16.04:
- image: ubuntu:xenial
- dependencies:
- - package:ubuntu-16.04
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_install
- # Yakkety
- build:ubuntu-16.10:
- <<: *build_definition
- image: ubuntu:yakkety
- 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:ubuntu-16.10:
- image: ubuntu:yakkety
- dependencies:
- - build:ubuntu-16.10
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_template
- deploy:ubuntu-16.10:
- image: ubuntu:yakkety
- dependencies:
- - package:ubuntu-16.10
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_install
- # Zesty
- build:ubuntu-17.04:
- <<: *build_definition
- image: ubuntu:zesty
- 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:ubuntu-17.04:
- image: ubuntu:zesty
- dependencies:
- - build:ubuntu-17.04
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_template
- deploy:ubuntu-17.04:
- image: ubuntu:zesty
- dependencies:
- - package:ubuntu-17.04
- variables:
- LEVELDB_PKG: libleveldb1v5
- <<: *debpkg_install
- ##
- ## Fedora
- ##
- build:fedora-24:
- <<: *build_definition
- 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"
|