Skip to content

Commit

Permalink
sync builds scripts with 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Oct 5, 2020
1 parent b871748 commit 7cc5db5
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 10 deletions.
136 changes: 133 additions & 3 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
build_mode:
description: 'Build mode: devel_build, nightly_build, testing_build, stable_build'
required: true
default: 'devel_build'
default: 'devel_build'

jobs:
build_mu3:
build_mu3_x64:
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
with:
name: MuseScore_${{ github.run_id }}
path: build.artifacts\
build_mu4:
build_mu4_x64:
runs-on: windows-2019
steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -135,3 +135,133 @@ jobs:
with:
name: MuseScore_MU4_${{ github.run_id }}
path: build.artifacts\

# Builds x32 and portable currently disabled
# They need to be enabled when we switch to mu4 by default and decide to make a release.

# build_x32:
# runs-on: windows-2019
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
# - name: Clone repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 3
# - name: Fetch submodules
# run: |
# git submodule update --init --recursive
# - name: "Configure workflow"
# shell: bash
# run: |
# bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
# BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env)

# DO_BUILD='false'
# if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
# DO_BUILD='true'
# fi
# echo "::set-env name=DO_BUILD::$DO_BUILD"
# echo "DO_BUILD: $DO_BUILD"

# # Publish disabled for build x32
# DO_PUBLISH='false'
# echo "::set-env name=DO_PUBLISH::$DO_PUBLISH"
# echo "DO_PUBLISH: $DO_PUBLISH"
# - name: Setup environment
# if: env.DO_BUILD == 'true'
# run: |
# build\ci\windows\setup.bat -b 32
# - name: Build
# if: env.DO_BUILD == 'true'
# shell: cmd
# run: |
# IF ${{ secrets.TELEMETRY_TRACK_ID != 0 }} == true ( SET T_ID=${{ secrets.TELEMETRY_TRACK_ID }} ) ELSE ( SET T_ID="" )
# IF ${{ secrets.CRASH_LOG_SERVER_URL != 0 }} == true ( SET C_URL=${{ secrets.CRASH_LOG_SERVER_URL }} ) ELSE ( SET C_URL="" )
# build\ci\windows\build.bat -b 32 -n ${{ github.run_id }} --telemetry %T_ID% --crashurl %C_URL%
# - name: Package
# if: env.DO_BUILD == 'true'
# shell: cmd
# run: |
# IF ${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET != 0 }} == true ( SET S_S=${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET }} ) ELSE ( SET S_S="" )
# IF ${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD != 0 }} == true ( SET S_P=${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD }} ) ELSE ( SET S_P="" )
# build\ci\windows\package.bat -b 32 --signsecret %S_S% --signpass %S_P%
# - name: Checksum
# if: env.DO_BUILD == 'true'
# run: |
# bash ./build/ci/tools/checksum.sh
# - name: Publish package
# if: env.DO_PUBLISH == 'true'
# shell: cmd
# run: |
# build\ci\windows\publish.bat --secret ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}
# - name: Upload artifacts on GitHub
# if: env.DO_BUILD == 'true'
# uses: actions/upload-artifact@v2
# with:
# name: MuseScore_x86_${{ github.run_id }}
# path: build.artifacts\
# build_portable:
# runs-on: windows-2019
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
# - name: Clone repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 3
# - name: Fetch submodules
# run: |
# git submodule update --init --recursive
# - name: "Configure workflow"
# shell: bash
# run: |
# bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
# BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env)

# DO_BUILD='false'
# if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
# DO_BUILD='true'
# fi
# echo "::set-env name=DO_BUILD::$DO_BUILD"
# echo "DO_BUILD: $DO_BUILD"

# # Publish disabled for build x32
# DO_PUBLISH='false'
# echo "::set-env name=DO_PUBLISH::$DO_PUBLISH"
# echo "DO_PUBLISH: $DO_PUBLISH"
# - name: Setup environment
# if: env.DO_BUILD == 'true'
# run: |
# build\ci\windows\setup.bat -b 32 --portable ON
# - name: Build
# if: env.DO_BUILD == 'true'
# shell: cmd
# run: |
# IF ${{ secrets.TELEMETRY_TRACK_ID != 0 }} == true ( SET T_ID=${{ secrets.TELEMETRY_TRACK_ID }} ) ELSE ( SET T_ID="" )
# IF ${{ secrets.CRASH_LOG_SERVER_URL != 0 }} == true ( SET C_URL=${{ secrets.CRASH_LOG_SERVER_URL }} ) ELSE ( SET C_URL="" )
# build\ci\windows\build.bat -b 32 --portable ON -n ${{ github.run_id }} --telemetry %T_ID% --crashurl %C_URL%
# - name: Package
# if: env.DO_BUILD == 'true'
# shell: cmd
# run: |
# build\ci\windows\package.bat -b 32 --portable ON
# - name: Checksum
# if: env.DO_BUILD == 'true'
# run: |
# bash ./build/ci/tools/checksum.sh
# - name: Publish package
# if: env.DO_PUBLISH == 'true'
# run: |
# build\ci\windows\publish.bat --secret ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}
# shell: cmd
# - name: Upload artifacts on GitHub
# if: env.DO_BUILD == 'true'
# uses: actions/upload-artifact@v2
# with:
# name: MuseScore_Portable_${{ github.run_id }}
# path: build.artifacts\
3 changes: 2 additions & 1 deletion build/ci/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ while [[ "$#" -gt 0 ]]; do
done

if [ -z "$BUILD_NUMBER" ]; then echo "error: not set BUILD_NUMBER"; exit 1; fi
if [ -z "$TELEMETRY_TRACK_ID" ]; then TELEMETRY_TRACK_ID=""; fi

echo "BUILD_NUMBER: $BUILD_NUMBER"
echo "TELEMETRY_TRACK_ID: $TELEMETRY_TRACK_ID"
Expand Down Expand Up @@ -43,4 +44,4 @@ bash ./build/ci/tools/make_release_channel_env.sh
bash ./build/ci/tools/make_version_env.sh $BUILD_NUMBER
bash ./build/ci/tools/make_revision_env.sh
bash ./build/ci/tools/make_branch_env.sh
bash ./build/ci/tools/make_datetime_env.sh
bash ./build/ci/tools/make_datetime_env.sh
5 changes: 3 additions & 2 deletions build/ci/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ while [[ "$#" -gt 0 ]]; do
done

if [ -z "$BUILD_NUMBER" ]; then echo "error: not set BUILD_NUMBER"; exit 1; fi
if [ -z "$TELEMETRY_TRACK_ID" ]; then TELEMETRY_TRACK_ID=""; fi

echo "BUILD_NUMBER: $BUILD_NUMBER"
echo "TELEMETRY_TRACK_ID: $TELEMETRY_TRACK_ID"
echo "BUILD_NUMBER: $BUILD_NUMBER"
echo "BUILD_UI_MU4: $BUILD_UI_MU4"

make -f Makefile.osx ci BUILD_NUMBER=$BUILD_NUMBER TELEMETRY_TRACK_ID=$TELEMETRY_TRACK_ID BUILD_UI_MU4=${BUILD_UI_MU4}

bash ./build/ci/tools/make_release_channel_env.sh
bash ./build/ci/tools/make_version_env.sh $BUILD_NUMBER
bash ./build/ci/tools/make_revision_env.sh
bash ./build/ci/tools/make_branch_env.sh
bash ./build/ci/tools/make_datetime_env.sh
bash ./build/ci/tools/make_datetime_env.sh
4 changes: 2 additions & 2 deletions build/ci/macos/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export MACOSX_DEPLOYMENT_TARGET=10.10
echo -e "universal_target 10.10\nmacosx_deployment_target 10.10\nmacosx_sdk_version 10.10" | sudo tee -a /opt/local/etc/macports/macports.conf
sudo port install git pkgconfig cmake
sudo port -s install libsndfile lame portaudio jack
sudo port install libsndfile lame portaudio jack
export QT_SHORT_VERSION=5.15.1
export QT_PATH=$HOME/Qt
export QT_MACOS=$QT_PATH/$QT_SHORT_VERSION/clang_64
Expand All @@ -32,4 +32,4 @@ mkdir -p ~/Library/Frameworks
mv Sparkle-${SPARKLE_VERSION}/Sparkle.framework ~/Library/Frameworks/
rm -rf Sparkle-${SPARKLE_VERSION}

echo "Setup script done"
echo "Setup script done"
4 changes: 3 additions & 1 deletion build/ci/windows/package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ SET ARTIFACT_NAME=MuseScore-%BUILD_VERSION%-%TARGET_PROCESSOR_ARCH%.paf.exe
ECHO "Copy from %FILEPATH% to %ARTIFACT_NAME%"
COPY %FILEPATH% %ARTIFACTS_DIR%\%ARTIFACT_NAME% /Y

bash ./build/ci/tools/make_artifact_name_env.sh %ARTIFACT_NAME%

ECHO "Finished portable packing"

GOTO END_SUCCESS
Expand All @@ -220,4 +222,4 @@ GOTO END_SUCCESS
exit /b 0

:END_ERROR
exit /b 1
exit /b 1
15 changes: 14 additions & 1 deletion build/ci/windows/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,21 @@ CALL "wget.exe" --no-check-certificate "https://s3.amazonaws.com/utils.musescore
CALL "7z" x -y %TEMP_DIR%\portableappsinstaller.zip "-oC:\portableappsinstaller"
)

IF %BUILD_WIN_PORTABLE% == ON (
ECHO "Installing PortableApps.com Launcher"
:: portableappslauncher is a vanilla installation of PortableApps.com Launcher https://portableapps.com/apps/development/portableapps.com_launcher
CALL "wget.exe" --no-check-certificate "https://s3.amazonaws.com/utils.musescore.org/portableappslauncher.zip" -O %TEMP_DIR%\portableappslauncher.zip
CALL "7z" x -y %TEMP_DIR%\portableappslauncher.zip "-oC:\portableappslauncher"

ECHO "Installing PortableApps.com Installer"
:: portableappslauncher is a vanilla installation of PortableApps.com Installer https://portableapps.com/apps/development/portableapps.com_launcher
CALL "wget.exe" --no-check-certificate "https://s3.amazonaws.com/utils.musescore.org/portableappsinstaller.zip" -O %TEMP_DIR%\portableappsinstaller.zip
CALL "7z" x -y %TEMP_DIR%\portableappsinstaller.zip "-oC:\portableappsinstaller"
)


:: Clean
ECHO "=== Clean ==="
RMDIR /Q /S "C:\TEMP"

ECHO "Setup script done"
ECHO "Setup script done"

0 comments on commit 7cc5db5

Please sign in to comment.