diff --git a/.ci/compile.sh b/.ci/compile.sh index 7ebdd6e4e..a86b5ee58 100755 --- a/.ci/compile.sh +++ b/.ci/compile.sh @@ -272,7 +272,7 @@ echo "::endgroup::" if [[ $USE_CCACHE ]]; then if [[ $CCACHE_EVICTION_AGE ]]; then - echo "::group::evict ccache files older than $CCACHE_EVICTION_AGE" + echo "::group::Evict ccache files older than $CCACHE_EVICTION_AGE" ccache --evict-older-than "$CCACHE_EVICTION_AGE" echo "::endgroup::" fi diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 3c8e915a8..6b880f871 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -4,7 +4,7 @@ permissions: contents: write id-token: write attestations: write - actions: write # needed for ccache action to be able to delete gha caches + actions: write # needed for ccache action to be able to delete gha caches on: push: @@ -159,7 +159,7 @@ jobs: timeout-minutes: 70 env: NAME: ${{matrix.distro}}${{matrix.version}} - CACHE: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache + CACHE: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache # Cache size over the entire repo is 10Gi: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy CCACHE_SIZE: 550M @@ -281,12 +281,9 @@ jobs: override_target: 13 make_package: 1 package_suffix: "-macOS13_Intel" - qt_version: 6.11.* qt_arch: clang_64 - qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: Ninja use_ccache: 1 - ccache_eviction_age: 7d - os: macOS target: 14 @@ -296,12 +293,9 @@ jobs: type: Release make_package: 1 package_suffix: "-macOS14" - qt_version: 6.11.* qt_arch: clang_64 - qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: Ninja use_ccache: 1 - ccache_eviction_age: 7d - os: macOS target: 15 @@ -311,12 +305,9 @@ jobs: type: Release make_package: 1 package_suffix: "-macOS15" - qt_version: 6.11.* qt_arch: clang_64 - qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: Ninja use_ccache: 1 - ccache_eviction_age: 7d - os: macOS target: 15 @@ -324,12 +315,9 @@ jobs: soc: Apple xcode: "16.4" type: Debug - qt_version: 6.11.* qt_arch: clang_64 - qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: Ninja use_ccache: 1 - ccache_eviction_age: 7d - os: Windows target: 10 @@ -337,9 +325,7 @@ jobs: type: Release make_package: 1 package_suffix: "-Win10" - qt_version: 6.11.* qt_arch: win64_msvc2022_64 - qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: "Visual Studio 17 2022" cmake_generator_platform: x64 @@ -352,6 +338,9 @@ jobs: # Cache size over the entire repo is 10Gi: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy CCACHE_SIZE: 550M + CCACHE_EVICTION_AGE: 7d + QT_VERSION: "6.10" + QT_MODULES: qtimageformats qtmultimedia qtwebsockets steps: - name: Checkout @@ -360,14 +349,13 @@ jobs: submodules: recursive - name: Add msbuild to PATH - if: matrix.os == 'Windows' - id: add-msbuild + if: runner.os == 'Windows' uses: microsoft/setup-msbuild@v3 with: msbuild-architecture: x64 - name: Setup ccache - if: matrix.use_ccache == 1 && matrix.os == 'macOS' + if: matrix.use_ccache == 1 && runner.os == 'macOS' run: brew install ccache - name: Restore compiler cache (ccache) @@ -384,14 +372,14 @@ jobs: - name: Install aqtinstall run: pipx install aqtinstall - # Resolve given wildcard versions (e.g. Qt 6.6.*) to latest version via aqtinstall to avoid stale caches on new releases - - name: Resolve latest Qt patch version + # Resolve given version (e.g. Qt 6.8, Qt 6) to latest in range via aqtinstall to avoid stale caches on new releases + - name: Resolve latest version for Qt ${{ env.QT_VERSION }} id: resolve_qt_version shell: bash - run: .ci/resolve_latest_aqt_qt_version.sh "${{matrix.qt_version}}" + run: .ci/resolve_latest_aqt_qt_version.sh "${{ env.QT_VERSION }}" - name: Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }} libraries (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' + if: runner.os == 'macOS' id: restore_qt uses: actions/cache/restore@v5 with: @@ -401,39 +389,39 @@ jobs: # Using jurplel/install-qt-action to install Qt without using brew # qt build using vcpkg either just fails or takes too long to build - name: Install fat Qt ${{ steps.resolve_qt_version.outputs.version }} (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + if: runner.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' uses: jurplel/install-qt-action@v4 with: version: ${{ steps.resolve_qt_version.outputs.version }} arch: ${{matrix.qt_arch}} - modules: ${{matrix.qt_modules}} + modules: ${{env.QT_MODULES}} cache: false dir: ${{github.workspace}} - name: Thin Qt libraries (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + if: runner.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' run: .ci/thin_macos_qtlib.sh - name: Cache thin Qt libraries (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + if: runner.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' uses: actions/cache/save@v5 with: path: ${{ github.workspace }}/Qt key: thin-qt-macos-${{ matrix.soc }}-${{ steps.resolve_qt_version.outputs.version }} - - name: Install Qt ${{matrix.qt_version}} (Windows) - if: matrix.os == 'Windows' + - name: Install Qt ${{ steps.resolve_qt_version.outputs.version }} (Windows) + if: runner.os == 'Windows' uses: jurplel/install-qt-action@v4 with: - # qt 6.11.0 only works with aqtinstall directly from git until aqtinstall 3.4 is released + # Qt 6.11.0 only works with aqtinstall directly from git until aqtinstall 3.4 is released aqtsource: git+https://github.com/miurahr/aqtinstall.git version: ${{ steps.resolve_qt_version.outputs.version }} arch: ${{matrix.qt_arch}} - modules: ${{matrix.qt_modules}} + modules: ${{env.QT_MODULES}} cache: true - name: Install NSIS - if: matrix.os == 'Windows' + if: runner.os == 'Windows' shell: bash run: choco install nsis @@ -463,7 +451,6 @@ jobs: MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }} DEVELOPER_DIR: '/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer' TARGET_MACOS_VERSION: ${{ matrix.override_target }} - CCACHE_EVICTION_AGE: ${{ matrix.ccache_eviction_age }} run: .ci/compile.sh --server --test --vcpkg # Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342 @@ -485,7 +472,7 @@ jobs: key: ${{ steps.ccache_restore.outputs.cache-primary-key }} - name: Sign app bundle - if: matrix.os == 'macOS' && matrix.make_package && needs.configure.outputs.tag != null + if: runner.os == 'macOS' && matrix.make_package && needs.configure.outputs.tag != null id: sign_macos env: MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} @@ -539,7 +526,7 @@ jobs: if-no-files-found: error - name: Upload PDBs (Program Databases) - if: matrix.os == 'Windows' && github.ref_type != 'tag' + if: runner.os == 'Windows' && github.ref_type != 'tag' uses: actions/upload-artifact@v7 with: name: ${{steps.build.outputs.name}}-PDBs