mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-30 12:20:54 +00:00
140 lines
5 KiB
YAML
140 lines
5 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
- staging
|
|
- production
|
|
|
|
## BUILDS
|
|
|
|
# Job de compilation pour Linux
|
|
Linux client build:
|
|
stage: build
|
|
except:
|
|
- ryzomcore
|
|
tags:
|
|
- Docker
|
|
image: debian:jessie
|
|
script:
|
|
# Installation des dépendances
|
|
- echo "deb http://ftp.debian.org/debian/ jessie-backports non-free contrib main" >> /etc/apt/sources.list
|
|
- apt-get update
|
|
- apt-get -y upgrade
|
|
- apt-get -t jessie-backports install libxml2 -y g++ gcc cmake libcurl4-openssl-dev libgl1-mesa-dev libjpeg-dev libpng-dev libopenal-dev libfreetype6-dev libxxf86vm-dev libxrandr-dev libxrender-dev libvorbis-dev libluabind-dev libboost-dev libmysqlclient-dev libssl-dev liblzma-dev libxml2-dev makeself
|
|
# Installation des dépendances des dépendances statiques (à commenter si construction de Khanat en mode dynamique)
|
|
# libxml2 : python-pyicu (support d'unicode), python-dev (support de... python)
|
|
- apt-get install -y wget python-pyicu python-dev
|
|
# Création de l'environnement de compilation
|
|
- mkdir -p BUILD/x86_64
|
|
- cd BUILD/x86_64
|
|
## Le curl des dépots a trop de dépendances en statique. On le recompile donc, afin d'aléger l'executable
|
|
# Téléchargement et décompression des dépendances à recompiller
|
|
- wget -c http://curl.haxx.se/download/curl-7.50.0.tar.gz
|
|
- tar xzf curl-7.50.0.tar.gz
|
|
# Compilation de curl
|
|
- cd curl-7.50.0
|
|
- ./configure --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 --without-libssh2 --with-ssl
|
|
- make install -j$(nproc)
|
|
- cd ..
|
|
## Compilation de Khanat
|
|
# Configuration
|
|
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_LUA52=ON ../../code
|
|
# Compilation et installation
|
|
- make -j$(nproc) install DESTDIR=../../Linux/x86_64
|
|
# Packaging
|
|
- cd ../../
|
|
- cp ./dist/khanat/autoextract_script.sh ./Linux/x86_64/
|
|
- chmod +x ./Linux/x86_64/autoextract_script.sh
|
|
- makeself --nox11 --target /tmp/khanat_installer ./Linux/x86_64/ khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run "Khanat installer" ./autoextract_script.sh
|
|
artifacts:
|
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7)-$CI_PIPELINE_ID-Linux-x86_64"
|
|
paths:
|
|
- khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
|
|
|
# Job de compilation pour OSX
|
|
OSX client build:
|
|
stage: build
|
|
only:
|
|
- tags
|
|
tags:
|
|
- OSX
|
|
script:
|
|
# Création de l'environnement de compilation
|
|
- mkdir -p BUILD/x86_64
|
|
- cd BUILD/x86_64
|
|
# Configuration
|
|
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFINAL_VERSION=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON -DWITH_LUA52=ON ../../code
|
|
# Compilation et installation
|
|
- make -j$(($(sysctl -n hw.ncpu)/2)) install DESTDIR=../../OSX/x86_64
|
|
artifacts:
|
|
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-OSX-x86_64"
|
|
paths:
|
|
- OSX/x86_64/*
|
|
when: manual
|
|
|
|
## TESTS
|
|
|
|
Linux client test:
|
|
stage: test
|
|
except:
|
|
- ryzomcore
|
|
tags:
|
|
- Docker
|
|
image: ubuntu:14.04
|
|
script:
|
|
# Test de l'installation initiale
|
|
- ./khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
|
dependencies:
|
|
- Linux client build
|
|
|
|
.OSX client test:
|
|
stage: test
|
|
except:
|
|
- ryzomcore
|
|
tags:
|
|
- OSX
|
|
script:
|
|
- echo "pas encore de test pour le client OSX"
|
|
dependencies:
|
|
- OSX client build
|
|
when: manual
|
|
|
|
##DEPLOYEMENT TO STAGING (TEST SERVER)
|
|
|
|
# Job de déploiment vers le staging. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de staging (zone de test)
|
|
.Deploy to Staging:
|
|
stage: staging
|
|
environment: Staging
|
|
except:
|
|
- ryzomcore
|
|
tags:
|
|
- Docker
|
|
image: ubuntu:14.04
|
|
script:
|
|
- echo "pas encore de deployment"
|
|
dependencies:
|
|
- Linux client build
|
|
- Linux client test
|
|
- OSX client build
|
|
- OSX client test
|
|
when: manual
|
|
|
|
##DEPLOYEMENT TO PRODUCTION
|
|
|
|
# Job de déploiment vers la production. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de production
|
|
.Release to Production:
|
|
stage: production
|
|
environment: Production
|
|
only:
|
|
- tags
|
|
tags:
|
|
- Docker
|
|
image: ubuntu:14.04
|
|
script:
|
|
- echo "pas encore de tag"
|
|
dependencies:
|
|
- Linux client build
|
|
- Linux client test
|
|
- OSX client build
|
|
- OSX client test
|
|
- Deploy to Staging
|
|
when: manual
|