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

Integrate with Travis and Appveyor for automated builds #11

Open
virresh opened this issue Oct 15, 2020 · 7 comments
Open

Integrate with Travis and Appveyor for automated builds #11

virresh opened this issue Oct 15, 2020 · 7 comments
Labels

Comments

@virresh
Copy link
Owner

virresh commented Oct 15, 2020

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
Copy link

EEM86 commented Oct 30, 2020

@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
Copy link
Owner Author

virresh commented Oct 30, 2020 via email

@EEM86
Copy link

EEM86 commented Nov 22, 2020

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
Copy link
Owner Author

virresh commented Nov 24, 2020

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
Copy link

EEM86 commented Nov 24, 2020

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

🤷

@virresh
Copy link
Owner Author

virresh commented Nov 25, 2020

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
Copy link

EEM86 commented Nov 26, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants