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 CI build config #4

Closed
wants to merge 1 commit into from
Closed

Conversation

@CLAassistant
Copy link

CLAassistant commented Sep 21, 2017

CLA assistant check
All committers have signed the CLA.

@misery
Copy link
Contributor

misery commented Sep 26, 2017

Thank you very much for your contribution!

You are right that the vanilla libraries of Qt lacks our patches.
In the past we contributed a lot of patches back to the Qt community.
As Qt and AusweisApp2 have different release cycles we will always have a little gap here.

The next major update of AusweisApp2 will support vanilla libraries by disabling features of AusweisApp2. It is still recommended to use our library build script since vanilla Qt/OpenSSL libraries could miss some security related patches.
See: https://codereview.qt-project.org/173427/

Since v1.12.x does not support vanilla libraries we look forward to merging your changes once v1.14.0 is released. :-)

Regarding the "remaining issues":
You are trying to build AusweisApp2 with configuration "release" but configured it as "debug".
Try "-DCMAKE_BUILD_TYPE=$env:CONFIGURATION" in your initial cmake call.

@misery misery self-assigned this Sep 26, 2017
@chcg
Copy link
Contributor Author

chcg commented Sep 26, 2017

@misery
Thanks for the response.

Also build output is showing just:
-- CMAKE_BUILD_TYPE: DEBUG
the CMake's Visual Studio Generators will generate the four standard profiles (Debug, RelWithDebInfo, MinSizeRel and Release) and build for release is running fine. This is different for commandline generators like nmake or make just creating a single configuration as you mentioned.

With remaining issues I meant that there are some issues in building the tests, see e.g.:

C:\projects\ausweisapp2_build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\projects\ausweisapp2_build\test\qt\Test_settings_RemoteReaderSettings.vcxproj" (default target) (301) ->
C:\projects\ausweisapp2\test\qt\settings\test_RemoteReaderSettings.cpp(24): error C2039: 'mTestDir': is not a member of 'governikus::AbstractSettings' [C:\projects\ausweisapp2_build\test\qt\Test_settings_RemoteReaderSettings.vcxproj]
C:\projects\ausweisapp2\test\qt\settings\test_RemoteReaderSettings.cpp(24): error C2065: 'mTestDir': undeclared identifier [C:\projects\ausweisapp2_build\test\qt\Test_settings_RemoteReaderSettings.vcxproj]
C:\projects\ausweisapp2\test\qt\settings\test_RemoteReaderSettings.cpp(24): error C2228: left of '.clear' must have class/struct/union [C:\projects\ausweisapp2_build\test\qt\Test_settings_RemoteReaderSettings.vcxproj]

, better visible at https://ci.appveyor.com/project/chcg/ausweisapp2/build/1.12.2.14/job/46cra0gk544pairn/messages

maybe that is also covered by some patch.

@misery
Copy link
Contributor

misery commented Sep 27, 2017

Yes, cmake generates a multi configuration project for Visual Studio. But we do not support a multi configuration at the moment.

You are using "Configuration: Release" in your build. You need to tell that to cmake configure, too. Thats why it says "CMAKE_BUILD_TYPE: DEBUG".

appveyor.yml Outdated
- cd _build

- ps: |
cmake -G "$generator" -T "$env:PLATFORMTOOLSET" ..
Copy link
Contributor

Choose a reason for hiding this comment

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

Add -DCMAKE_BUILD_TYPE=$env:CONFIGURATION here.

Copy link
Contributor Author

@chcg chcg Oct 8, 2017

Choose a reason for hiding this comment

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

Updated the PR with the requested change.
See https://ci.appveyor.com/project/chcg/ausweisapp2/build/1.12.4.23

@chcg
Copy link
Contributor Author

chcg commented Dec 20, 2017

See chcg@0bfee89 for the necessary adaptations to build with new version 1.14.0.

Is the modification of the cmake script an viable option?

Build result:
https://ci.appveyor.com/project/chcg/ausweisapp2

@misery
Copy link
Contributor

misery commented Dec 21, 2017

Modification of the sources/scripts would be ok. But this change would allow compilation only. If you ran an authentication of this build it would not connect to the eID-server as the original OpenSSL 1.0.2 does not contain RSA-PSK cipher suites.
I would recommend to use Qt 5.10 and OpenSSL 1.1.0 here. Is it possible with Appveyor already?

Could you enable the debug build and run "ctest" for the unit tests, too? That should show the OpenSSL problem.

@chcg
Copy link
Contributor Author

chcg commented Dec 22, 2017

Yes, this provides just a check of the compilation. See https://www.appveyor.com/docs/build-environment/#pre-installed-software, current appveyor images contain QT 5.9.2 and OpenSSL 1.0.2L for a fast result. Otherwise these two projects need to be also build and that would probably result in a hugh build time with the current free of charge access to appveyor.

See https://ci.appveyor.com/project/chcg/ausweisapp2/build/1.14.0.31 for the debug builds., appveyor.yml contains already the option for debug builds, it was just commented out.

See https://ci.appveyor.com/project/chcg/ausweisapp2/build/1.14.0.35 for a build with ctest run. Unfortunately all tests are failing.

@misery
Copy link
Contributor

misery commented Dec 22, 2017

Thanks... looks like appveyor needs Qt env variables. This should fix the test run.

set QT_PLUGIN_PATH=C:/Qt/5.9.2/msvc2015_64/plugins
set QML2_IMPORT_PATH=C:/Qt/5.9.2/msvc2015_64/qml

@chcg
Copy link
Contributor Author

chcg commented Dec 23, 2017

Corrected by adding C:/Qt/5.9.2/msvc2015_64/bin to the path as the test runners rely on some Qt dlls, see https://ci.appveyor.com/project/chcg/ausweisapp2/build/1.14.0.41 with

The following tests FAILED:
	  3 - Test_activation_webservice_Template (Failed)
	  4 - Test_activation_webservice_WebserviceActivationHandler (Failed)
	 54 - Test_configuration_ProviderConfiguration (Failed)
	 55 - Test_configuration_ProviderConfigurationParser (Failed)
	 56 - Test_configuration_ReaderConfiguration (Failed)
	 83 - Test_core_states_StatePreVerification (Failed)
	 88 - Test_core_CertificateChecker (Failed)
	 91 - Test_drivers_ReaderDetector (Failed)
	101 - Test_global_FileDestination (Failed)
	107 - Test_global_ResourceLoader (Failed)
	130 - Test_network_NetworkManager (Failed)
	131 - Test_network_TlsChecker (Failed)
	135 - Test_remote_device_RemoteConnector (Failed)
	144 - Test_remote_device_RemoteTlsServer (Failed)
	145 - Test_remote_device_RemoteWebSocketServer (Failed)
	147 - Test_securestorage_SecureStorage (Failed)
	149 - Test_services_AppUpdatr (Failed)
	158 - Test_widget_ReaderDriverModel (Failed)
Errors while running CTest
Command exited with code 8

@misery
Copy link
Contributor

misery commented Dec 30, 2017

Thanks! I will look into it soon.
Maybe we should merge release job first and use another pull request for the debug one. ;-)
So I can add appveyor to the github services.

@chcg
Copy link
Contributor Author

chcg commented Dec 30, 2017

@misery Sounds reasonable to have a starting point for further development. See #7.

@chcg chcg closed this Dec 30, 2017
@chcg chcg deleted the appveyor2 branch December 4, 2020 15:17
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.

3 participants