virresh / StockD

EOD Stock data downloader.
https://virresh.github.io/projects/stockd
GNU General Public License v2.0
11 stars 4 forks source link

Integrate with Travis and Appveyor for automated builds #11

Open virresh opened 3 years ago

virresh commented 3 years ago

Need integration with Travis (for linux and maybe macOS builds) and Appveyor for Windows 32-bit builds. Travis Docs: https://docs.travis-ci.com/user/tutorial/ Appveyor Docs: https://www.appveyor.com/docs/windows-images-software/

Kindly implement it on a fork and send a pull request with links to the builds if someone is attempting this

Benefits -- We will get a preview-release for every push to master. And no need to manually build on every full release

EEM86 commented 3 years ago

@virresh hello, I can add Appveyor. I want to clarify, do you expect only property file .appveyor.yml? Will you create an account in https://www.appveyor.com/ by yourself?

virresh commented 3 years ago

Yep I'll link the master branch with appveyor

Just need to know if Appveyor can create a 32 bit windows exe

So need to see the .appveyor.yml working on someone's fork and pushing binaries to github releases

On Fri, Oct 30, 2020, 19:29 Yevhen Yermolenko notifications@github.com wrote:

@virresh https://github.com/virresh hello, I can add Appveyor. I want to clarify, do you expect only property file .appveyor.yml? Will you create an account in https://www.appveyor.com/ by yourself?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/virresh/StockD/issues/11#issuecomment-719568451, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTYGPAFQNODWY2ORRVQSNTSNLBDHANCNFSM4SSJUYUA .

EEM86 commented 3 years ago

Yep I'll link the master branch with appveyor Just need to know if Appveyor can create a 32 bit windows exe So need to see the .appveyor.yml working on someone's fork and pushing binaries to github releases

Sorry, I've tried but haven't succeed. I hope these links should be helpful for the next participant: https://packaging.python.org/guides/supporting-windows-using-appveyor/ https://www.dynamsoft.com/codepool/appveyor-build-deploy-python-wheels.html https://www.tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/ https://www.appveyor.com/docs/lang/python/

virresh commented 3 years ago

oh ok Thanks for the links!

Also if you're still interested in this, I'll be glad to provide any reviews / feedback on your attempt

EEM86 commented 3 years ago

Thank you) I've started with tutorials and couldn't configure correctly. My builds were failing. I tried to launch with a small part of the code but the build also failed due to importError. I thought that Python environment was preinstalled after it was described in .yml file. I haven't yet tried to add imports by myself because I have confused while reading examples and threw in the towel. My final config was:

environment:
    matrix:
        - PYTHON: "C:\\Python27" // I thought environment should be installed after this setting
        - PYTHON: "C:\\Python33"
        - PYTHON: "C:\\Python34"
        - PYTHON: "C:\\Python35"
platform:
    - x86 // here I thought the build would be launched on windows 32
build_script:
    python .\python_client\runner.py

AppVeyour build results:

Build started
git clone -q --branch=master https://github.com/EEM86/StockD.git C:\projects\stockd
git checkout -qf 3d734a4a971493471d6071934349ff156da3c944
python .\python_client\runner.py
Traceback (most recent call last):
  File ".\python_client\runner.py", line 2, in <module>
    import webview
ImportError: No module named webview
Command exited with code 1

:shrug:

virresh commented 3 years ago

Oh, I see the issue The appveyor.yml is fine uptil the build_script point

Essentially, runner.py is the runtime code, not the build time code. It works if you try running the software from python interpreter locally, but here our aim is to create an executable out of it

Steps for building an exe for windows are documented here: https://github.com/virresh/StockD/blob/master/python_client/scripts/windowsPackage.txt

I've just thrown them in, but all required statements should be there. These would need to be put in the build step [except that the first command probably needs to be the last command], and since I was doing it on a local VM, I used python environments. On appveyor, we should just be able to call the executable like python -m pip and python -m pyinstaller

EEM86 commented 3 years ago

Thank you for your explanations. Faced some new issues with pip, only Flask was installed successfully. I'll try more on weekend.