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

Appveyor vs2019 static ssl fix #1346

Merged
merged 60 commits into from
Jun 24, 2020

Conversation

lewk2
Copy link
Contributor

@lewk2 lewk2 commented Jun 12, 2020

This PR fixes a few things, and improves some others. In summary:

  • fixes static OpenSSL linking for VS2015/VS2019 builds on AppVeyor (or anywhere anyone uses this with OpenSSL v1.0+)
  • moves the scripted build into an _build folder (helps with .gitignore on workstations)
  • places nuget packages (pthreads) into an _packages folder (helps with .gitignore on workstations)
  • adds VS2019 building support to appveyor
  • tunes up the options to reduce actions on VS2013/VS2015 and Debug builds for faster build times
  • removes openssl from the artifact when statically linking
  • moves unit testing to VS2019 (rather than VS2015) and only on release (unit test execution takes appreciable time)
  • sets static openssl linking on VS2019 and VS2015, moves VS2013 to dynamic
  • creates statically linked 'apps' in the VS2019 release build (for easy experimenting with single EXE)
  • enables C++11 threading for VS2015 and VS2019 (leaves VS2013 on pthreads - C++11 build option fails on VS2013 anyway)

and finally... there it moves the actual build scripting work out of appveyor, into a dedicated (and much expanded) powershell script in the 'scripts' folder.

This new build script allows:

  • easier developer flag control without opening cmake (uses powershell auto-completion)
  • quicker debugging of build issues on local workstations without endless commits to test build script in appveyor itself
  • opens the door to other CI systems just calling this script (GitHub actions?)
  • helps people compiling locally to install extra tools (cmake, pthreads) and provides feedback
  • allows double-click building with handy wrap-around 'build-windows.bat' that calls the powershell

While this is a decent change to the build process, it does not invalidate the current windows building instructions - although they could potentially be reviewed after merging to see if there are further optimizations to those instructions. However, those instructions are very informative for people wishing to step away from the scripted build - so at most a 'quick start' section referring to this BAT-file based execution could be considered.

Finally, quite understandably, total time to run these builds is important - so even though more combinations have been added within this PR, through careful allocation of flags and skipping 2013 debug builds, the total build time is reduced by ~33% (~24 mins down from ~34mins)

Lewis Kirkaldie and others added 30 commits November 5, 2019 17:35
-remove pthread nuget from build
-switch to C++11 mode
-clean out old appveyor RDP stuff
-comment and sanitize build script
-add VSVER envvar back for artifact names
-fix gather package to work with new _build folder
-PS set to erroraction stop
-find msbuild
-add throw on nonzero msbuild
@maxsharabayko maxsharabayko added [build] Area: Changes in build files Type: Maintenance Work required to maintain or clean up the code labels Jun 14, 2020
@maxsharabayko maxsharabayko added this to the v1.5.0 - Sprint 17 milestone Jun 14, 2020
scripts/build-windows.ps1 Outdated Show resolved Hide resolved
scripts/build-windows.ps1 Outdated Show resolved Hide resolved
scripts/build-windows.ps1 Outdated Show resolved Hide resolved
scripts/build-windows.ps1 Outdated Show resolved Hide resolved
Copy link
Collaborator

@ethouris ethouris left a comment

Choose a reason for hiding this comment

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

Please consider the comments above and answer questions if possible.

@maxsharabayko
Copy link
Collaborator

moves unit testing to VS2019 (rather than VS2015) and only on release (unit test execution takes appreciable time)

This will probably hide this strange behavior.
I would also suggest run unit tests for at least one of the builds using pthread to ensure it still works.

Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

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

Merging to improve AppVeyor build time.

@maxsharabayko maxsharabayko merged commit 3e87ca1 into Haivision:master Jun 24, 2020
@lewk2 lewk2 deleted the appveyor-vs2019-static-ssl-fix branch June 24, 2020 16:50
@mbakholdina mbakholdina modified the milestones: v1.5.0 - Sprint 17, v1.4.2 Oct 14, 2020
maxsharabayko added a commit to maxsharabayko/srt that referenced this pull request Oct 20, 2020
Were previously disabled in Haivision#1346 to reduce build times.
maxsharabayko added a commit that referenced this pull request Oct 26, 2020
Were previously disabled in #1346 to reduce build times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants