33name : Build
44
55on :
6- push :
7- pull_request :
6+ workflow_call :
7+ inputs :
8+ publish :
9+ type : boolean
10+ default : false
11+ secrets :
12+ AZURE_CLIENT_ID :
13+ required : false
14+ AZURE_CLIENT_SECRET :
15+ required : false
16+ AZURE_TENANT_ID :
17+ required : false
18+ DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY :
19+ required : false
20+ DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD :
21+ required : false
22+ MACOS_CODESIGN_CERTIFICATE_P12_BASE64 :
23+ required : false
24+ MACOS_CODESIGN_CERTIFICATE_PASSWORD :
25+ required : false
26+ MACOS_NOTARIZATION_APP_SPECIFIC_PASSWORD :
27+ required : false
28+ NETLIFY_BUILD_HOOK :
29+ required : false
30+ RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY :
31+ required : false
832
933permissions :
1034 contents : read # to fetch code (actions/checkout)
4973 -DQT6=ON
5074 -DWAVPACK=ON
5175 -DVCPKG_TARGET_TRIPLET=x64-osx-min1100-release
52- -DVCPKG_DEFAULT_HOST_TRIPLET=x64-osx-min1100-release
5376 # TODO: Fix this broken test on macOS
5477 ctest_args : --exclude-regex DirectoryDAOTest.relocateDirectory
5578 cpack_generator : DragNDrop
7396 -DQT6=ON
7497 -DWAVPACK=ON
7598 -DVCPKG_TARGET_TRIPLET=arm64-osx-min1100-release
76- -DVCPKG_DEFAULT_HOST_TRIPLET=x64-osx-min1100-release
7799 # TODO: Fix this broken test on macOS
78100 crosscompile : true
79101 cpack_generator : DragNDrop
86108 artifacts_path : build/*.dmg
87109 artifacts_slug : macos-macosarm
88110 qt_qpa_platform : offscreen
89- - name : Windows 2019 (MSVC)
90- os : windows-2019
111+ - name : Windows 2022 (MSVC)
112+ os : windows-2022
91113 # TODO: Re-enable FFmpeg after licensing issues have been clarified
92114 # Attention: If you change the cmake_args for the Windows CI build,
93115 # also adjust the for the local Windows build setup in
@@ -103,7 +125,6 @@ jobs:
103125 -DQT6=ON
104126 -DWAVPACK=ON
105127 -DVCPKG_TARGET_TRIPLET=x64-windows-release
106- -DVCPKG_DEFAULT_HOST_TRIPLET=x64-windows-release
107128 cc : cl
108129 cxx : cl
109130 # TODO: Fix these broken tests on Windows
@@ -130,7 +151,7 @@ jobs:
130151 artifact-windows-win64 : ${{ steps.prepare_deploy.outputs.artifact-windows-win64 }}
131152 steps :
132153 - name : " Check out repository"
133- uses : actions/checkout@v4.2.2
154+ uses : actions/checkout@v5
134155 with :
135156 # This is necessary for making `git describe` work.
136157 fetch-depth : 0
@@ -172,7 +193,7 @@ jobs:
172193 - name : " [macOS] install ccache and make"
173194 if : runner.os == 'macOS'
174195 run : |
175- brew install ccache ninja
196+ brew install ccache
176197
177198 - name : " [macOS/Windows] Get build environment name"
178199 if : runner.os != 'Linux'
@@ -281,7 +302,6 @@ jobs:
281302 env :
282303 CC : ${{ matrix.cc }}
283304 CXX : ${{ matrix.cxx }}
284- CMAKE_BUILD_PARALLEL_LEVEL : 2
285305 # GitHub Actions automatically zstd compresses caches
286306 CCACHE_NOCOMPRESS : true
287307
@@ -315,7 +335,8 @@ jobs:
315335 env :
316336 AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
317337 if : runner.os == 'Windows' && env.AZURE_TENANT_ID
318- uses : azure/trusted-signing-action@v0.5.0
338+ # Pinned to commit, to fix a caching issue https://github.com/Azure/trusted-signing-action/issues/62
339+ uses : azure/trusted-signing-action@0d74250c661747df006298d0fb49944c10f16e03
319340 with :
320341 azure-tenant-id : ${{ secrets.AZURE_TENANT_ID }}
321342 azure-client-id : ${{ secrets.AZURE_CLIENT_ID }}
@@ -356,7 +377,7 @@ jobs:
356377 run : |
357378 if [[ "${{ github.ref }}" == "refs/heads/main" ]] && [[ "${{ github.repository }}" == "mixxxdj/mixxx" ]]; then
358379 CPACK_ARGS="-D DEB_UPLOAD_PPA=ppa:mixxx/nightlies"
359- elif [[ "${{ github.ref }}" == "refs/heads/2.5 " ]] && [[ "${{ github.repository }}" == "mixxxdj/mixxx" ]]; then
380+ elif [[ "${{ github.ref }}" == "refs/heads/2.6 " ]] && [[ "${{ github.repository }}" == "mixxxdj/mixxx" ]]; then
360381 CPACK_ARGS="-D DEB_UPLOAD_PPA=ppa:mixxx/mixxxbetas"
361382 elif [[ "${{ github.ref }}" =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.repository }}" == "mixxxdj/mixxx" ]]; then
362383 CPACK_ARGS="-D DEB_UPLOAD_PPA=ppa:mixxx/mixxx"
@@ -379,7 +400,8 @@ jobs:
379400 env :
380401 AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
381402 if : runner.os == 'Windows' && env.AZURE_TENANT_ID
382- uses : azure/trusted-signing-action@v0.5.0
403+ # Pinned to commit, to fix a caching issue https://github.com/Azure/trusted-signing-action/issues/62
404+ uses : azure/trusted-signing-action@0d74250c661747df006298d0fb49944c10f16e03
383405 with :
384406 azure-tenant-id : ${{ secrets.AZURE_TENANT_ID }}
385407 azure-client-id : ${{ secrets.AZURE_CLIENT_ID }}
@@ -399,7 +421,7 @@ jobs:
399421 # also generates metadata for file artifact and write it to the job
400422 # output using the artifacts_slug value.
401423 id : prepare_deploy
402- if : github.event_name == 'push' && matrix.artifacts_path != null
424+ if : inputs.publish && matrix.artifacts_path != null
403425 shell : bash
404426 run : >
405427 if [[ "${GITHUB_REF}" =~ ^refs/tags/.* ]];
@@ -420,7 +442,7 @@ jobs:
420442 - name : " [Windows] Install rsync and openssh"
421443 env :
422444 SSH_PRIVATE_KEY : ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY }}
423- if : runner.os == 'Windows' && github.event_name == 'push' && env.SSH_PRIVATE_KEY != null
445+ if : runner.os == 'Windows' && inputs.publish && env.SSH_PRIVATE_KEY != null
424446 run : |
425447 $Env:PATH="c:\msys64\usr\bin;$Env:PATH"
426448 pacman -S --noconfirm coreutils bash rsync openssh
@@ -449,7 +471,7 @@ jobs:
449471 Add-Content -Path "$Env:GITHUB_ENV" -Value "PATH=$Env:PATH"
450472
451473 - name : " Set up SSH Agent"
452- if : github.event_name == 'push' && env.SSH_PRIVATE_KEY != null
474+ if : inputs.publish && env.SSH_PRIVATE_KEY != null
453475 shell : bash
454476 env :
455477 SSH_AUTH_SOCK : /tmp/ssh_agent.sock
@@ -464,7 +486,7 @@ jobs:
464486
465487 - name : " [macOS/Windows] Upload build to downloads.mixxx.org"
466488 # skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA
467- if : runner.os != 'Linux' && github.event_name == 'push' && env.SSH_AUTH_SOCK != null
489+ if : runner.os != 'Linux' && inputs.publish && env.SSH_AUTH_SOCK != null
468490 shell : bash --login -eo pipefail "{0}"
469491 run : rsync --verbose --recursive --checksum --times --delay-updates "deploy/" "${SSH_USER}@${SSH_HOST}:${DESTDIR}/"
470492 env :
@@ -481,7 +503,7 @@ jobs:
481503
482504 - name : " Upload GitHub Actions artifacts"
483505 if : matrix.artifacts_path != null
484- uses : actions/upload-artifact@v4.3.4
506+ uses : actions/upload-artifact@v4.6.2
485507 with :
486508 name : ${{ matrix.artifacts_name }}
487509 path : ${{ matrix.artifacts_path }}
@@ -497,7 +519,7 @@ jobs:
497519 if : always() && github.repository == 'mixxxdj/mixxx'
498520 steps :
499521 - name : " Check out repository"
500- uses : actions/checkout@v4.2.2
522+ uses : actions/checkout@v5
501523 with :
502524 fetch-depth : 0
503525
@@ -510,7 +532,7 @@ jobs:
510532 - name : " Collect Artifacts Metadata & Write Manifest"
511533 # Retrieve the metadata from the matrix job's outputs, merge them into a
512534 # single JSON document and then deploy to the server.
513- if : github.event_name == 'push' && env.SSH_PASSWORD != null
535+ if : inputs.publish && env.SSH_PASSWORD != null
514536 run : >
515537 if [[ "${GITHUB_REF}" =~ ^refs/tags/.* ]];
516538 then
@@ -528,7 +550,7 @@ jobs:
528550 SSH_PASSWORD : ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }}
529551
530552 - name : " Set up SSH Agent"
531- if : github.event_name == 'push' && env.SSH_PRIVATE_KEY != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0'
553+ if : inputs.publish && env.SSH_PRIVATE_KEY != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0'
532554 shell : bash
533555 env :
534556 SSH_AUTH_SOCK : /tmp/ssh_agent.sock
@@ -542,7 +564,7 @@ jobs:
542564 echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> "${GITHUB_ENV}"
543565
544566 - name : " Deploy Manifest"
545- if : github.event_name == 'push' && env.SSH_AUTH_SOCK != null
567+ if : inputs.publish && env.SSH_AUTH_SOCK != null
546568 shell : bash
547569 run : rsync --verbose --recursive --checksum --times --delay-updates "deploy/" "${SSH_USER}@${SSH_HOST}:${DESTDIR}/"
548570 env :
0 commit comments