Skip to content

Commit 356947b

Browse files
committed
Update macOS ci
1 parent e6930f7 commit 356947b

File tree

7 files changed

+38
-9
lines changed

7 files changed

+38
-9
lines changed

.github/actions/initialize-build-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ runs:
3939
HOMEBREW_NO_INSTALL_CLEANUP: 1
4040
run: |
4141
brew update
42-
brew install ninja
42+
brew install ninja ccache imagemagick create-dmg
4343
4444
- name: Install Qt
4545
uses: jurplel/install-qt-action@v4

.github/actions/initialize-vcpkg/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
QT_DIR: ${{ env.Qt_ROOT_DIR }}/lib/cmake/Qt6
3232
Qt6_DIR: ${{ env.Qt_ROOT_DIR }}/lib/cmake/Qt6
3333
VCPKG_CMAKE_RELEASE_BUILD_TYPE: "RelWithDebInfo"
34-
VCPKG_KEEP_ENV_VARS: "QT_DIR;Qt6_DIR;VCPKG_CMAKE_RELEASE_BUILD_TYPE;VCPKG_BUILD_TYPE"
34+
VCPKG_KEEP_ENV_VARS: "QT_DIR;Qt6_DIR;VCPKG_CMAKE_RELEASE_BUILD_TYPE;VCPKG_BUILD_TYPE;MACOSX_DEPLOYMENT_TARGET"
3535
shell: pwsh
3636
run: |
3737
if (!(Test-Path $env:VCPKG_DEFAULT_BINARY_CACHE)) {

.github/workflows/dev-build.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- 'LICENSE'
1717
- 'crowdin.yml'
1818
- '.github/**'
19+
- '**/translations/*.ts'
1920
workflow_dispatch:
2021
inputs:
2122
identifier:
@@ -40,8 +41,7 @@ jobs:
4041
os:
4142
- windows-2025
4243
# - ubuntu-24.04
43-
# - macos-15
44-
44+
- macos-15
4545
env:
4646
QT_VERSION: 6.10.1
4747
VCPKG_REF: 74e6536215718009aae747d86d84b78376bf9e09
@@ -50,6 +50,7 @@ jobs:
5050
BUILD_DIR: ${{ github.workspace }}/build/build
5151
INSTALL_DIR: ${{ github.workspace }}/build/install
5252
CCACHE_DIR: ${{ github.workspace }}/build/ccache
53+
MACOSX_DEPLOYMENT_TARGET: 13.0
5354

5455
runs-on: ${{ matrix.os }}
5556

@@ -87,7 +88,10 @@ jobs:
8788
-InstallDir $env:INSTALL_DIR `
8889
-VersionIdentifier $env:VERSION_IDENTIFIER `
8990
${{ github.event.inputs.use_ccache == 'true' && '-CCache' || '' }}
90-
Write-Output ARTIFACT_NAME=$($output.ApplicationName)_$($output.Semver -replace '[\.\-\+]', '_') >> $env:GITHUB_ENV
91+
Write-Output ARTIFACT_NAME=$($output.ApplicationName)_$($output.Semver -replace '[\.\-\+]', '_')_${{ runner.os }}_${{ runner.arch }} >> $env:GITHUB_ENV
92+
Write-Output APPLICATION_SEMVER=$($output.Semver) >> $env:GITHUB_ENV
93+
Write-Output APPLICATION_DISPLAY_NAME=$($output.ApplicationDisplayName) >> $env:GITHUB_ENV
94+
Write-Output APPLICATION_NAME=$($output.ApplicationName) >> $env:GITHUB_ENV
9195
Write-Output INSTALLER_FILE_BASE=$($output.InstallerFileBase) >> $env:GITHUB_ENV
9296
9397
- name: Save CCache cache
@@ -102,11 +106,22 @@ jobs:
102106
$output = & ./scripts/ci/Collect-Symbol-Files.ps1 -VcpkgRootDir $env:VCPKG_ROOT_DIR -InstallDir $env:INSTALL_DIR
103107
Write-Output SYMBOL_FILES_PATH=$($output.Path) >> $env:GITHUB_ENV
104108
105-
- name: Pack
109+
- name: Create InnoSetup installer (Windows)
110+
if: ${{ runner.os == 'Windows' }}
106111
run: |
107112
$output = & ./scripts/ci/Pack.ps1 -BuildDir $env:BUILD_DIR -InstallerFileBase $env:INSTALLER_FILE_BASE -InnoSetupCommit $env:INNOSETUP_REF
108113
Write-Output PACKAGE_PATH=$($output.Path) >> $env:GITHUB_ENV
109114
115+
- name: Create DMG installer (macOS)
116+
if: ${{ runner.os == 'macOS' }}
117+
run: |
118+
$output = & ./scripts/ci/Create-DMG.ps1 `
119+
-AppPath $(Join-Path $env:INSTALL_DIR $env:APPLICATION_NAME'.app') `
120+
-Semver $env:APPLICATION_SEMVER `
121+
-ApplicationDisplayName $env:APPLICATION_DISPLAY_NAME `
122+
-InstallerFileBase $env:INSTALLER_FILE_BASE
123+
Write-Output PACKAGE_PATH=$($output) >> $env:GITHUB_ENV
124+
110125
- name: Upload symbol files
111126
uses: actions/upload-artifact@v4
112127
with:

scripts/ci/Build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Write-Host "Semver: $semver"
7878

7979
$installerFileBase = "${applicationName}_$($semver -replace '[\.\-\+]', '_')_installer"
8080

81+
$depsDir = (Get-ChildItem -Path $(Join-Path $VcpkgRootDir installed) | Where-Object {$_.Name -ne "vcpkg"})[0].FullName
82+
8183
cmake -S . -B $(Resolve-Path $BuildDir) -G Ninja `
8284
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
8385
"-DCMAKE_TOOLCHAIN_FILE=$(Join-Path $VcpkgRootDir scripts/buildsystems/vcpkg.cmake)" `
@@ -86,6 +88,7 @@ cmake -S . -B $(Resolve-Path $BuildDir) -G Ninja `
8688
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
8789
-DCK_ENABLE_CONSOLE:BOOL=FALSE `
8890
-DQT_NO_PRIVATE_MODULE_WARNING:BOOL=ON `
91+
"-DQMSETUP_APPLOCAL_DEPS_PATHS_RELWITHDEBINFO=$(Join-Path $depsDir lib)" `
8992
-DAPPLICATION_INSTALL:BOOL=ON `
9093
-DAPPLICATION_CONFIGURE_INSTALLER:BOOL=ON `
9194
-DINNOSETUP_USE_UNOFFICIAL_LANGUAGE:BOOL=ON `

scripts/ci/Collect-Symbol-Files.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ if ($IsWindows) {
4747
}
4848
dsymutil $dllFile.FullName -o "$pdbTargetDirectory/$($dllFile.Name).dSYM"
4949
strip -S $dllFile.FullName
50+
codesign --force --sign - $dllFile.FullName
5051
} else {
5152
Write-Host "Skip: $dllFile"
5253
}

scripts/ci/Create-DMG.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ New-Item -ItemType Directory -Path $TempDir | Out-Null
3232
$Bg1xOut = Join-Path $TempDir "dmg_background.png"
3333
$Bg2xOut = Join-Path $TempDir "dmg_background@2x.png"
3434
$BgTiff = Join-Path $TempDir "dmg_background.tiff"
35+
$AppBundleName = "$ApplicationDisplayName.app"
36+
$AppBundlePath = Join-Path $TempDir $AppBundleName
3537

3638
$VersionText = "Version $Semver"
3739

@@ -87,16 +89,24 @@ try {
8789
Remove-Item $DmgPath -Force
8890
}
8991

92+
if (Test-Path $AppBundlePath) {
93+
Remove-Item $AppBundlePath -Recurse -Force
94+
}
95+
96+
Move-Item -Path $AppPath -Destination $AppBundlePath
97+
98+
& codesign --deep --force --sign - $AppBundlePath | Write-Host
99+
90100
<# TODO: create-dmg currently places hidden .background file to the right of the visible area, so we have to leave some space for the horizontal scroll bar #>
91101
& create-dmg `
92102
--volname "$ApplicationDisplayName" `
93103
--background "$BgTiff" `
94104
--window-size 600 448 `
95105
--icon-size 128 `
96-
--icon "$(Split-Path $AppPath -Leaf)" 132 280 `
106+
--icon "$(Split-Path $AppBundlePath -Leaf)" 132 280 `
97107
--app-drop-link 468 280 `
98108
"$DmgPath" `
99-
"$AppPath" | Write-Host
109+
"$AppBundlePath" | Write-Host
100110

101111
if ($LASTEXITCODE -ne 0) {
102112
throw "create-dmg failed"

0 commit comments

Comments
 (0)