CI improvements (WIP) (#1)

* Use appveyor artifacts instead of transfer.sh

* TODO added to appveyor

* Build Travic CI on all branches

* Updated list of linux OSs

* Skip branches with open PRs

* Version bump
This commit is contained in:
Vlad Fedosov
2020-07-01 16:57:58 +03:00
committed by Yuriy Puchkov
parent 48a0555bcc
commit 39fc2469c6
2 changed files with 60 additions and 61 deletions

View File

@@ -6,6 +6,7 @@ language: cpp
branches:
only:
- master
- master_nc
cache:
directories:
@@ -15,7 +16,8 @@ env:
global:
# Environment variables for packaging
- PRODUCT=flameshot
- VERSION=0.6.0
#TODO: we should take version from the last tag in git history + build number
- VERSION=0.7.0
- RELEASE=1
- ARCH=x86_64
# Dockerfile from https://github.com/flameshotapp/flameshot-docker-images
@@ -40,16 +42,16 @@ matrix:
env: OS=fedora DIST=30 EXTEN=rpm
services: docker
- os: linux
# 16.04 LTS
# Ubuntu 16.04 LTS
env: OS=ubuntu DIST=xenial EXTEN=deb
services: docker
- os: linux
# 18.04 LTS
# Ubuntu 18.04 LTS
env: OS=ubuntu DIST=bionic EXTEN=deb
services: docker
- os: linux
# 19.04
env: OS=ubuntu DIST=disco EXTEN=deb
# Ubuntu 20.04 LTS
env: OS=ubuntu DIST=focal EXTEN=deb
services: docker
- os: linux
# 8

View File

@@ -1,78 +1,75 @@
image: Visual Studio 2015
#TODO: we should take version from the last tag in git history + build number
version: 0.7.0.{build}
# Major_Version_Number.Minor_Version_Number.Build_Number.Revision_Number
# Major_Version_Number.Minor_Version_Number.Patch_Number.Build_Number
branches:
only:
- master
skip_branch_with_pr: true
environment:
COMPILER: msvc
VSVER: 14
COMPILER: msvc
VSVER: 14
matrix:
- QT: C:\Qt\5.9\msvc2015_64
PLATFORM: amd64
- QT: C:\Qt\5.9\msvc2015
PLATFORM: x86
matrix:
- QT: C:\Qt\5.9\msvc2015_64
PLATFORM: amd64
- QT: C:\Qt\5.9\msvc2015
PLATFORM: x86
init:
- ps: |
$version = new-object System.Version $env:APPVEYOR_BUILD_VERSION
$packageVersion = "{0}.{1}.{2}.{3}" -f $version.Major, $version.Minor, $version.Build, $version.Revision
$env:build_number = $version.Build
$env:flameshot_version = $packageVersion
- ps: |
$version = new-object System.Version $env:APPVEYOR_BUILD_VERSION
$packageVersion = "{0}.{1}.{2}.{3}" -f $version.Major, $version.Minor, $version.Build, $version.Revision
$env:build_number = $version.Build
$env:flameshot_version = $packageVersion
# scripts that run after cloning repository
install:
- set PATH=%QT%\bin\;C:\Qt\Tools\QtCreator\bin\;C:\Qt\QtIFW3.0.1\bin\;%PATH%
- set PATH=%QT%\bin\;C:\Qt\Tools\QtCreator\bin\;C:\Qt\QtIFW3.0.1\bin\;%PATH%
# scripts that run before build
before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
- appveyor DownloadFile http://mlaan2.home.xs4all.nl/ispack/innosetup-6.0.5.exe
- innosetup-6.0.5.exe /VERYSILENT /ALLUSERS /DIR=C:\InnoSetup
# After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
- qmake --version
- mkdir build
- cd build
- if "%PLATFORM%" EQU "X64" (qmake -r -spec win32-msvc CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../flameshot.pro)
- if "%PLATFORM%" EQU "x86" (qmake -r -spec win32-msvc CONFIG+=Win32 CONFIG-=debug CONFIG+=release ../flameshot.pro)
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
- appveyor DownloadFile http://mlaan2.home.xs4all.nl/ispack/innosetup-6.0.5.exe
- innosetup-6.0.5.exe /VERYSILENT /ALLUSERS /DIR=C:\InnoSetup
# After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
- qmake --version
- mkdir build
- cd build
- if "%PLATFORM%" EQU "X64" (qmake -r -spec win32-msvc CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../flameshot.pro)
- if "%PLATFORM%" EQU "x86" (qmake -r -spec win32-msvc CONFIG+=Win32 CONFIG-=debug CONFIG+=release ../flameshot.pro)
# custom build scripts
build_script:
- nmake
- nmake
# scripts that run after build
after_build:
# Clone OpenSSL DLLs
- git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git
- mkdir distrib\flameshot
- windeployqt.exe --dir .\distrib\flameshot %APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe
- copy "%APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe" "distrib\flameshot\flameshot.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\README.md" "distrib\flameshot\README.md"
- copy "%APPVEYOR_BUILD_FOLDER%\LICENSE" "distrib\flameshot\LICENSE.txt"
- echo %flameshot_version% > "distrib\flameshot\version.txt"
- echo Build:%build_number% >> "distrib\flameshot\version.txt"
- echo %APPVEYOR_REPO_COMMIT% >> "distrib\flameshot\version.txt"
- copy "distrib\flameshot\flameshot.exe" "distrib\flameshot_win_%PLATFORM%.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\build\translations\Internationalization_*.qm" "distrib\flameshot\translations"
# Delete translations\qt_*.qm
- del /F /Q "distrib\flameshot\translations\qt_*.qm"
# Copy OpenSSL DLLs
- if "%PLATFORM%" EQU "X64" (xcopy "openssl-utils.git\win64\*.dll" "distrib\flameshot")
- if "%PLATFORM%" EQU "x86" (xcopy "openssl-utils.git\win32\*.dll" "distrib\flameshot")
- cd distrib
- 7z a flameshot_%flameshot_version%_win_%PLATFORM%.zip flameshot
- appveyor-retry curl --upload-file ./flameshot_%flameshot_version%_win_%PLATFORM%.zip https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%.zip
# build installation
- cp ..\..\win_setup\flameshot.iss flameshot.iss
- C:\InnoSetup\Compil32.exe /cc flameshot.iss
- appveyor-retry curl --upload-file ./Output/FlameShot-Setup-is.exe https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%_setup.exe
# Clone OpenSSL DLLs
- git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git
- mkdir distrib\flameshot
- windeployqt.exe --dir .\distrib\flameshot %APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe
- copy "%APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe" "distrib\flameshot\flameshot.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\README.md" "distrib\flameshot\README.md"
- copy "%APPVEYOR_BUILD_FOLDER%\LICENSE" "distrib\flameshot\LICENSE.txt"
- echo %flameshot_version% > "distrib\flameshot\version.txt"
- echo Build:%build_number% >> "distrib\flameshot\version.txt"
- echo %APPVEYOR_REPO_COMMIT% >> "distrib\flameshot\version.txt"
- copy "distrib\flameshot\flameshot.exe" "distrib\flameshot_win_%PLATFORM%.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\build\translations\Internationalization_*.qm" "distrib\flameshot\translations"
# Delete translations\qt_*.qm
- del /F /Q "distrib\flameshot\translations\qt_*.qm"
# Copy OpenSSL DLLs
- if "%PLATFORM%" EQU "X64" (xcopy "openssl-utils.git\win64\*.dll" "distrib\flameshot")
- if "%PLATFORM%" EQU "x86" (xcopy "openssl-utils.git\win32\*.dll" "distrib\flameshot")
- cd distrib
- 7z a flameshot_%flameshot_version%_win_%PLATFORM%.zip flameshot
# Build installation
- cp ..\..\win_setup\flameshot.iss flameshot.iss
- C:\InnoSetup\Compil32.exe /cc flameshot.iss
# artifacts:
# - path: build\distrib\flameshot_win_%PLATFORM%_portable_%flameshot_version%.zip
# name: portable
# - path: build\distrib\flameshot_win_%PLATFORM%.exe
# name: exe_only
artifacts:
- path: build\distrib\flameshot_%flameshot_version%_win_%PLATFORM%.zip
name: exe_only
- path: build\distrib\Output\FlameShot-Setup-is.exe
name: installer