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 Mixxx on Appveyor with Visual Studio 2015. #1131

Merged
merged 4 commits into from
Jan 19, 2017
Merged

Conversation

rryan
Copy link
Member

@rryan rryan commented Jan 17, 2017

Uses an x86 and x64 environment built from mixxxdj/buildserver@3ddf42e which is a combination of work by @Pegasus-RPG, @JosepMaJAZ, @sblaisot and myself. All dependencies are linked statically.

SCons is now present in the bin directory of the environment, so we don't need to install it anymore.

@rryan rryan force-pushed the msvc15 branch 8 times, most recently from cde14d2 to a1e7e4a Compare January 17, 2017 18:30
@sblaisot
Copy link
Member

1hr time limit hit. Hummm... why is static build so much longer ?

@sblaisot
Copy link
Member

sblaisot commented Jan 17, 2017

your build env is too large. You need to shrink it by removing all strictly unneeded QT and third party libs source code.
Do you want me to take a look at that ?

@sblaisot
Copy link
Member

Oh, not a build env size problem.

Static linking alone takes 10 minutes for mixxx.exe and not less than 13 minutes for mixxx-test.exe ??!!

not something with can afford with appveyor. Why is static linking so long ?

@sblaisot
Copy link
Member

sblaisot commented Jan 17, 2017

Packaging failed:
Exception : Could not find the MSVC++ runtime installer.

You need to add vcredist_%ARCH%.exe at the root of the build env.

scons mixxx makerelease verbose=0 winlib=%WINLIB_PATH% qtdir=%WINLIB_PATH%\build\qt-everywhere-opensource-src-4.8.6 hss1394=1 mediafoundation=1 opus=1 localecompare=1 optimize=portable build=%BUILD_TYPE% machine=%TARGET_MACHINE% toolchain=msvs virtualize=0 test=1 qt_sqlite_plugin=0 mssdk_dir=%MSSDK_DIR% build_number_in_title_bar=0 bundle_pdbs=1
echo ==============================
echo.
IF ERRORLEVEL 1 (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you check the return code of echo. and not scons error code. So the tests run even if build fails

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh, thanks!

REM set multiprocessor to build faster (together with scons -j4)
set CL=/MP /FS /EHsc
REM For debugging, print the configuration log.
type config.log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably only want to dump config.log when build fails.
I'd rather move these two lines into the IF ERRORLEVEL block

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea this was just for debugging why configuration was failing. I was going to remove it, but moving it to the failure block is an even better idea

@rryan
Copy link
Member Author

rryan commented Jan 17, 2017

Static linking alone takes 10 minutes for mixxx.exe and not less than 13 minutes for mixxx-test.exe ??!!

It's likely link-time code-generation -- we're now doing LTCG across the entire codebase (dependencies + mixxx) whereas in a dynamic build we do LTCG for each individual DLL and mixxx separately.

@sblaisot
Copy link
Member

What option do we have to fit into the 1hr time limit ?
I don't see a way to achieve this atm and being unable to fit into this time limit again bells the end of windows CI :(

@rryan
Copy link
Member Author

rryan commented Jan 17, 2017

I don't see a way to achieve this atm and being unable to fit into this time limit again bells the end of windows CI :(

Debug only builds with LTCG disabled, probably

@rryan rryan force-pushed the msvc15 branch 2 times, most recently from c56d33b to 628a609 Compare January 18, 2017 02:11
@Be-ing
Copy link
Contributor

Be-ing commented Jan 18, 2017

AppVeyor build succeeded \o/

@rryan
Copy link
Member Author

rryan commented Jan 18, 2017

Ok, we now have a "fastbuild" environment built with LTCG turned off and corresponding optimize=fastbuild option. Each build completed in ~30 minutes:
https://ci.appveyor.com/project/mixxxdj/mixxx/build/master-575

@@ -119,12 +119,12 @@ Function InstallVCRedist
SetOutPath $TEMP

; Put the VC redist installer files there
File ${WINLIB_PATH}\vcredist_${ARCH}.exe
File ${WINLIB_PATH}\vc_redist.${ARCH}.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

SET BASEURL=%1

REM Build envs to install. You can specify more than one separated by spaces (no quotes)
SET BUILDENVS=%2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the above comment is not true anymore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could %2 not be a space-separated list?

@sblaisot
Copy link
Member

with this build, the 64 bits package wants to install in the (32 bits) program files folder :(
I didn't already figure out why but this is currently a show stopper for merging this PR.
I'll take a look at it.

@sblaisot
Copy link
Member

sblaisot commented Jan 18, 2017

Oh, I know why : NSIS needs to be patched:
https://github.com/rryan/mixxx/blob/628a6093cc57e8c627843e46f87166e131b20620/build/nsis/Mixxx.nsi#L34
; In order for the below line to work, you must patch your C:\Program Files (x86)\NSIS\Include\MultiUser.nsh file with the one given at this link: ; http://sourceforge.net/tracker/?func=detail&atid=373085&aid=2355677&group_id=22049

we need to include NSIS patching in appveyor setup part (or kindly ask appveyor to patch NSIS in their image)

@rryan
Copy link
Member Author

rryan commented Jan 18, 2017

Oh, I know why : NSIS needs to be patched:
https://github.com/rryan/mixxx/blob/628a6093cc57e8c627843e46f87166e131b20620/build/nsis/Mixxx.nsi#L34

Gotcha, so it affects all appveyor builds?

rryan added a commit that referenced this pull request Jan 18, 2017
AppVeyor builds still use MSVC 2013. (but won't after PR #1131).

This reverts commit b2b720f.
@sblaisot
Copy link
Member

You have to revert e1b3a42 in this PR only.

@rryan
Copy link
Member Author

rryan commented Jan 19, 2017

Ok, new build environment published with both a "release" variant and a "fastbuild" variant:
http://downloads.mixxx.org/builds/appveyor/environments/2.1/

Built using create_and_build_environments.bat from this commit: mixxxdj/buildserver@5e57821 (note the short hash is in the filename of the zips).

Uses an x86 and x64 environment built from mixxxdj/buildserver@3ddf42e which is a combination of work by @Pegasus-RPG, @JosepMaJAZ, @sblaisot and myself. All dependencies are linked statically.

SCons is now present in the bin directory of the environment, so we don't need to install it anymore.
@rryan
Copy link
Member Author

rryan commented Jan 19, 2017

Nice, build is green. I think this PR is ready to go.
https://ci.appveyor.com/project/mixxxdj/mixxx/build/master-594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants