qwertycoin-org / qwertycoin-zero

Qwertycoin Lite GUI wallet source code repository.
https://releases.qwertycoin.org
MIT License
6 stars 5 forks source link

Deployment automation (Linux deb/rpm, macOS dmg, Windows NSIS) #12

Closed speqtr closed 5 years ago

speqtr commented 5 years ago

!WARNING! Don't merge! I'm going to push all the changes one by one in order to make sure that none of them will break AppVeyor or Travis CI.

This PR automates deployment process for qwertycoin-zero project:

speqtr commented 5 years ago

@exploshot @nnian @Xecute0101 The following archive contains deb and rpm packages for Linux, dmg for macOS and NSIS installer for Windows. Please, install those packages on clean VMs and try to run them. If you get any errors or questions, please, share them in this PR.

qwertycoin-zero-v1.1.4.zip

NOTE: Linux packages (deb and rpm) may ask you to manually install Qt5. This is OK for the current version and will be fixed in one of the next commits.

NOTE2: Windows and macOS version should run without asking you for any third-party software.

speqtr commented 5 years ago

@exploshot @nnian @Xecute0101 once I get confirmation from you that all the packages are installing and working properly on clean VMs (especially macOS and Windows) then I'll modify AppVeyor and Travis CI configurations to deploy packages every time new tag is pushed to qwertycoin-zero repo.

exploshot commented 5 years ago
dpkg -i qwertycoin-zero-v1.1.4-linux.deb
dpkg: error processing archive qwertycoin-zero-v1.1.4-linux.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'qwertycoin-zero':
 'Depends' field, syntax error after reference to package 'qt5-qtbase'
Errors were encountered while processing:
 qwertycoin-zero-v1.1.4-linux.deb

thats what im getting on Ubuntu 18.04

the other are working smooth. I'll test RPM later this day.

speqtr commented 5 years ago

@exploshot thanks for your feedback. I'll check deb and rpm packages later today.

nnian commented 5 years ago

I'm on vacation for the next few days. ExploShot will take care of answering any questions and merging this PR. But it looks good. Does the rpm, deb, dmg, exe include the language files?

speqtr commented 5 years ago

Does the rpm, deb, dmg, exe include the language files?

dmg and exe yes, deb and rpm will include language files starting from one of the next commits.

speqtr commented 5 years ago

@exploshot Updated version of deb package for Linux is available. Please, test it. And if you run into any errors, please, share them in this PR.

qwertycoin-zero-20190722.zip

With this update you should be able to install deb and run /opt/qwertycoin/bin/Qwertycoin from terminal (third-party software installations are not required). Please, before installation don't forget to remove previous version (run sudo dpkg -r qwertycoin-zero in order to delete old package).

exploshot commented 5 years ago

After successful installation i get this error:

Segmentation fault (core dumped)

This happens directly after starting it. As root or not.

speqtr commented 5 years ago

Hmmm... and I get the running application. OK, I'll do some more testing and upload new version for Linux tomorrow.

Xecute0101 commented 5 years ago

Any update on this issue?

speqtr commented 5 years ago

@Xecute0101 Yes, I think I found an issue with Segmentation fault, right now testing it on different clean Linux installations. Once finished, I'll push one final commit for this PR (with Linux deployment script).

nnian commented 5 years ago

Default installation path on windows is C:\Program Files\Qwertycoin is it possible to change that to QwertycoinZero? Because may user want to use both (gui or zero) in the future or the cli version.

Qwertycoin (the cli version) QwertycoinZero QwertycoinGUI

what do you think?

And i don't know the default path on linux or macOS but i think it's bette to set a Zero related program folder.

And we need new wallets before network height 400,000 so that users can update in time

speqtr commented 5 years ago

@nnian Yes, sure. We can (and should) change installation paths. Right now I'm fixing bugs for Linux distribution package in order to provide release package as soon as possible (macOS and Windows are already working smooth).

After Linux distributions is fixed, I'll update the installation paths:

speqtr commented 5 years ago

I'm plannig to fix all by Tuesday (July 30) and release packages for Linux, macOS, Windows.

speqtr commented 5 years ago

The following archive contains fixed .deb package for Linux:

qwertycoin-zero-v1.1.4-linux.zip

NOTE: This updated package will be installed to /opt/qwertycoin-zero and can be started by running /opt/qwertycoin-zero/bin/qwertycoin-zero.

@exploshot @nnian @Xecute0101 Please, test it and confirm that it works on your systems.

I tested it on numerous different clean Linux VMs and it worked without any errors.

exploshot commented 5 years ago

The following archive contains fixed .deb package for Linux:

qwertycoin-zero-v1.1.4-linux.zip

NOTE: This updated package will be installed to /opt/qwertycoin-zero and can be started by running /opt/qwertycoin-zero/bin/qwertycoin-zero.

@exploshot @nnian @Xecute0101 Please, test it and confirm that it works on your systems.

I tested it on numerous different clean Linux VMs and it worked without any errors.

Runs on Ubuntu 18.04 without Problems, just small cosmetic mistakes like no Icon and no Start menu shortcut.

speqtr commented 5 years ago

UPDATE: I finally fixed all Linux related errors. Tomorrow will upload clean version of all the necessary changes.

speqtr commented 5 years ago

@nnian latest changes in this PR are rebased on top of qwertycoin-org/qwertycoin-zero/master, so AppVeyor error "AppVeyor was unable to build non-mergeable pull request" looks like a bug.

UPDATE: I triggered new build by pushing new commit and it looks like AppVeyor CI runs without any errors now.

nnian commented 5 years ago

That looks really beautiful. Good work man!

A basic question about creating the deb, rpm, exe and dmg. These are now created by Travis and AppVeyor. Do we have to download them , create a new Github Release and upload it again? @exploshot Even that would be a huge advantage in the future. The previous builds, compilation times, and archive that cost hours in the past for all platforms. Or are you planning to automate it even more?

exploshot commented 5 years ago

@speqtr could that be the solution?

deploy:
    provider: releases
    api_key:
        secure: <nice_api_key>
    file_glob: true
    file: /home/travis/build/qwertycoin-org/qwertycoin-zero/build/dist/*
    skip_cleanup: true
    on:
        tags: true
Xecute0101 commented 5 years ago

Will this PR resolve all the issues open for zero wallet?

nnian commented 5 years ago

Will this PR resolve all the issues open for zero wallet?

Yes all issues will be solved.

speqtr commented 5 years ago

@speqtr could that be the solution?

Yes, I'll push similar config to this repo later today. After that all the packages will be uploaded to GitHub automatically from CI servers. By pushing new tag to master branch it will be possible to trigger CI and create new release.

speqtr commented 5 years ago

@nnian I recently pushed drafts of deployment settings for AppVeyor and Travis CI. The following steps should be done next:

  1. wait until CI builds are green;
  2. merge this PR;
  3. in .travis.yml replace YOUR_API_KEY_ENCRYPTED with actual encrypted GitHub token;
  4. in .appveyor.yml replace encrypted_github_token with actual encrypted GitHub token;
  5. commit and push this changes to qwertycoin-org/qwertycoin-zero/master;
  6. push new tag to master and check that all packages are deployed properly from CI (if successfull then "release draft" should be automatically created in this repo on GitHub by CI builds).

NOTE: Please, post comments and questions in this PR in case something goes wrong while following the above steps.

nnian commented 5 years ago

@speqtr It should be the Deploy keys Section right? I never used any of these Keys before. Or is it a personal github Token? I made to you to an Admin of this Zero Repo. Maybe you will find this key faster than me. (On my mobile device)

based on https://github.com/release-it/release-it/blob/master/docs/github-releases.md i tried it maybe it's the right thing

speqtr commented 5 years ago

@nnian If you have Tavis CI command line tool then you can simply run travis setup releases and it will generate envrypted oauth token for you.

speqtr commented 5 years ago

AppVeyor docs:

GitHub authentication token (auth_token) - OAuth token used for authentication against GitHub API. You can generate Personal API access token at https://github.com/settings/tokens. Minimal token scope is repo or public_repo to release on private or public repositories respectively. Be sure to encrypt your token using “Encrypt configuration data” page in AppVeyor (Settings → Encrypt YAML).

nnian commented 5 years ago

Hm, i don't have this Tool. May i give you my Personal API access token and you will create the encryption and add this to the CI Setup?

nnian commented 5 years ago

@exploshot do you have time to setup this Tokens?

speqtr commented 5 years ago

Hm, i don't have this Tool. May i give you my Personal API access token and you will create the encryption and add this to the CI Setup?

You should be able to do this without travis tool. In this case it should be done manually from your GitHub account and encrypted on Travis CI.

@nnian Those tokens in main branch, are they encrypted? If not, please remove them.

speqtr commented 5 years ago

@speqtr It should be the Deploy keys Section right?

No. Deploy keys are used by custom CI servers to get access to private repos and clone sources. They don't work for deployment (GitHub Releases).

nnian commented 5 years ago
Error creating GitHub release: Provider setting not found or it's value is empty. If secure setting is used please check that value was encrypted (or YAML was exported) while being logged under correct account.
Parameter name: auth_token

https://ci.appveyor.com/project/Qwertycoin/qwertycoin-zero/branch/master/job/q0wpdf1me042w5go

exploshot commented 5 years ago

@nnian i've updated the auth_token for AppVeyor, maybe the error was because i used the Travis Token

nnian commented 5 years ago

@speqtr i've tried the zero Windows Installer and the Default Installation Path is still

C:\Program Files\Qwertycoin is this a bug?

speqtr commented 5 years ago

@nnian I'll push new commit with fixed default path later today.

nnian commented 5 years ago

I see @exploshot has already solved it (https://github.com/qwertycoin-org/qwertycoin-zero/commit/3d57592b7140a24b11a0b8c937266afe3a0d65e6)