Skip to content

Commit

Permalink
Fix some build issues
Browse files Browse the repository at this point in the history
Force building 32-bit Windows on GitHub CI using Qt 5.9.9 for now, as there is no 5.15.2 package available
currently for the GitHub CI builds.
Also allow "Save online" even from an unstable build in GUI
and on the commandline.
Temp. measure... needed only as long as there is no 'official' release
(which may mean forever).

Ignore a file generated on a master build same way it is ignored non in the master branch too.
Just eases the switching between master and 3.x

Fix some GitHub actions warnings reg. deprecated Node.js 12 vs. 16

Fix vtests build using a similar method as the mtest.
Doesn't work, so back to 5.9.8, for Linux, for now...
  • Loading branch information
Jojo-Schmitz committed Dec 7, 2022
1 parent 7aed030 commit 8f1e5c8
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 36 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ on:
jobs:
build:
runs-on: ubuntu-18.04
#runs-on: ubuntu-20.04 may be needed in the near futur, needs libssl1.0.0?
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "Configure workflow"
run: |
sudo bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
Expand Down Expand Up @@ -73,20 +74,21 @@ jobs:
sudo bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os linux -v 3
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_${{ github.run_id }}
path: ./build.artifacts/

run_mtests:
runs-on: ubuntu-18.04
#runs-on: ubuntu-20.04 may be needed in the near futur, needs libssl1.0.0?
env:
# Enable AddressSanitizer in the mtest build
CFLAGS: "-fsanitize=address -fno-omit-frame-pointer"
CXXFLAGS: "-fsanitize=address -fno-omit-frame-pointer"
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup environment
run: |
sudo bash ./build/ci/linux/setup.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_lupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
default: 'on'
jobs:
lupdate:
runs-on: macos-10.15
runs-on: macos-11
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "Configure workflow"
run: |
DO_PUBLISH='false'
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
sudo bash ./build/ci/lupdate/publish_to_tx.sh -u ${{ secrets.TRANSIFEX_USER }} -p ${{ secrets.TRANSIFEX_PASSWORD }}
- name: Upload artifacts on GitHub
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_tsfiles_${{ github.run_id }}
path: ./share/locale
path: ./share/locale
7 changes: 4 additions & 3 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ env:
jobs:
build:
runs-on: macos-10.15
#runs-on: macos-11 may be needed in the near futur
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: "Configure workflow"
Expand Down Expand Up @@ -106,7 +107,7 @@ jobs:
bash ./build/ci/tools/sparkle_appcast_gen.sh -p macos
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_${{ github.run_id }}
path: ./build.artifacts/
8 changes: 4 additions & 4 deletions .github/workflows/ci_tx2s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
tx2s3:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: "Configure workflow"
run: |
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Clone repository
if: env.DO_RUN == 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup environment
if: env.DO_RUN == 'true'
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Upload artifacts on GitHub
if: env.DO_RUN == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_locale_${{ github.run_id }}
path: ./share/locale
path: ./share/locale
5 changes: 3 additions & 2 deletions .github/workflows/ci_vtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:
jobs:
run_vtests:
runs-on: ubuntu-18.04
#runs-on: ubuntu-20.04 may be needed in the near futur, needs libssl1.0.0?
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Retrieve base commit for PR
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
./gen_compare
- name: Upload artifact
if: contains( env.found, '1') && contains( env.VTEST_DIFF_FOUND, 'true')
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: compare
path: ./vtest/compare
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'
- name: "Configure workflow"
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_x64_${{ github.run_id }}
path: build.artifacts\
Expand All @@ -107,11 +107,11 @@ jobs:
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Fetch submodules
Expand All @@ -128,6 +128,7 @@ jobs:
if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
DO_BUILD='true'
fi
DO_BUILD='true'
echo "!! ATTENTION !! Windows x32 build run only for 'testing_build' and 'stable_build', and SKIP for 'pull requests' and nightly"
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV
echo "DO_BUILD: $DO_BUILD"
Expand Down Expand Up @@ -178,19 +179,19 @@ jobs:
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_x86_${{ github.run_id }}
path: build.artifacts\
build_portable:
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Fetch submodules
Expand Down Expand Up @@ -257,7 +258,7 @@ jobs:
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MuseScore_Portable_${{ github.run_id }}
path: build.artifacts\
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ VERSION
SF_VERSION
/mscore/data/mscore.aps
/msvc.*

# Created during (master) build
thirdparty/lame/config.h
thirdparty/flac/flac-1.3.4/config.h
4 changes: 2 additions & 2 deletions build/ci/linux/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ apt-get install -y --no-install-recommends \
##########################################################################

# Get newer Qt (only used cached version if it is the same)
qt_version="5152"
qt_version="598"
qt_dir="Qt/${qt_version}"
if [[ ! -d "${qt_dir}" ]]; then
mkdir -p "${qt_dir}"
qt_url="https://s3.amazonaws.com/utils.musescore.org/Qt${qt_version}_gcc64.7z"
qt_url="https://s3.amazonaws.com/utils.musescore.org/qt${qt_version}.zip"
wget -q --show-progress -O qt5.zip "${qt_url}"
7z x -y qt5.zip -o"${qt_dir}"
rm -f qt5.zip
Expand Down
11 changes: 8 additions & 3 deletions build/ci/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,17 @@ SET MSCORE_STABLE_BUILD="TRUE"

:: TODO We need define paths during image creation
SET "JACK_DIR=C:\Program Files (x86)\Jack"
SET "QT_DIR=C:\Qt\5.15.2"

IF %TARGET_PROCESSOR_BITS% == 32 (
SET "PATH=%QT_DIR%\msvc2019\bin;%JACK_DIR%;%PATH%"
:: SET "QT_DIR=C:\Qt\5.9.9"
:: SET "PATH=%QT_DIR%\msvc2015\bin;%JACK_DIR%;%PATH%"
:: for some strange reason the above doesn't work
SET "PATH=C:\Qt\5.9.9\msvc2015\bin;%JACK_DIR%;%PATH%"
) ELSE (
SET "PATH=%QT_DIR%\msvc2019_64\bin;%JACK_DIR%;%PATH%"
:: SET "QT_DIR=C:\Qt\5.15.2"
:: SET "PATH=%QT_DIR%\msvc2019_64\bin;%JACK_DIR%;%PATH%"
:: for some strange reason the above doesn't work
SET "PATH=C:\Qt\5.15.2\msvc2019_64\bin;%JACK_DIR%;%PATH%"
)

bash ./build/ci/tools/make_revision_env.sh
Expand Down
10 changes: 5 additions & 5 deletions build/ci/windows/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ MKDIR %TEMP_DIR%
:: Install Qt
ECHO "=== Install Qt ==="

:: Default for x64
SET "Qt_ARCHIVE=Qt5152_msvc2019_64.7z"

IF %TARGET_PROCESSOR_BITS% == 32 (
SET "Qt_ARCHIVE=Qt5152_msvc2019.7z"
SET "Qt_ARCHIVE=qt599_msvc2015.7z"
SET "QT_DIR=C:\Qt\5.9.9"
) ELSE (
SET "Qt_ARCHIVE=Qt5152_msvc2019_64.7z"
SET "QT_DIR=C:\Qt\5.15.2"
)

SET "QT_URL=https://s3.amazonaws.com/utils.musescore.org/%Qt_ARCHIVE%"
SET "QT_DIR=C:\Qt\5.15.2"

CALL "wget.exe" -q --show-progress --no-check-certificate "%QT_URL%" -O "%TEMP_DIR%\%Qt_ARCHIVE%"
CALL "7z" x -y "%TEMP_DIR%\%Qt_ARCHIVE%" "-o%QT_DIR%"
Expand Down
2 changes: 2 additions & 0 deletions mscore/cloud/uploadscoredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ namespace Ms {

void MuseScore::showUploadScoreDialog()
{
#if 0
if (MuseScore::unstable()) {
QMessageBox::warning(this, tr("Save online"), tr("Saving scores online is disabled in this unstable prerelease version of MuseScore."));
return;
}
#endif
if (!currentScore())
return;
if (!currentScore()->sanityCheck(QString())) {
Expand Down
2 changes: 2 additions & 0 deletions mscore/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3511,10 +3511,12 @@ static void parseSourceUrl(const QString& sourceUrl, int& uid, int& nid)

bool MuseScore::saveOnline(const QStringList& inFilePaths)
{
#if 0
if (MuseScore::unstable()) {
qCritical() << qUtf8Printable(tr("Error: Saving scores online is disabled in this unstable prerelease version of MuseScore."));
return false;
}
#endif
if (!_loginManager->syncGetUser()) {
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ done
echo "{}]" >> $JSON_FILE

echo "Generate PNG files"
# run the mtests in "minimal" platform for headless systems
# enable fonts handling
#export QT_QPA_PLATFORM=minimal:enablefonts
$MSCORE -j $JSON_FILE -r $DPI >LOG 2>&1

echo "LOG:"
Expand Down

0 comments on commit 8f1e5c8

Please sign in to comment.