Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Windows release mode binaries, keep artifacts on any tag build #1237

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
environment:
GENERATOR: "MinGW Makefiles"
ARTIFACT_BRANCH: master-artifacts
matrix:

- job_name: 'Ubuntu 20.04'
Expand All @@ -10,12 +11,20 @@ environment:
job_group: 'Mac OS X'
appveyor_build_worker_image: macos

- job_name: 'WindowsDebug64'
- job_name: 'Windows64'
job_group: 'Windows'
MSYS: 'C:\msys64\mingw64'
MSYS_REPO: 'mingw64/mingw-w64-x86_64'
BUILD_TYPE: "Debug"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=ON -DWIN64:BOOL=ON"
BUILD_TYPE: "Release"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=OFF -DWIN64:BOOL=ON"
appveyor_build_worker_image: Visual Studio 2019

- job_name: 'Windows32'
job_group: 'Windows'
MSYS: 'C:\msys64\mingw32'
MSYS_REPO: 'mingw-w64-i686'
BUILD_TYPE: "Release"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=OFF -DWIN64:BOOL=OFF"
appveyor_build_worker_image: Visual Studio 2019


Expand Down Expand Up @@ -71,7 +80,7 @@ for:
../macos/build_dmg.sh -v src/gui/hydrogen.app Hydrogen${PKG_SUFFIX}.dmg

#deploy dmg only on branch appveyor-build-with-artifacts
if [ "$APPVEYOR_REPO_BRANCH" = appveyor-build-with-artifacts ]; then appveyor PushArtifact Hydrogen*.dmg -DeploymentName Installer; fi
if [ "$APPVEYOR_REPO_BRANCH" = $ARTIFACT_BRANCH ]; then appveyor PushArtifact Hydrogen*.dmg -DeploymentName Installer; fi

test_script: |-
TMPDIR=/tmp src/tests/tests --appveyor || true
Expand All @@ -83,6 +92,7 @@ for:

before_build:
cmd: |-
if not %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% if %APPVEYOR_JOB_NAME%==Windows32 appveyor exit
set QTDIR=%MSYS%
set CMAKE_PREFIX_PATH=%QTDIR%
set PATH=%MSYS%\bin;%PATH%
Expand Down Expand Up @@ -124,7 +134,7 @@ for:
set PATH=%CORE_PATH%;%PATH%
src\tests\tests.exe --appveyor || cmd /c "exit /b 0"
7z a %APPVEYOR_BUILD_FOLDER%\testresults.zip %TEMP%\hydrogen
if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\testresults.zip
if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\testresults.zip

mkdir %APPVEYOR_BUILD_FOLDER%\windows\extralibs

Expand All @@ -146,10 +156,10 @@ for:
%PYTHON% -m pytest %APPVEYOR_BUILD_FOLDER%\windows\ci\test_installation.py --junitxml=test_installation.xml

on_finish:
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeCache.txt
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeOutput.log
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeError.log
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\Hydrogen-1.1.0-win64.exe
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeCache.txt
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeOutput.log
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeError.log
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% FOR %%F IN (%APPVEYOR_BUILD_FOLDER%\build\Hydrogen-*.exe) DO appveyor PushArtifact %%F

- cmd: |
if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts curl -F file=@%APPVEYOR_BUILD_FOLDER%\build\test_installation.xml https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%
if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% curl -F file=@%APPVEYOR_BUILD_FOLDER%\build\test_installation.xml https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ IF(APPLE)
ENDIF()

OPTION(WANT_CPPUNIT "Include CppUnit test suite" ON)
OPTION(FIXME_DISABLE_OPTIMIZATIONS "Fix broken builds by turning off optimizations" OFF)

include(Sanitizers)

Expand Down Expand Up @@ -128,12 +127,6 @@ SET(CMAKE_CXX_FLAGS_RELEASE "")

SET(CMAKE_CXX_FLAGS_DEBUG "-g ")#-Winline")

IF(FIXME_DISABLE_OPTIMIZATIONS)
string(REGEX REPLACE "-O[0123s]" "-O0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "-O[0123s]" "-O0" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "-O[0123s]" "-O0" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE "-O[0123s]" "-O0" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF()

#
# MANDATORY PKGS AND DEFAULT OPTIONS
Expand Down