Skip to content

Commit

Permalink
build: fix deprecation warning when building appimage
Browse files Browse the repository at this point in the history
This patch fixes the deprecation warnings when building the appimage.
It does this by using out kdesrc-build docker image as a building step
instead of running the whole build in the container. This allows us to
still build on centos7 but use the newer node20 actions.
  • Loading branch information
lievenhey committed Apr 26, 2024
1 parent 623b247 commit e72bfe5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,25 @@ jobs:
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}

runs-on: ubuntu-latest
container:
image: ghcr.io/kdab/kdesrc-build

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Build
run: scripts/appimage/build_appimage.sh "$PWD" "$PWD/build"
uses: docker://ghcr.io/kdab/kdesrc-build:latest

- name: Upload AppImage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: appimage
path: /output/hotspot*.AppImage
path: ${{ github.workspace }}/*.AppImage

- name: Upload Debug Info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: debuginfo
path: /output/hotspot-debuginfo-*
path: ${{ github.workspace }}/hotspot-debuginfo-*
3 changes: 2 additions & 1 deletion scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@ RUN cd /opt && git clone --recursive https://github.com/KDAB/KDDockWidgets.git -
FROM intermediate

WORKDIR /
RUN mkdir /output
# set the entrypoint to the build script so that the build script will be run by github actions
CMD ["/github/workspace/scripts/appimage/build_appimage.sh", "/github/workspace", "/github/workspace/build"]
4 changes: 2 additions & 2 deletions scripts/appimage/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
make -j$(nproc)
DESTDIR=appdir make install

tar -cjvf "/output/hotspot-debuginfo-$gitversion-x86_64.tar.bz2" \
tar -cjvf "/github/workspace/hotspot-debuginfo-$gitversion-x86_64.tar.bz2" \
--transform="s#appdir/#hotspot-debuginfo-$gitversion/#" \
appdir/usr/bin/hotspot appdir/usr/lib64/libexec/hotspot-perfparser

Expand Down Expand Up @@ -74,4 +74,4 @@ linuxdeploy --appdir appdir --plugin qt \
-d "./appdir/usr/share/applications/com.kdab.hotspot.desktop" \
--output appimage

mv Hotspot*x86_64.AppImage "/output/hotspot-$gitversion-x86_64.AppImage"
mv Hotspot*x86_64.AppImage "/github/workspace/hotspot-$gitversion-x86_64.AppImage"
5 changes: 2 additions & 3 deletions scripts/appimage/build_appimage_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ cd "$(dirname $0)"
mkdir -p ../output/build-appimage

docker run -it \
-v $PWD/../output:/output \
-v $PWD/../../:/hotspot \
-v $PWD/../../:/github/workspace/ \
ghcr.io/kdab/kdesrc-build:latest \
/hotspot/scripts/appimage/build_appimage.sh /hotspot /output/build-appimage
/github/workspace/scripts/appimage/build_appimage.sh /github/workspace /github/workspace/build/build-appimage

0 comments on commit e72bfe5

Please sign in to comment.