Skip to content

Commit

Permalink
Fix and simplify VTests
Browse files Browse the repository at this point in the history
The problem: since 8c06059#diff-f252e90b5a122a709338e9b2cee849e924dde1962532d6e264600ebdcab7e1ab, libopengl0 is no longer installed, because that should now be packaged as a fallback library in the AppImage.

It turned out that the VTests use not an AppImage, but an extracted version of it. There is no good reason for that at the moment. It looks like such reason might have existed initially, when the script was added in https://github.com/musescore/MuseScore/pull/16769/files#diff-4e166fe9387c02737f74001790f7af08bc58111d5bef2ebcc73d0988f8e5b693, namely that the `offscreen` platform plugin had to be added. But now that is packaged with the AppImage by default, so there is no reason anymore to unpack the AppImage.
  • Loading branch information
cbjeukendrup committed Oct 5, 2024
1 parent 5890de8 commit b6cfbab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
name: "Build current"
runs-on: ubuntu-20.04
needs: setup
if: needs.setup.outputs.do_run == 'true' # Can't use env: see https://github.com/actions/runner/issues/480
if: needs.setup.outputs.do_run == 'true'
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
path: ./musescore_reference
- name: Generate PNGs
run: |
xvfb-run ./buildscripts/ci/vtests/generate_pngs.sh
bash ./buildscripts/ci/vtests/generate_pngs.sh
env:
ASAN_OPTIONS: "detect_leaks=0"
- name: Compare PNGs
Expand Down
31 changes: 1 addition & 30 deletions buildscripts/ci/vtests/build_and_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,9 @@ bash ./buildscripts/ci/tools/make_branch_env.sh

# =========== Pack ==========================

# Constants
HERE="$(cd "$(dirname "$0")" && pwd)"
ORIGIN_DIR=${PWD}

INSTALL_DIR="$(cat $BUILD_DIR/PREFIX.txt)" # MuseScore was installed here
APP_IMAGE_NAME=MuseScoreTemporary
ARTIFACT_NAME=app
APP_IMAGE_NAME=MuseScore-Studio-vtest

# Make AppImage
bash ./buildscripts/ci/linux/tools/make_appimage.sh "${INSTALL_DIR}" "${APP_IMAGE_NAME}.AppImage"
mv "${INSTALL_DIR}/../${APP_IMAGE_NAME}.AppImage" "${ARTIFACTS_DIR}/"

cd $ARTIFACTS_DIR

# Unpack AppImage
APP_DIR="./$ARTIFACT_NAME"
rm -rf "$APP_DIR"
rm -rf squashfs-root
chmod +x "${APP_IMAGE_NAME}.AppImage"
"./${APP_IMAGE_NAME}.AppImage" --appimage-extract

mv squashfs-root "$APP_DIR"

# Add run file
cp $HERE/run.in $APP_DIR/run
chmod 775 $APP_DIR/run

# # Pack to 7z
# 7z a "$ARTIFACT_NAME.7z" "$APP_DIR/*"
# chmod a+rw "$ARTIFACT_NAME.7z"

# Clean up
rm -f "${APP_IMAGE_NAME}.AppImage"

cd $ORIGIN_DIR
13 changes: 6 additions & 7 deletions buildscripts/ci/vtests/generate_pngs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@

trap 'echo Generate PNGs failed; exit 1' ERR

REF_BIN=./musescore_reference/app/bin/mscore4portable
CUR_BIN=./musescore_current/app/bin/mscore4portable

sudo apt-get install libegl1 -y
export QT_QPA_PLATFORM=offscreen

REF_BIN=./musescore_reference/MuseScore-Studio-vtest.AppImage
chmod +x $REF_BIN
# chmod +x ./musescore_reference/app/bin/crashpad_handler

chmod +x $CUR_BIN
# chmod +x ./musescore_current/app/bin/crashpad_handler

echo reference version:
$REF_BIN --long-version

CUR_BIN=./musescore_current/MuseScore-Studio-vtest.AppImage
chmod +x $CUR_BIN

echo current version:
$CUR_BIN --long-version

Expand Down

0 comments on commit b6cfbab

Please sign in to comment.