Skip to content

Commit

Permalink
Merge pull request #25053 from cbjeukendrup/fix_vtest
Browse files Browse the repository at this point in the history
Fix and simplify VTests
  • Loading branch information
cbjeukendrup authored Oct 5, 2024
2 parents 5890de8 + b6cfbab commit e10f78c
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 e10f78c

Please sign in to comment.