From b3a66e849bc160c12ff7b762ba1146f49fc0b18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 12:54:15 +0200 Subject: [PATCH 1/8] Remove old CI stuff --- .travis.yml | 44 -------------------------------------------- appveyor.yml | 20 -------------------- 2 files changed, 64 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b52a0d5f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -os: - - linux - - osx -dist: - - xenial - -language: - - c++ - -compiler: - - gcc - - clang - -addons: - apt: - sources: - - sourceline: 'deb http://download.opensuse.org/repositories/home:/selmf/xUbuntu_16.04/ /' - key_url: 'https://download.opensuse.org/repositories/home:selmf/xUbuntu_16.04/Release.key' - - sourceline: 'ppa:kubuntu-ppa/backports' - packages: - - qt-default - - qt5-qmake - - qtbase5-dev - - qtmultimedia5-dev - - libpoppler-qt5-dev - - qtscript5-dev - - libqt5opengl5-dev - - libglu1-mesa-dev - - libunarr-dev - - qtdeclarative5-dev - homebrew: - packages: - - qt - -before_script: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; - then brew link qt --force; - qmake CONFIG+=unarr; - fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; - then QT_SELECT=qt5 qmake CONFIG+=unarr; - fi - -script: make diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index a95eea69..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: Visual Studio 2017 - -environment: - matrix: - - platform: x86 - QT5: C:\Qt\5.12.1\msvc2017 - VCVARS: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"' - - platform: x64 - QT5: C:\Qt\5.12.1\msvc2017_64 - VCVARS: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"' - -before_build: - - set PATH=%QT5%\bin;%PATH% - - call %VCVARS% - - cd %APPVEYOR_BUILD_FOLDER% - - qmake CONFIG+=unarr - -build_script: - - cd %APPVEYOR_BUILD_FOLDER% - - nmake From c2ac79b45494efb0dc6a46e54c333b556854a6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 12:54:40 +0200 Subject: [PATCH 2/8] Use a template for building 32 and 64 bit binaries for windows --- azure-pipelines-windows-template.yml | 40 +++++++++++++++++++ azure-pipelines.yml | 59 +++++++++------------------- 2 files changed, 59 insertions(+), 40 deletions(-) create mode 100644 azure-pipelines-windows-template.yml diff --git a/azure-pipelines-windows-template.yml b/azure-pipelines-windows-template.yml new file mode 100644 index 00000000..ce1a1233 --- /dev/null +++ b/azure-pipelines-windows-template.yml @@ -0,0 +1,40 @@ +jobs: +- job: {{ parameters.name }} + pool: + vmImage: 'vs2017-win2016' + steps: + - template: azure-pipelines-build-number.yml + - script: | + pip install aqtinstall + mkdir C:\Qt + python -m aqt install -O c:\Qt {{ parameters.qt_version }} windows desktop {{ parameters.qt_aqt_spec }} + choco install -y wget + choco install innosetup + wget "https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805-src.7z" -P $(Build.SourcesDirectory)\compressed_archive + 7z x $(Build.SourcesDirectory)\compressed_archive\7z1805-src.7z -o$(Build.SourcesDirectory)\compressed_archive\lib7zip + wget "{{ parameters.vc_redist_url }}" -O $(Build.SourcesDirectory)\{{ parameters.vc_redist_file_name }} + displayName: 'Install dependencies' + - script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\{{ parameters.vc_vars }}" + set PATH=%PATH%;C:\Qt\Qt{{ parameters.qt_version }}\{{ parameters.qt_version }}\{{ parameters.qt_spec }}\bin + set DEFINES_VAR=DEFINES+="BUILD_NUMBER=\\\\\\\"$(Build.BuildNumber)\\\\\\\"" + qmake CONFIG+="7zip" %DEFINES_VAR% + nmake + displayName: 'Build' + - script: | + set PATH=%PATH%;C:\Qt\Qt{{ parameters.qt_version }}\{{ parameters.qt_version }}\{{ parameters.qt_spec }}\bin + cd $(Build.SourcesDirectory)\ci\win + .\create_installer.cmd {{ parameters.arquitecture }} 7z $(Build.BuildNumber) + displayName: 'Create installer' + - task: CopyFiles@2 + inputs: + sourceFolder: $(Build.SourcesDirectory)\ci\win\Output\ + contents: '*' + targetFolder: $(Build.ArtifactStagingDirectory) + - task: PublishPipelineArtifact@1 + inputs: + path: $(Build.ArtifactStagingDirectory) + artifactName: Windows {{ parameters.arquitecture }} $(Build.BuildNumber) 7z Installer + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9a4d77e4..7ddb0a05 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,43 +64,22 @@ jobs: inputs: path: $(Build.ArtifactStagingDirectory) artifactName: Macos $(Build.BuildNumber) dmg -- job: Windows - pool: - vmImage: 'vs2017-win2016' - steps: - - template: azure-pipelines-build-number.yml - - script: | - pip install aqtinstall - mkdir C:\Qt - python -m aqt install -O c:\Qt 5.12.4 windows desktop win64_msvc2017_64 - choco install -y wget - choco install innosetup - wget "https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805-src.7z" -P $(Build.SourcesDirectory)\compressed_archive - 7z x $(Build.SourcesDirectory)\compressed_archive\7z1805-src.7z -o$(Build.SourcesDirectory)\compressed_archive\lib7zip - wget "https://go.microsoft.com/fwlink/?LinkId=746572" -O $(Build.SourcesDirectory)\vc_redist.x64.exe -# 32bit https://go.microsoft.com/fwlink/?LinkId=746571 - displayName: 'Install dependencies' - - script: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - set PATH=%PATH%;C:\Qt\Qt5.12.4\5.12.4\msvc2017_64\bin - set DEFINES_VAR=DEFINES+="BUILD_NUMBER=\\\\\\\"$(Build.BuildNumber)\\\\\\\"" - qmake CONFIG+="7zip" %DEFINES_VAR% - nmake - displayName: 'Build' - - script: | - set PATH=%PATH%;C:\Qt\Qt5.12.4\5.12.4\msvc2017_64\bin - cd $(Build.SourcesDirectory)\ci\win - .\create_installer.cmd x64 7z $(Build.BuildNumber) - displayName: 'Create installer' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)\ci\win\Output\ - contents: '*' - targetFolder: $(Build.ArtifactStagingDirectory) - - task: PublishPipelineArtifact@1 - inputs: - path: $(Build.ArtifactStagingDirectory) - artifactName: Windows 64 $(Build.BuildNumber) 7z Installer - - - +- template: azure-pipelines-windows-template.yml + parameters: + name: Windows x64 + arquitecture: x64 + qt_version: 5.12.4 + qt_spec: msvc2017_64 + qt_aqt_spec: win64_msvc2017_64 + vc_redist_url: https://go.microsoft.com/fwlink/?LinkId=746572 + vc_redist_file_name: vc_redist.x64.exe + vc_vars: vcvars64.bat +- template: azure-pipelines-windows-template.yml + name: Windows x86 + arquitecture: x86 + qt_version: 5.12.4 + qt_spec: msvc2017 + qt_aqt_spec: win32_msvc2017 + vc_redist_url: https://go.microsoft.com/fwlink/?LinkId=746571 + vc_redist_file_name: vc_redist.x86.exe + vc_vars: vcvars32.bat \ No newline at end of file From 8cea419606a8b7cd265afc45a1eb2fab80fb9379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 13:00:50 +0200 Subject: [PATCH 3/8] Pass parameters as strings --- azure-pipelines.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7ddb0a05..4696abcc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,20 +66,20 @@ jobs: artifactName: Macos $(Build.BuildNumber) dmg - template: azure-pipelines-windows-template.yml parameters: - name: Windows x64 - arquitecture: x64 - qt_version: 5.12.4 - qt_spec: msvc2017_64 - qt_aqt_spec: win64_msvc2017_64 - vc_redist_url: https://go.microsoft.com/fwlink/?LinkId=746572 - vc_redist_file_name: vc_redist.x64.exe - vc_vars: vcvars64.bat + name: 'Windows x64' + arquitecture: 'x64' + qt_version: '5.12.4' + qt_spec: 'msvc2017_64' + qt_aqt_spec: 'win64_msvc2017_64' + vc_redist_url: 'https://go.microsoft.com/fwlink/?LinkId=746572' + vc_redist_file_name: 'vc_redist.x64.exe' + vc_vars: 'vcvars64.bat' - template: azure-pipelines-windows-template.yml - name: Windows x86 - arquitecture: x86 - qt_version: 5.12.4 - qt_spec: msvc2017 - qt_aqt_spec: win32_msvc2017 - vc_redist_url: https://go.microsoft.com/fwlink/?LinkId=746571 - vc_redist_file_name: vc_redist.x86.exe - vc_vars: vcvars32.bat \ No newline at end of file + name: 'Windows x86' + arquitecture: 'x86' + qt_version: '5.12.4' + qt_spec: 'msvc2017' + qt_aqt_spec: 'win32_msvc2017' + vc_redist_url: 'https://go.microsoft.com/fwlink/?LinkId=746571' + vc_redist_file_name: 'vc_redist.x86.exe' + vc_vars: 'vcvars32.bat' \ No newline at end of file From 7be899dbac15b972e289a1bc4c953c9f0f0b9170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 13:02:42 +0200 Subject: [PATCH 4/8] Parameters have to be used as variables --- azure-pipelines-windows-template.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines-windows-template.yml b/azure-pipelines-windows-template.yml index ce1a1233..fb9f3e3c 100644 --- a/azure-pipelines-windows-template.yml +++ b/azure-pipelines-windows-template.yml @@ -1,5 +1,5 @@ jobs: -- job: {{ parameters.name }} +- job: ${{ parameters.name }} pool: vmImage: 'vs2017-win2016' steps: @@ -7,24 +7,24 @@ jobs: - script: | pip install aqtinstall mkdir C:\Qt - python -m aqt install -O c:\Qt {{ parameters.qt_version }} windows desktop {{ parameters.qt_aqt_spec }} + python -m aqt install -O c:\Qt ${{ parameters.qt_version }} windows desktop ${{ parameters.qt_aqt_spec }} choco install -y wget choco install innosetup wget "https://sourceforge.net/projects/sevenzip/files/7-Zip/18.05/7z1805-src.7z" -P $(Build.SourcesDirectory)\compressed_archive 7z x $(Build.SourcesDirectory)\compressed_archive\7z1805-src.7z -o$(Build.SourcesDirectory)\compressed_archive\lib7zip - wget "{{ parameters.vc_redist_url }}" -O $(Build.SourcesDirectory)\{{ parameters.vc_redist_file_name }} + wget "${{ parameters.vc_redist_url }}" -O $(Build.SourcesDirectory)\${{ parameters.vc_redist_file_name }} displayName: 'Install dependencies' - script: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\{{ parameters.vc_vars }}" - set PATH=%PATH%;C:\Qt\Qt{{ parameters.qt_version }}\{{ parameters.qt_version }}\{{ parameters.qt_spec }}\bin + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\${{ parameters.vc_vars }}" + set PATH=%PATH%;C:\Qt\Qt${{ parameters.qt_version }}\${{ parameters.qt_version }}\${{ parameters.qt_spec }}\bin set DEFINES_VAR=DEFINES+="BUILD_NUMBER=\\\\\\\"$(Build.BuildNumber)\\\\\\\"" qmake CONFIG+="7zip" %DEFINES_VAR% nmake displayName: 'Build' - script: | - set PATH=%PATH%;C:\Qt\Qt{{ parameters.qt_version }}\{{ parameters.qt_version }}\{{ parameters.qt_spec }}\bin + set PATH=%PATH%;C:\Qt\Qt${{ parameters.qt_version }}\${{ parameters.qt_version }}\${{ parameters.qt_spec }}\bin cd $(Build.SourcesDirectory)\ci\win - .\create_installer.cmd {{ parameters.arquitecture }} 7z $(Build.BuildNumber) + .\create_installer.cmd ${{ parameters.arquitecture }} 7z $(Build.BuildNumber) displayName: 'Create installer' - task: CopyFiles@2 inputs: @@ -34,7 +34,7 @@ jobs: - task: PublishPipelineArtifact@1 inputs: path: $(Build.ArtifactStagingDirectory) - artifactName: Windows {{ parameters.arquitecture }} $(Build.BuildNumber) 7z Installer + artifactName: Windows ${{ parameters.arquitecture }} $(Build.BuildNumber) 7z Installer From 12ec7c172354696c6d758c0b3026e01e73840013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 13:08:41 +0200 Subject: [PATCH 5/8] Do templates must to specify defaults? --- azure-pipelines-windows-template.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines-windows-template.yml b/azure-pipelines-windows-template.yml index fb9f3e3c..cb0db596 100644 --- a/azure-pipelines-windows-template.yml +++ b/azure-pipelines-windows-template.yml @@ -1,3 +1,13 @@ +parameters: + name: 'Windows x64' + arquitecture: 'x64' + qt_version: '5.12.4' + qt_spec: 'msvc2017_64' + qt_aqt_spec: 'win64_msvc2017_64' + vc_redist_url: 'https://go.microsoft.com/fwlink/?LinkId=746572' + vc_redist_file_name: 'vc_redist.x64.exe' + vc_vars: 'vcvars64.bat' + jobs: - job: ${{ parameters.name }} pool: From 44e9c7b4c9a5bbc593e0fdcb87ad6161340601d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 13:11:56 +0200 Subject: [PATCH 6/8] `parameters` was missing --- azure-pipelines-windows-template.yml | 2 +- azure-pipelines.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-windows-template.yml b/azure-pipelines-windows-template.yml index cb0db596..2e353752 100644 --- a/azure-pipelines-windows-template.yml +++ b/azure-pipelines-windows-template.yml @@ -1,5 +1,5 @@ parameters: - name: 'Windows x64' + name: Windows x64 arquitecture: 'x64' qt_version: '5.12.4' qt_spec: 'msvc2017_64' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4696abcc..8ad7a35f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,7 +66,7 @@ jobs: artifactName: Macos $(Build.BuildNumber) dmg - template: azure-pipelines-windows-template.yml parameters: - name: 'Windows x64' + name: Windows x64 arquitecture: 'x64' qt_version: '5.12.4' qt_spec: 'msvc2017_64' @@ -75,7 +75,8 @@ jobs: vc_redist_file_name: 'vc_redist.x64.exe' vc_vars: 'vcvars64.bat' - template: azure-pipelines-windows-template.yml - name: 'Windows x86' + parameters: + name: Windows x86 arquitecture: 'x86' qt_version: '5.12.4' qt_spec: 'msvc2017' From ab677f8f2a52c0305365d5c7d5e33c5e7c6ce43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 13:14:31 +0200 Subject: [PATCH 7/8] Fix jobs names --- azure-pipelines-windows-template.yml | 2 +- azure-pipelines.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-windows-template.yml b/azure-pipelines-windows-template.yml index 2e353752..62c25660 100644 --- a/azure-pipelines-windows-template.yml +++ b/azure-pipelines-windows-template.yml @@ -1,5 +1,5 @@ parameters: - name: Windows x64 + name: Windows_x64 arquitecture: 'x64' qt_version: '5.12.4' qt_spec: 'msvc2017_64' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8ad7a35f..b16f4e68 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,7 +66,7 @@ jobs: artifactName: Macos $(Build.BuildNumber) dmg - template: azure-pipelines-windows-template.yml parameters: - name: Windows x64 + name: Windows_x64 arquitecture: 'x64' qt_version: '5.12.4' qt_spec: 'msvc2017_64' @@ -76,7 +76,7 @@ jobs: vc_vars: 'vcvars64.bat' - template: azure-pipelines-windows-template.yml parameters: - name: Windows x86 + name: Windows_x86 arquitecture: 'x86' qt_version: '5.12.4' qt_spec: 'msvc2017' From 565bc53ed4405e8be1c3902b1cddb534d854fd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 7 Sep 2019 15:03:11 +0200 Subject: [PATCH 8/8] Avoid file corruption --- ci/win/create_installer.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/win/create_installer.cmd b/ci/win/create_installer.cmd index 7ef4690a..d0e43163 100644 --- a/ci/win/create_installer.cmd +++ b/ci/win/create_installer.cmd @@ -53,7 +53,8 @@ echo %VERSION% del if "%1"=="x86" ( - type build_installer.iss | findstr /v ArchitecturesInstallIn64BitMode | findstr /v ArchitecturesAllowed > build_installer.iss + type build_installer.iss | findstr /v ArchitecturesInstallIn64BitMode | findstr /v ArchitecturesAllowed > copy_build_installer.iss + type copy_build_installer.iss > build_installer.iss ) iscc /DVERSION=%VERSION% /DPLATFORM=%1 /DCOMPRESSED_ARCHIVE_BACKEND=%2 /DBUILD_NUMBER=%3 build_installer.iss || exit /b