--- # 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" CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH .build_template: 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 -DENABLE_SYSTEM_JSONCPP=TRUE -DBUILD_SERVER=TRUE .. - make -j2 - make install artifacts: when: on_success expire_in: 1h paths: - artifact/* .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 -a artifact/minetest/usr build/deb/minetest/ script: - git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest_game - 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: expire_in: 90 day paths: - ./*.deb .debpkg_install: stage: deploy before_script: - apt-get update -y script: - apt-get install -y ./*.deb - minetest --version ## ## Debian ## # Stretch build:debian-9: extends: .build_template 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: extends: .debpkg_template image: debian:9 needs: - build:debian-9 variables: LEVELDB_PKG: libleveldb1v5 deploy:debian-9: extends: .debpkg_install image: debian:9 needs: - package:debian-9 # Buster 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 needs: - build:debian-10 variables: LEVELDB_PKG: libleveldb1d deploy:debian-10: extends: .debpkg_install image: debian:10 needs: - package:debian-10 ## ## Ubuntu ## # Xenial build:ubuntu-16.04: extends: .build_template 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: extends: .debpkg_template image: ubuntu:xenial needs: - build:ubuntu-16.04 variables: LEVELDB_PKG: libleveldb1v5 deploy:ubuntu-16.04: extends: .debpkg_install image: ubuntu:xenial needs: - package:ubuntu-16.04 # Bionic build:ubuntu-18.04: extends: .build_template image: ubuntu:bionic 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-18.04: extends: .debpkg_template image: ubuntu:bionic needs: - build:ubuntu-18.04 variables: LEVELDB_PKG: libleveldb1v5 deploy:ubuntu-18.04: extends: .debpkg_install image: ubuntu:bionic needs: - package:ubuntu-18.04 ## ## Fedora ## # Fedora 28 <-> RHEL 8 build:fedora-28: extends: .build_template image: fedora:28 before_script: - dnf -y install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel local function on_punch(pos, player) atlatc.interrupt.add(0, pos, {type="punch", punch=true}) end minetest.register_node("advtrains_luaautomation:oppanel", { drawtype = "normal", tiles={"atlatc_oppanel.png"}, description = "LuaAutomation operation panel", groups = { choppy = 1, save_in_nodedb=1, }, after_place_node = atlatc.active.after_place_node, after_dig_node = atlatc.active.after_dig_node, on_receive_fields = atlatc.active.on_receive_fields, on_punch = on_punch, luaautomation = { fire_event=atlatc.active.run_in_env } }) _script: - apt-get update -y - apt-get install -y git wget # Collect files - mkdir AppDir - cp -a artifact/minetest/usr/ AppDir/usr/ - rm AppDir/usr/bin/minetestserver - cp -a clientmods AppDir/usr/share/minetest script: - git clone $MINETEST_GAME_REPO AppDir/usr/share/minetest/games/minetest_game - rm -rf AppDir/usr/share/minetest/games/minetest/.git - 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