-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set up continuous integration #20
Conversation
I have no idea how to do that. Any usefull link or ressource? |
appveyor.yml
Outdated
- cmd: "7z a zubax-kucher.7z *" | ||
- sh: "7z a zubax-kucher.7z * &>/dev/null &" | ||
- "appveyor PushArtifact zubax-kucher.7z" | ||
- "pyinstaller pyinstaller.spec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invoking PyInstaller directly is not quite correct. On GNU/Linux, we must use StaticX to produce a truly portable executable, as implemented in this build script: https://github.com/Zubax/kucher/blob/appveyor-CI/build_linux.sh. Running just PyInstaller is not sufficient since the resulting executable ends up being dependent on a particular version of libGL, which is disastrous for redistributable executables. So when building for GNU/Linux, invoke the above script. For consistency, I recommend defining an equivalent build script for Windows, despite the fact that no additional steps are needed there (yet).
Now, there was a problem with StaticX that I described here: JonathonReinhart/staticx#79. Jonathon said that I should look into the dependencies to try and find out which one pulls in the unnecessary stuff. Shortly after receiving that reply I realized that the problem might be with the PyQtGraph library, which is no longer needed anyway (see #21). I suggest to remove PyQtGraph and then see if StaticX is able to link a portable executable.
@loicgilbert I'm going to pull this into a separate issue. No need to fix this in this PR. |
To summarize, what's left here is:
If the last one can't be fixed easily, we could comment out the staticx part temporarily and fix it in a separate pr later. |
Install pyqt 5.12.2 instead of 5.12.3, causing errors when running executable (see github issue).
Okay, almost done here. Having StaticX like this is not the best idea since it clutters our repo with a third-party codebase. What I meant when I said that we should fork it is that there should be a separate repository under the Zubax org which is a fork of StaticX; the fork can be created by clicking the aptly named button "Fork" in the upper-right side of the StaticX's GitHub page. GitHub will ask you where you want it forked, pick "Zubax" (I believe you have the necessary permissions for that). Then apply our patch there and add the patched repo as a submodule under |
Please also drop the PyQtGraph submodule from |
build_linux.sh
Outdated
|
||
pyinstaller --clean --noconfirm pyinstaller.spec || exit 2 | ||
cd kucher/libraries/staticx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd kucher/libraries/staticx | |
pushd kucher/libraries/staticx |
build_linux.sh
Outdated
|
||
# https://github.com/JonathonReinhart/staticx/issues/79 | ||
cd dist | ||
cd ../../../dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd ../../../dist | |
popd | |
pushd dist |
build_linux.sh
Outdated
mv Kucher Kucher.tmp | ||
staticx --loglevel DEBUG Kucher.tmp Kucher | ||
|
||
rm -rf *.tmp | ||
cd .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd .. | |
popd |
build_linux.sh
Outdated
@@ -4,12 +4,20 @@ | |||
# | |||
|
|||
sudo apt-get install patchelf -y | |||
sudo apt install gcc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo apt install gcc | |
sudo apt-get install -y gcc |
Missing -y
and changed apt to apt-get for consistency.
build_linux.sh
Outdated
@@ -4,12 +4,20 @@ | |||
# | |||
|
|||
sudo apt-get install patchelf -y | |||
sudo apt install gcc | |||
sudo apt-get install scons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo apt-get install scons | |
sudo apt-get install -y scons |
Built project on Linux and Windows, with python 3.6 and 3.7 on both using Appveyor.
(close #10, close#11 )