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...

Trick musescore.com to allow save, by claiming the score to stem from 3.6.3...

Change Linux builds to use Ubuntu 20
and partly sync with master's ci_linux_mu3.yml
  • Loading branch information
Jojo-Schmitz committed Feb 22, 2023
1 parent 97516bc commit 1975bf3
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 44 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ on:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
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 @@ -59,7 +59,7 @@ jobs:
run: |
T_ID=${{ secrets.TELEMETRY_TRACK_ID }}; if [ -z "$T_ID" ]; then T_ID="''"; fi
sudo bash ./build/ci/linux/build.sh -n ${{ github.run_id }} --telemetry $T_ID
- name: Package
- name: Package
if: env.DO_BUILD == 'true'
run: |
sudo bash ./build/ci/linux/package.sh
Expand All @@ -73,27 +73,34 @@ 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
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
- name: Build
run: |
mkdir -p build.artifacts/env
#sudo bash ./build/ci/linux/build.sh -n ${{ github.run_id }} --build_mode mtests
./build/ci/linux/build.sh -n ${{ github.run_id }} --build_mode mtests
- name: Run mtests
run: |
# At moment build and run mtests consume 13.4 Gb of the disk.
# After left too little free space.
# So, we remove unnecessary tools, for more free space
#sudo docker system prune -a -f
#sudo rm -rf /usr/local/lib/android
#sudo bash ./build/ci/linux/runmtests.sh
./build/ci/linux/runmtests.sh
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
6 changes: 3 additions & 3 deletions .github/workflows/ci_vtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
run_vtests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
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 +75,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-2022
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-2022
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-2022
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
2 changes: 1 addition & 1 deletion build/ci/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM library/ubuntu:18.04
FROM library/ubuntu:20.04
COPY setup.sh /setup.sh
RUN bash -ex setup.sh
5 changes: 2 additions & 3 deletions build/ci/linux/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ apt_packages_runtime=(
libegl1-mesa-dev
libodbc1
libpq-dev
libssl1.0.0
libxcomposite-dev
libxcursor-dev
libxi-dev
Expand All @@ -83,11 +82,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
4 changes: 2 additions & 2 deletions libmscore/scorefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ bool Score::saveFile(QIODevice* f, bool msczFormat, bool onlySelection)
xml.stag("museScore version=\"" MSC_VERSION "\"");

if (!MScore::testMode) {
xml.tag("programVersion", VERSION);
xml.tag("programVersion", "3.6.3");
xml.tag("programRevision", revision);
}
write(xml, onlySelection);
Expand All @@ -766,7 +766,7 @@ bool Score::saveFile(QIODevice* f, bool msczFormat, bool onlySelection)
masterScore()->revisions()->write(xml);
if (!onlySelection) {
//update version values for i.e. plugin access
_mscoreVersion = VERSION;
_mscoreVersion = "3.6.3";
_mscoreRevision = revision.toInt(0, 16);
_mscVersion = MSCVERSION;
}
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 1975bf3

Please sign in to comment.