Skip to content

Add armv7 build #136

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

Merged
merged 1 commit into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 74 additions & 9 deletions .github/workflows/wkdev-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ jobs:
echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}"
fi
echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}"
echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}"

- name: Install podman
run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs

- name: Checkout repo
uses: actions/checkout@v4

- name: Clean unrelated images
run: |
podman rmi --ignore --force ${REPO}:latest
podman manifest rm ${REPO}:latest || true
podman rmi --ignore --force ${REPO}:latest_amd64

- name: Build image
run: |
source ./register-sdk-on-host.sh
Expand All @@ -48,8 +55,7 @@ jobs:
wkdev-enter -n ${CONTAINER} --exec -- git clone --depth=1 https://github.com/WebKit/WebKit.git
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --wpe --release --generate-project-only
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --gtk --release --generate-project-only
podman stop ${CONTAINER} || true
podman rm ${CONTAINER} || true
podman rm --force ${CONTAINER}
rm -rf ${HOME}/${CONTAINER}-home

build_arm64:
Expand All @@ -61,13 +67,20 @@ jobs:
echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}"
fi
echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}"
echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}"

- name: Install podman
run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs

- name: Checkout repo
uses: actions/checkout@v4

- name: Clean unrelated images
run: |
podman rmi --ignore --force ${REPO}:latest
podman manifest rm ${REPO}:latest || true
podman rmi --ignore --force ${REPO}:latest_amd64

- name: Build image
run: |
source ./register-sdk-on-host.sh
Expand All @@ -90,13 +103,60 @@ jobs:
wkdev-enter -n ${CONTAINER} --exec -- git clone --depth=1 https://github.com/WebKit/WebKit.git
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --wpe --release --generate-project-only
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --gtk --release --generate-project-only
podman stop ${CONTAINER} || true
podman rm ${CONTAINER} || true
podman rm --force ${CONTAINER}
rm -rf ${HOME}/${CONTAINER}-home

build_armv7:
runs-on: arm-bothost-2
steps:
- name: Set tag name
run: |
if [ "${GITHUB_BASE_REF}" = 'main' ]; then
echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}"
fi
echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}"
echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}"

- name: Install podman
run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs

- name: Checkout repo
uses: actions/checkout@v4

- name: Clean unrelated images
run: |
podman rmi --ignore --force ${REPO}:latest
podman manifest rm ${REPO}:latest || true
podman rmi --ignore --force ${REPO}:latest_amd64

- name: Build image
run: |
source ./register-sdk-on-host.sh
wkdev-sdk-bakery --mode=build --verbose --arch arm
podman image list
wkdev-sdk-bakery --mode=export --verbose --arch arm

- name: Archive image
uses: actions/upload-artifact@v4
with:
name: wkdev-sdk-arm.tar
path: wkdev-sdk-arm.tar
retention-days: 7

- name: Test image
run: |
CONTAINER="wkdev-$(date +%s)"
source ./register-sdk-on-host.sh
wkdev-create --create-home --home ${HOME}/${CONTAINER}-home --verbose --attach --no-pull --name ${CONTAINER} --arch arm --shell /bin/bash
wkdev-enter -n ${CONTAINER} --exec -- git clone --depth=1 https://github.com/WebKit/WebKit.git
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --wpe --release --generate-project-only
wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --gtk --release --generate-project-only
podman rm --force ${CONTAINER}
rm -rf ${HOME}/${CONTAINER}-home

deploy:
runs-on: [self-hosted, x64]
needs: [build_amd64, build_arm64]
needs: [build_amd64, build_armv7, build_arm64]
if: github.ref_name == 'main' || startsWith(github.ref_name, 'tag/')
steps:
- name: Set tag name
Expand All @@ -120,14 +180,19 @@ jobs:
merge-multiple: true
- run: ls -al

- name: Clean all previous images
run: |
podman rmi --ignore --force ${REPO}:latest
podman manifest rm ${REPO}:latest || true
podman rmi --ignore --force ${REPO}:latest_arm64
podman rmi --ignore --force ${REPO}:latest_amd64
podman rmi --ignore --force ${REPO}:latest_arm

- name: Deploy image
run: |
podman rmi -f wkdev-sdk:latest || true
podman manifest rm wkdev-sdk:latest || true
podman rmi -f wkdev-sdk:latest_amd64 || true
podman rmi -f wkdev-sdk:latest_arm64 || true
podman load < ./wkdev-sdk-amd64.tar
podman load < ./wkdev-sdk-arm64.tar
podman load < ./wkdev-sdk-arm.tar
podman image list
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io --username=${GITHUB_REPOSITORY_OWNER} --password-stdin
source ./register-sdk-on-host.sh
Expand Down
2 changes: 1 addition & 1 deletion images/wkdev_sdk/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ COPY /required_system_packages/*.lst .
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources && \
${APT_UPDATE} && \
for list in *.lst; do \
${APT_INSTALL} $(sed -e "s/.*#.*//; /^$/d" "${list}"); \
${APT_INSTALL} $(sed -e "s/.*#.*//; /^$/d" "${list}" | tr '\n' ' '); \
done; \
${APT_BUILDDEP} gst-libav1.0 gst-plugins-bad1.0 gst-plugins-base1.0 \
gst-plugins-good1.0 gst-plugins-ugly1.0 && \
Expand Down
2 changes: 1 addition & 1 deletion images/wkdev_sdk/required_system_packages/04-devtools.lst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-essential cmake ninja-build
ccache

# Debugging / profiling / tracing
valgrind rr perf-tools-unstable systemd-coredump
valgrind perf-tools-unstable systemd-coredump

# Documentation
asciidoc doxygen doxygen-latex doxygen-doxyparse graphviz python3-sphinx devhelp libglib2.0-doc libgtk-4-doc libsoup-3.0-doc
Expand Down
3 changes: 3 additions & 0 deletions images/wkdev_sdk/required_system_packages/06-devtools-opt.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are not available on all platforms

rr
16 changes: 8 additions & 8 deletions scripts/host-only/wkdev-sdk-bakery
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ build_image() {

tag="$(get_tag_for_build)"

if argsparse_is_option_set "arch"; then
container_arch="${program_options["arch"]}"
echo "Overriding container architecture: ${container_arch}"
podman_argument+=("--arch=${container_arch}")

tag="${tag}_${container_arch}"
fi

_log_ ""
_log_ "-> Building container image '${container_image_name}' using tag '${tag}'..."
_log_ ""
Expand All @@ -73,6 +65,14 @@ build_image() {
timer_start

local podman_argument=("--jobs" "$(get_number_of_cores_for_build)")

if argsparse_is_option_set "arch"; then
container_arch="${program_options["arch"]}"
echo "Overriding container architecture: ${container_arch}"
podman_argument+=("--arch=${container_arch}")

tag="${tag}_${container_arch}"
fi
podman_argument+=("--tag" "${tag}")

for environment_variable in "${cumulated_values_env[@]}"
Expand Down
1 change: 1 addition & 0 deletions utilities/application.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ run_command_silent_unless_verbose() {
shift

if argsparse_is_option_set "verbose"; then
echo "${command}" "${@}"
"${command}" "${@}"
else
"${command}" "${@}" &>/dev/null
Expand Down