Generate Linux binaries (in tarballs) on release pipeline

presentation
Bryan Tan 7 years ago
parent f1f8685f3e
commit 6b27318cb1
  1. 19
      CMakeLists.txt
  2. 20
      azure-pipelines/release.yml
  3. 5
      azure-pipelines/steps/build_linux.yml
  4. 4
      azure-pipelines/steps/build_windows.yml

@ -4,6 +4,9 @@ project ("Xournal++" CXX C)
## Also update changelog in debian folder!
set (PROJECT_VERSION "1.0.13")
set (CPACK_PACKAGE_VERSION_MAJOR "1")
set (CPACK_PACKAGE_VERSION_MINOR "0")
set (CPACK_PACKAGE_VERSION_PATCH "13")
set (PROJECT_PACKAGE "xournalpp")
set (PROJECT_STRING "${PROJECT_NAME} ${PROJECT_VERSION}")
set (PROJECT_URL "https://github.com/xournalpp/xournalpp")
@ -225,8 +228,6 @@ install (DIRECTORY plugins
# Install desktop shortcuts for Linux
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message ("Installing desktop files")
# Install desktop entry
#install(FILES data/albert.desktop DESTINATION /share/applications )
# Install icons
install(FILES ui/pixmaps/xournalpp.svg
@ -259,7 +260,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(FILES desktop/xournalpp.thumbnailer
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/thumbnailers)
install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/cmake/postinst configure)")
# TODO: Only package post install scripts with distro-specific packages
# Also update manual install instructions
# install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/cmake/postinst configure)")
endif ()
@ -288,3 +292,12 @@ if (CMAKE_DEBUG_INCLUDES_LDFLAGS)
message ("Include directories: ${xournalpp_INCLUDE_DIRS}")
message ("LDFLAGS/LIBRARIES: ${xournalpp_LDFLAGS}")
endif (CMAKE_DEBUG_INCLUDES_LDFLAGS)
# Packaging options
set (CPACK_OUTPUT_FILE_PREFIX packages)
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Xournal++ - Open source hand note-taking program")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set (CPACK_GENERATOR "TGZ")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "Xournal++")
include (CPack)

@ -5,10 +5,30 @@ pr: none
stages:
- stage: Release
jobs:
- job: 'Linux'
pool:
vmImage: 'ubuntu-16.04'
displayName: 'Build for Linux'
condition: always()
steps:
- template: steps/build_linux.yml
parameters:
cmake_flags: '-DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON'
- bash: |
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/staging
cmake --build . --target package
workingDirectory: ./build
displayName: 'Generate packages'
- task: PublishPipelineArtifact@1
inputs:
artifactName: 'linux-packages'
targetPath: '$(System.DefaultWorkingDirectory)/build/packages'
displayName: 'Publish packages'
- job: Windows
pool:
vmImage: 'vs2017-win2016'
displayName: 'Build Release for Windows'
condition: always()
steps:
- template: steps/build_windows.yml
parameters:

@ -1,4 +1,5 @@
# Template for building Xournal++ on Linux
# Template for setting up the Ubuntu build environment and building Xournal++ on
# Ubuntu
parameters:
build_type: 'Debug'
@ -16,4 +17,4 @@ steps:
cmake -GNinja .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type}} ${{ parameters.cmake_flags }}
cmake --build .
workingDirectory: ./build
displayName: 'Build Xournal++'
displayName: 'Build Xournal++'

@ -1,3 +1,5 @@
# Template for setting up an MSYS2 environment and building Xournal++ on Windows
parameters:
build_type: ''
cmake_flags: ''
@ -54,4 +56,4 @@ steps:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Xournal++'
displayName: 'Build Xournal++'

Loading…
Cancel
Save