Skip to content

Commit

Permalink
Merge pull request #232 from Jojo-Schmitz/3.x-macOS-10.13
Browse files Browse the repository at this point in the history
Raise GitHub CI build platform to macOS-13
  • Loading branch information
Jojo-Schmitz authored Dec 24, 2024
2 parents 5fcf62e + 3483dac commit 41f2dd8
Show file tree
Hide file tree
Showing 105 changed files with 308 additions and 1,117 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ name: 'Build: macOS'
on:
push:
branches:
- master
# - 3.x
- 3.x
pull_request:
branches:
- master
# - 3.x
- 3.x

# schedule:
# - cron: '0 4 */1 * *' # At 04:00 on every day-of-month
schedule:
- cron: '0 4 */1 * *' # At 04:00 on every day-of-month
workflow_dispatch:
inputs:
build_mode:
Expand All @@ -37,11 +35,11 @@ on:

env:
CURRENT_RELEASE_BRANCH: 3.x
DEVELOPER_DIR: /Applications/Xcode_13.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer

jobs:
macos:
runs-on: macos-12
runs-on: macos-13
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
required: true
publish:
description: 'Publish to FTP: on - publish'
default: 'off'
default: 'off'
required: false
workflow_call:
inputs:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
fi
DO_CHECKSUM='true'
Expand All @@ -89,7 +89,7 @@ jobs:
ADD_INFO="_${GITHUB_REF#refs/heads/}"
if [ "${{ github.event_name }}" == "schedule" ] && [ "${{ github.event.schedule }}" == "0 5 */1 */1 *" ]; then ADD_INFO="_${CURRENT_RELEASE_BRANCH}"; fi
if [ "${{ github.event_name }}" == "pull_request" ]; then ADD_INFO="_${{ github.event.pull_request.number }}_${pull_request_title}"; fi
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\’' '_' <<<"Mu3.7_${BUILD_NUMBER}_Win64${ADD_INFO}")"
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\’' '_' <<<"Mu3.7_${BUILD_NUMBER}_Win64${ADD_INFO}")"
echo "github.repository: ${{ github.repository }}"
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
if: env.DO_APPCAST == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: ${{ always() }}
uses: actions/upload-artifact@v4
Expand All @@ -158,10 +158,7 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Fetch submodules
run: |
git submodule update --init --recursive
submodules: 'true'
- name: "Configure workflow"
shell: bash
env:
Expand All @@ -174,12 +171,12 @@ jobs:
BUILD_NUMBER=$(cat ./build.artifacts/env/build_number.env)
DO_PUBLISH='false'
if [ "${{ inputs.publish }}" == "on" ]; then
if [[ "${{ inputs.publish }}" == "on" || "$BUILD_MODE" == "nightly" ]]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
fi
DO_CHECKSUM='true'
Expand All @@ -198,7 +195,7 @@ jobs:
ADD_INFO="_${GITHUB_REF#refs/heads/}"
if [ "${{ github.event_name }}" == "schedule" ] && [ "${{ github.event.schedule }}" == "0 5 */1 */1 *" ]; then ADD_INFO="_${CURRENT_RELEASE_BRANCH}"; fi
if [ "${{ github.event_name }}" == "pull_request" ]; then ADD_INFO="_${{ github.event.pull_request.number }}_${pull_request_title}"; fi
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\?' '_' <<<"Mu3.7_${BUILD_NUMBER}_Win32${ADD_INFO}")"
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\' '_' <<<"Mu3.7_${BUILD_NUMBER}_Win32${ADD_INFO}")"
echo "github.repository: ${{ github.repository }}"
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
Expand Down Expand Up @@ -235,8 +232,8 @@ jobs:
IF ${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD != 0 }} == true ( SET S_P=${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD }} ) ELSE ( SET S_P="''" )
IF ${{ env.BUILD_MODE }} == stable ( SET GUID=${{ secrets.WIN_MSI_STABLE_GUID }} ) ELSE ( SET GUID=${{ secrets.WIN_MSI_TESTING_GUID }} )
build\ci\windows\package.bat -b 32 --signsecret %S_S% --signpass %S_P% --guid %GUID%
- name: Checksum
if: env.DO_BUILD == 'true'
- name: Checksum
if: env.DO_CHECKSUM == 'true'
run: |
bash ./build/ci/tools/checksum.sh
- name: Publish package
Expand All @@ -245,7 +242,7 @@ jobs:
run: |
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 3
- name: AppCast
if: env.DO_BUILD == 'true'
if: env.DO_APPCAST == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
Expand All @@ -258,7 +255,9 @@ jobs:

windows_portable:
# Disable on pull_request
if: ${{ github.event_name == 'schedule' || contains(inputs.platforms, 'windows_portable') }}
if: |
github.event_name != 'pull_request' &&
(github.event_name != 'workflow_dispatch' || contains(inputs.platforms, 'windows_portable'))
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
Expand Down Expand Up @@ -288,7 +287,7 @@ jobs:
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
fi
DO_CHECKSUM='true'
Expand All @@ -299,15 +298,15 @@ jobs:
DO_BUILD='false'
if [[ "$BUILD_MODE" == "testing" || "$BUILD_MODE" == "stable" ]]; then
DO_BUILD='true'
DO_BUILD='true'
fi
echo "!! ATTENTION !! Windows portable build run only for 'testing' and 'stable', and SKIP for 'pull requests' and nightly"
DO_PUBLISH='false'
ADD_INFO="_${GITHUB_REF#refs/heads/}"
if [ "${{ github.event_name }}" == "schedule" ] && [ "${{ github.event.schedule }}" == "0 5 */1 */1 *" ]; then ADD_INFO="_${CURRENT_RELEASE_BRANCH}"; fi
if [ "${{ github.event_name }}" == "pull_request" ]; then ADD_INFO="_${{ github.event.pull_request.number }}_${pull_request_title}"; fi
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\?' '_' <<<"Mu3.7_${BUILD_NUMBER}_WinPortable${ADD_INFO}")"
UPLOAD_ARTIFACT_NAME="$(tr '":<>|*?/\\' '_' <<<"Mu3.7_${BUILD_NUMBER}_WinPortable${ADD_INFO}")"
echo "github.repository: ${{ github.repository }}"
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
Expand Down Expand Up @@ -343,9 +342,9 @@ jobs:
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 --portable ON --signsecret %S_S% --signpass %S_P%
- name: Checksum
- name: Checksum
shell: bash
if: env.DO_BUILD == 'true'
if: env.DO_CHECKSUM == 'true'
run: |
bash ./build/ci/tools/checksum.sh
- name: Publish package
Expand All @@ -354,11 +353,11 @@ jobs:
run: |
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 3
- name: AppCast
if: env.DO_BUILD == 'true'
if: env.DO_APPCAST == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 1 addition & 4 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe",
"intelliSenseMode": "msvc-x64",
"cppStandard": "c++11",
"forcedInclude": [
"${workspaceFolder}/all.h"
]
"cppStandard": "c++11"
}
],
"version": 4
Expand Down
82 changes: 20 additions & 62 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================

# Minimum tested, report if it works with older
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.16)

project(mscore)

Expand All @@ -27,32 +26,10 @@ include(build/functions.cmake) # library of CMake functions ("fn__" namespace)
# Print Qt version or fail the build if Qt (qmake) is not in PATH.
fn__require_program(QMAKE Qt --version "https://musescore.org/en/handbook/developers-handbook/compilation" qmake)

# Libraries linked via full path no longer produce linker search paths.
cmake_policy(SET CMP0003 NEW)

# Apparently needed on Mac only (?)
if (APPLE)
# Issue no warning non-existent target argument to get_target_property()
# and set the result variable to a -NOTFOUND value rather than issuing a FATAL_ERROR 40
if(POLICY CMP0045)
cmake_policy(SET CMP0045 OLD)
endif(POLICY CMP0045)

# Silently ignore non-existent dependencies (mops1, mops2)
if(POLICY CMP0046)
cmake_policy(SET CMP0046 OLD)
endif(POLICY CMP0046)

# Supress "The ``exec_program()`` command should not be called."
if(POLICY CMP0153)
cmake_policy(SET CMP0153 OLD)
endif(POLICY CMP0153)
endif (APPLE)

# RPATH settings on macOS do not affect install_name
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif(POLICY CMP0068)
# Supress "The ``exec_program()`` command should not be called."
if(POLICY CMP0153)
cmake_policy(SET CMP0153 OLD)
endif(POLICY CMP0153)

# Don't process generated source files with AUTOMOC
if(POLICY CMP0071)
Expand Down Expand Up @@ -90,7 +67,6 @@ include (FindQt5)
include (UsePkgConfig1) # Defines MACRO(PKGCONFIG1 _package _minVersion _include_DIR _link_DIR _link_FLAGS _cflags)
include (FindPulseAudio)
include (GetCompilerVersion)
include (CreatePrecompiledHeader)

# For debugging the make system uncomment next line:
# set(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down Expand Up @@ -206,12 +182,8 @@ else(BUILD_CRASH_REPORTER)
endif(BUILD_CRASH_REPORTER)

if (APPLE)
set (CMAKE_CXX_COMPILER clang++)
set (CMAKE_CXX_COMPILER_ID "Clang")
set(CMAKE_OSX_ARCHITECTURES x86_64)

set(MACOSX_DEPLOYMENT_TARGET 10.10)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
set(MACOSX_DEPLOYMENT_TARGET 10.13)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)

set(HAS_AUDIOFILE TRUE) # Requires libsndfile
set(MAC_APPCAST_URL "")
Expand Down Expand Up @@ -402,6 +374,13 @@ if (BUILD_FOR_WINSTORE)
set(FOR_WINSTORE 1)
endif(BUILD_FOR_WINSTORE)

#
# Precompiled header
#
if (BUILD_PCH)
include (CreatePrecompiledHeader)
endif (BUILD_PCH)

if (USE_ZITA_REVERB)
add_definitions(-DZITA_REVERB)
endif(USE_ZITA_REVERB)
Expand Down Expand Up @@ -759,29 +738,8 @@ if (NOT MINGW AND NOT MSVC AND NOT APPLE)
# Note: Must now run "update-mime-database" to apply changes. This is done in the Makefile.
endif (NOT MINGW AND NOT MSVC AND NOT APPLE)

#
# Create precompiled header file
#

# all.h is expected in PROJECT_BINARY_DIR by subdirs, except for MSVC
if (NOT MSVC)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/all.h ${PROJECT_BINARY_DIR}/all.h
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
endif (NOT MSVC)

precompiled_header(QT_INCLUDES all ${BUILD_PCH})

# MSVC does not require these targets, as all.h is not copied and the
# PCH generation is done per-project
if (NOT MSVC)
ADD_CUSTOM_TARGET(mops1 DEPENDS ${PROJECT_BINARY_DIR}/all.h)
ADD_CUSTOM_TARGET(mops2 DEPENDS ${PCH})
endif (NOT MSVC)

##

## Includes
##
include_directories(
Expand Down Expand Up @@ -850,14 +808,14 @@ configure_file (
##
## Add subdirs
##
add_subdirectory(effects)
add_subdirectory(audio)
add_subdirectory(audiofile)

subdirs(
awl bww2mxml share libmscore
thirdparty/qzip
)
add_subdirectory(awl)
add_subdirectory(bww2mxml)
add_subdirectory(effects)
add_subdirectory(libmscore)
add_subdirectory(share)
add_subdirectory(thirdparty/qzip)

if (BUILD_CRASH_REPORTER)
set(ENABLE_CRASH_REPORTER OFF CACHE BOOL "Disable libcrashreporter-qt GUI component")
Expand Down
20 changes: 10 additions & 10 deletions Makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ release:
-DTELEMETRY_TRACK_ID="${TELEMETRY_TRACK_ID}" \
.. -G Xcode; \
xcodebuild -project ${XCODEPROJ} -target lrelease; \
$(FORMATTER_START) xcodebuild -project ${XCODEPROJ} -configuration Release -target ALL_BUILD $(FORMATTER_END); \
$(FORMATTER_START) xcodebuild -project ${XCODEPROJ} -configuration Release -target ALL_BUILD $(FORMATTER_END);

debug:
mkdir build.debug; \
cd build.debug; \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" \
.. -G Xcode; \
xcodebuild -project ${XCODEPROJ} -target lrelease; \
$(FORMATTER_START) xcodebuild-project ${XCODEPROJ} -configuration Debug -target ALL_BUILD $(FORMATTER_END); \
cd build.debug; \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" \
.. -G Xcode; \
xcodebuild -project ${XCODEPROJ} -target lrelease; \
$(FORMATTER_START) xcodebuild -project ${XCODEPROJ} -configuration Debug -target ALL_BUILD $(FORMATTER_END);

xcode:
mkdir build.xcode; \
Expand Down Expand Up @@ -100,8 +100,8 @@ ci:
-DMUSESCORE_REVISION="${MUSESCORE_REVISION}" \
-DTELEMETRY_TRACK_ID="${TELEMETRY_TRACK_ID}" \
.. -G Xcode; \
xcodebuild -UseModernBuildSystem=NO -project ${XCODEPROJ} -target lrelease; \
$(FORMATTER_START) xcodebuild -UseModernBuildSystem=NO -project ${XCODEPROJ} -configuration Release -target install $(FORMATTER_END);
xcodebuild -project ${XCODEPROJ} -target lrelease; \
$(FORMATTER_START) xcodebuild -project ${XCODEPROJ} -configuration Release -target install $(FORMATTER_END);

#
# clean out of source build
Expand Down
Loading

0 comments on commit 41f2dd8

Please sign in to comment.