Skip to content
Open
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
126 changes: 91 additions & 35 deletions .github/workflows/ci_vtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
echo "::set-output name=artifact_name::$UPLOAD_ARTIFACT_NAME"
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME"

build_current:
name: "Build current"
generate_current_pngs:
name: "Generate current PNGs"
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
Expand All @@ -79,17 +79,23 @@ jobs:
- name: Setup environment
run: |
bash ./build/ci/linux/setup.sh
- name: Build and Pack
- name: Build
run: |
bash ./build/ci/vtests/build_and_pack.sh
- name: Upload
source $HOME/build_tools/environment.sh
mkdir -p "$HOME/musescore_install"
bash ninja_build.sh -t clean
MUSESCORE_INSTALL_DIR="$HOME/musescore_install" bash ninja_build.sh -t installdebug
- name: Generate current PNGs
run: |
xvfb-run ./vtest/vtest-generate-pngs.sh -o ./current_pngs -m $HOME/musescore_install/bin/mscore
- name: Upload PNGs
uses: actions/upload-artifact@v3
with:
name: current_build
path: ./build.artifacts/
name: Current PNGs
path: ./current_pngs

build_reference:
name: "Build reference"
generate_reference_pngs:
name: "Generate reference PNGs"
runs-on: ubuntu-20.04
needs: setup
if: needs.setup.outputs.do_run == 'true'
Expand All @@ -110,36 +116,41 @@ jobs:
- name: Setup environment
run: |
bash ./build/ci/linux/setup.sh
- name: Build and Pack
- name: Build
run: |
source $HOME/build_tools/environment.sh
mkdir -p "$HOME/musescore_install"
bash ninja_build.sh -t clean
MUSESCORE_INSTALL_DIR="$HOME/musescore_install" bash ninja_build.sh -t installdebug
- name: Checkout current commit
uses: actions/checkout@v3
- name: Generate reference PNGs
run: |
bash ./build/ci/vtests/build_and_pack.sh
- name: Upload
xvfb-run ./vtest/vtest-generate-pngs.sh -o ./reference_pngs -m $HOME/musescore_install/bin/mscore
- name: Upload PNGs
uses: actions/upload-artifact@v3
with:
name: reference_build
path: ./build.artifacts/
name: Reference PNGs
path: ./reference_pngs

generate_and_compare:
name: "Generate and Compare"
compare_pngs:
name: "Compare PNGs"
runs-on: ubuntu-20.04
needs: [setup, build_current, build_reference]
needs: [setup, generate_current_pngs, generate_reference_pngs]
if: needs.setup.outputs.do_run == 'true'
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Download current
- name: Download current PNGs
uses: actions/download-artifact@v3
with:
name: current_build
path: ./musescore_current
- name: Download reference
name: Current PNGs
path: ./current_pngs
- name: Download reference PNGs
uses: actions/download-artifact@v3
with:
name: reference_build
path: ./musescore_reference
- name: Generate PNGs
run: |
xvfb-run ./build/ci/vtests/generate_pngs.sh
name: Reference PNGs
path: ./reference_pngs
- name: Compare PNGs
run: |
echo "VTEST_DIFF_FOUND=false" >> $GITHUB_ENV
Expand All @@ -150,14 +161,6 @@ jobs:
with:
name: ${{ needs.setup.outputs.artifact_name }}
path: ./comparison
- name: Generate ref drawdata
run: |
chmod +x ./musescore_reference/app/bin/mscore4portable
xvfb-run ./vtest/gen-ref-data.sh -m ./musescore_reference/app/bin/mscore4portable
- name: DrawData VTest
run: |
chmod +x ./musescore_current/app/bin/mscore4portable
xvfb-run ./vtest/vtest.sh -m ./musescore_current/app/bin/mscore4portable
- name: Skip failure signal if PR is labeled 'vtests'
if: github.event_name == 'pull_request' && contains( env.VTEST_DIFF_FOUND, 'true') && contains(github.event.pull_request.labels.*.name, 'vtests')
run: |
Expand All @@ -182,5 +185,58 @@ jobs:
[here][1]

[1]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}




# name: CI_vtests

# on:
# pull_request:
# branches:
# - master

# jobs:
# setup:
# name: "VTests workflow"
# runs-on: ubuntu-20.04
# steps:
# - name: Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
# with:
# access_token: ${{ github.token }}
# - name: Clone repository
# uses: actions/checkout@v3
# - name: "Configure workflow"
# env:
# pull_request_title: ${{ github.event.pull_request.title }}
# run: |
# bash ./build/ci/tools/make_build_number.sh
# BUILD_NUMBER=$(cat ./build.artifacts/env/build_number.env)

# ADD_INFO="_${GITHUB_REF#refs/heads/}"
# if [ "${{ github.event_name }}" == "pull_request" ]; then ADD_INFO="_${{ github.event.pull_request.number }}_${pull_request_title}"; fi
# UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\' '_' <<<"VTests_Comparison_${BUILD_NUMBER}_${ADD_INFO}")"

# echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
# echo "BUILD_NUMBER: $BUILD_NUMBER"
# echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" >> $GITHUB_ENV
# echo "UPLOAD_ARTIFACT_NAME: $UPLOAD_ARTIFACT_NAME"

# - name: Setup environment
# run: |
# bash ./build/ci/linux/setup.sh
# - name: Build
# run: |
# source $HOME/build_tools/environment.sh
# bash ./vtest/build.sh
# - name: Run test
# run: |
# bash ./vtest/vtest.sh
# - name: Upload comparison
# if: ${{ always() }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.UPLOAD_ARTIFACT_NAME }}
# path: ./vtest/temp_comparison
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ option(MUE_BUILD_CONVERTER_MODULE "Build converter module" ON)
option(MUE_BUILD_DIAGNOSTICS_MODULE "Build diagnostic code" ON)
option(MUE_BUILD_IMPORTEXPORT_MODULE "Build importexport module" ON)
option(MUE_BUILD_VIDEOEXPORT_MODULE "Build videoexport module" OFF)
option(MUE_BUILD_IMAGESEXPORT_MODULE "Build imagesexport module" ON)
option(MUE_BUILD_IMAGEEXPORT_MODULE "Build videoexport module" ON)
option(MUE_BUILD_INSPECTOR_MODULE "Build inspector module" ON)
option(MUE_BUILD_INSTRUMENTSSCENE_MODULE "Build instruments scene module" ON)
option(MUE_BUILD_LANGUAGES_MODULE "Build languages module" ON)
Expand All @@ -98,7 +98,6 @@ option(MUE_DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of
# === Pack ===
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
option(MUE_ENABLE_FILE_ASSOCIATION "File types association (using for package)" OFF)
option(MUE_INSTALL_SOUNDFONT "Install sound font" ON)

# === Tests ===
option(MUE_BUILD_UNIT_TESTS "Build unit tests" ON)
Expand Down
7 changes: 2 additions & 5 deletions SetupConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if(BUILD_CONFIGURE MATCHES "VTEST")
set(MUE_ENABLE_LOGGER_DEBUGLEVEL ON)
# set(MUE_BUILD_ASAN ON)

set(MUE_BUILD_IMAGESEXPORT_MODULE ON)
set(MUE_BUILD_IMAGEEXPORT_MODULE ON)
set(MUE_BUILD_CONVERTER_MODULE ON)
set(MUE_BUILD_PROJECT_MODULE ON)
set(MUE_BUILD_NOTATION_MODULE ON)
Expand Down Expand Up @@ -140,9 +140,6 @@ if(BUILD_CONFIGURE MATCHES "VTEST")

set(MUE_BUILD_IMPORTEXPORT_MODULE OFF)
set(MUE_BUILD_VIDEOEXPORT_MODULE OFF)

set(MUE_INSTALL_SOUNDFONT OFF)

endif()

###########################################
Expand Down Expand Up @@ -261,7 +258,7 @@ def_opt(MUE_BUILD_UPDATE_MODULE ${MUE_BUILD_UPDATE_MODULE})
def_opt(MUE_BUILD_WORKSPACE_MODULE ${MUE_BUILD_WORKSPACE_MODULE})
def_opt(MUE_BUILD_IMPORTEXPORT_MODULE ${MUE_BUILD_IMPORTEXPORT_MODULE})
def_opt(MUE_BUILD_VIDEOEXPORT_MODULE ${MUE_BUILD_VIDEOEXPORT_MODULE})
def_opt(MUE_BUILD_IMAGESEXPORT_MODULE ${MUE_BUILD_IMAGESEXPORT_MODULE})
def_opt(MUE_BUILD_IMAGEEXPORT_MODULE ${MUE_BUILD_IMAGEEXPORT_MODULE})


if (QT_SUPPORT)
Expand Down
1 change: 0 additions & 1 deletion build/ci/vtests/build_and_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ MUSESCORE_REVISION=$(git rev-parse --short=7 HEAD)
bash ninja_build.sh -t clean

MUSESCORE_BUILD_CONFIGURATION="vtest" \
MUSESCORE_REVISION=$MUSESCORE_REVISION \
bash ninja_build.sh -t appimage

bash ./build/ci/tools/make_release_channel_env.sh -c $BUILD_MODE
Expand Down
44 changes: 0 additions & 44 deletions build/ci/vtests/generate_pngs.sh

This file was deleted.

46 changes: 21 additions & 25 deletions share/sound/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,26 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

if (MUE_INSTALL_SOUNDFONT)
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/MS Basic.sf3")
install (FILES FluidR3Mono_GM.sf3
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
RENAME "MS Basic.sf3"
)
else ()
install(FILES
"MS Basic.sf3"
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
)
endif ()

if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/MS Basic.sf3")
install (FILES FluidR3Mono_GM.sf3
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
RENAME "MS Basic.sf3"
)
else ()
install(FILES
"MS Basic.sf3"
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
)
endif ()

if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/MS Basic_License.md")
install (FILES FluidR3Mono_License.md
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
RENAME "MS Basic_License.md")
else ()
install(FILES
"MS Basic_License.md"
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
)
endif ()

endif (MUE_INSTALL_SOUNDFONT)
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/MS Basic_License.md")
install (FILES FluidR3Mono_License.md
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
RENAME "MS Basic_License.md")
else ()
install(FILES
"MS Basic_License.md"
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}sound
)
endif ()

2 changes: 1 addition & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ if (NOT CC_IS_EMSCRIPTEN)
list(APPEND LINK_LIB iex_videoexport)
endif()
else()
if (MUE_BUILD_IMAGESEXPORT_MODULE)
if (MUE_BUILD_IMAGEEXPORT_MODULE)
list(APPEND LINK_LIB iex_imagesexport)
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
#include "importexport/videoexport/videoexportmodule.h"
#endif
#else
#ifdef MUE_BUILD_IMAGESEXPORT_MODULE
#ifdef MUE_BUILD_IMAGEEXPORT_MODULE
#include "importexport/imagesexport/imagesexportmodule.h"
#endif
#endif
Expand Down Expand Up @@ -278,7 +278,7 @@ int main(int argc, char** argv)
app.addModule(new mu::iex::videoexport::VideoExportModule());
#endif
#else
#ifdef MUE_BUILD_IMAGESEXPORT_MODULE
#ifdef MUE_BUILD_IMAGEEXPORT_MODULE
app.addModule(new mu::iex::imagesexport::ImagesExportModule());
#endif
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Item {
property string indeterminateText: "--"

property int popupItemsCount: 18
property bool isFontDropdown: false

property alias dropIcon: dropIconItem
property alias label: mainItem.label
Expand Down Expand Up @@ -96,6 +97,7 @@ Item {

textRole: root.textRole
valueRole: root.valueRole
isFontDropdown: root.isFontDropdown

currentIndex: root.currentIndex

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Loader {

property alias dropdown: loader.item
property alias isOpened: loader.active
property bool isFontDropdown: false

active: false

Expand Down Expand Up @@ -63,6 +64,7 @@ Loader {
currentIndex: loader.currentIndex
itemWidth: loader.itemWidth
itemHeight: loader.itemHeight
isFontDropdown: root.isFontDropdown

textRole: loader.textRole
valueRole: loader.valueRole
Expand Down
Loading