-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Draft: Issue #469 ARM workflows #582
Conversation
.github/workflows/linux-raspbian.yml
Outdated
include: | ||
- dockerimg: ubuntu:focal | ||
compiler: gcc | ||
upload: 1 |
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.
upload: 1
should be upload: 0
for now, so it does not collide with x86 desktop builds.
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.
I had debated on making a mac_arm.yml action. Do you think this would be better?
oops. Wrong file. I’ll look when I get home.
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.
For me, differencing raspbian from other distros is ok, but for Mac is the same OS but with different architectures, IMO is ok to be in the same file, as for example in the case of the MSYS build.
.github/workflows/linux-raspbian.yml
Outdated
echo Install dependencies | ||
echo | ||
chmod +x ports/ci/linux-ubuntu/install_deps.sh | ||
./ports/ci/linux-ubuntu/install_deps.sh |
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.
You must create a new ./ports/ci/linux-raspbian
directory with the scripts there.
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.
Done
First make those changes, maybe other changes will be needed later. |
Also, the DeployTools will need some adjustments to properly detect arm64 architecture instead of x86_64.
But in general, nice work 👍 |
I noticed some warnings during the process, suggesting some of the actions need updating to more recent versions. Probably best deal with this in a separate issue? |
- uses: pguyot/arm-runner-action@v2 | ||
id: build_image | ||
with: | ||
base_image: raspios_lite:2022-04-04 |
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.
I was thinking, instead of using this image, I'm more in the side of using one of the official images, and Ubuntu already provide images for ARM and ARM64, and in the same was as the official Webcamoid releases are built using an Ubuntu image, and it works in Arch, Fedora, Debian, etc., if we build the binaries in Ubuntu ARM it should be able to work in Raspbian, Arch Linux ARM, or any other ARM based distro.
So the code above is not really necessary but instead you must configure docker to point to the ARM and ARM64 images, look at here for example (at What's in this image?), apparently images are indicated as ARCHITECTURE/ubuntu:latest
.
apt-get -y install software-properties-common | ||
add-apt-repository "ppa:beineri/opt-qt-${QTVER}-focal" | ||
add-apt-repository "ppa:pipewire-debian/pipewire-upstream" | ||
fi |
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.
I'm not sure and did not checked but pretty sure Beineri repositories does not have support for ARM, so instead of using Ubuntu Focal, upgrade it to the latest Ubuntu LTS version containing Qt 5.15, and you can remove this code.
cp -rvf ~/QtIFW/* . | ||
cd .. | ||
fi | ||
|
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.
QtIFW does not have ARM images so this code can be removed for now.
|
||
# Install AppImageTool | ||
|
||
appimage=appimagetool-x86_64.AppImage |
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.
AppImage has ARM images so use armhf or aarch64 depending on the case.
"qt${PPAQTVER}declarative" \ | ||
"qt${PPAQTVER}svg" \ | ||
"qt${PPAQTVER}quickcontrols2" \ | ||
"qt${PPAQTVER}wayland" |
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.
This part can be removed because we won't use Beineri repositories here.
if [ "${DOCKERIMG}" = ubuntu:focal ]; then | ||
cat << EOF > package_info_libdir.conf | ||
[System] | ||
libDir = /opt/qt${PPAQTVER}/lib |
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.
This can be removed too.
fi | ||
|
||
if [ "${DOCKERIMG}" = ubuntu:focal ]; then | ||
source "/opt/qt${PPAQTVER}/bin/qt${PPAQTVER}-env.sh" |
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.
This also can be removed.
-DCMAKE_C_COMPILER="${COMPILER_C}" \ | ||
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \ | ||
${EXTRA_PARAMS} \ | ||
-DGST_PLUGINS_SCANNER_PATH=/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner \ |
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.
This obviously won't work in ARM so the path must be changed.
Ok think those are the changes to be made for now.
Because of this?
I need to approve them before run, any I will update the workflows later before release, just focus on the workflows you are working now. |
Packages for ARM are now available. Packages for GNU/Linux arm32v7 and arm64v8webcamoid-portable-linux-daily-master-arm32.AppImage Packages for MacOs M1webcamoid-installer-mac-daily-master-arm64.pkg I couldn't create the Flatpak packages because flatpak-builder can't run in unprivileged containers, and installers are not available because QtIFW is only available for x86_64, but AppImage and tar.xz formats are more than enough. |
README
Before contributing, please read the contributing document, and the coding style and conventions guide.
Search the pull request list for similar pulls before opening a new one.
Check your code doesn't throw any warning or error message while compiling, and doesn't give any warning in Clang static analyzer. Make sure your code is GCC, Clang, MinGW and MSVC compliant (use AppVeyor and Github Actions for that).
Check your code using GDB, Valgrind and similar tools to remove all possible memory leaks and segfaults.
Pull request
Type of change
Is your pull request a bug fix, new feature, code refactor, breaking change, etc.?
If your change is too big consider discussing it before pulling.
Summary
Updating workflow for ARM machines. Mac & Raspberry Pi.
Just a draft for now and will likely split into two separate PRs.
Related Issue
Issue #469
More info
Provide screenshots, logs, etc. if required.
Added dependencies
Does your pull request add more dependencies to the project? This may require some discussion. Minimal dependencies is a requirement.
Target Environment
Is this pull request specific to a target operating system?