Build AppImage in Jenkins (#1243)

1008-fix
Mateusz Przybył 2019-02-21 17:46:11 +01:00 committed by GitHub
parent e02a3373fd
commit 275724ab97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 3 deletions

30
Jenkinsfile vendored
View File

@ -54,8 +54,8 @@ pipeline {
dir('build/linux') { dir('build/linux') {
sh ''' sh '''
cmake \ cmake \
-DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data -DCOLOBOT_INSTALL_I18N_DIR=/install/lang -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=/install -DCMAKE_SKIP_INSTALL_RPATH=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../.. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=1 ../..
make make
rm -rf install rm -rf install
DESTDIR=. make install DESTDIR=. make install
@ -66,7 +66,31 @@ pipeline {
post { post {
success { success {
sh 'rm -f linux-debug.zip' sh 'rm -f linux-debug.zip'
zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/install' dir('build/linux') {
sh '''
# Clean up
rm -rf squashfs-root
rm -rf colobot.AppDir
rm -rf appimage
rm -f Colobot-x86_64.AppImage
# Download app image tool
wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appimage-extract
# Create AppImage
NO_STRIP=1 ./squashfs-root/AppRun -e colobot --output appimage --appdir colobot.AppDir -d desktop/colobot.desktop -i ../../desktop/colobot.svg
chmod +x Colobot-x86_64.AppImage
# Prepare folder for zip
mkdir -p appimage
cp -rp install/data appimage/data
cp -rp install/lang appimage/lang
cp -p Colobot-x86_64.AppImage appimage/colobot
'''
}
zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/appimage'
} }
} }
} }