From 7d2d077dcecff194c08fa0b1c9144c624b1862e3 Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Sat, 5 Oct 2024 14:36:37 +1000 Subject: [PATCH] Upgrade workflows to macos-15 and gcc-14 Also dropped the about-to-be-deprecated macos-12. Squashed commit of the following: commit 17e712b3346ac380132bd50d7071bac9768a1fa8 Author: Paul Colby Date: Sat Oct 5 14:36:03 2024 +1000 Restore the Linux and Windows builds commit 17a4ddc01e9e729dfbf12c890bfa78b22bb663bc Author: Paul Colby Date: Sat Oct 5 12:56:41 2024 +1000 Correct a Qt version number commit 42e707836a769ccaa142872b1ae73d2a57fe27d5 Author: Paul Colby Date: Sat Oct 5 12:54:49 2024 +1000 Extend the macOS timeout to 15 minutes Sometimes they take a bit longer to build. commit f668de288f8e53abbc2d98ebd15bb318f8616171 Author: Paul Colby Date: Sat Oct 5 12:47:40 2024 +1000 Restore the remaining macOS builds commit 965ce308b204c45496003e8ba640a3c5f05a1ade Author: Paul Colby Date: Sat Oct 5 12:46:03 2024 +1000 Return to the macOS runner's provded CMake commit 763026a4a546169a49cf135988d32afcaad2f07a Author: Paul Colby Date: Sat Oct 5 12:45:37 2024 +1000 Exclude Qt 5.x and 6.2 with Clang on macOS 14+ commit 2887b8fafd09a30ffd5718279a34d351757962f4 Author: Paul Colby Date: Sat Oct 5 12:01:36 2024 +1000 Determine which combinations are actually hanging So we can simply exclude them for now, subject to further testing on local hardware. commit e15a9e98ad2b0be2c408c79eedc741858a86a5b2 Author: Paul Colby Date: Sat Oct 5 11:49:18 2024 +1000 Enable debugging via Qt's logging rules commit 48defe83f7a11136203ab5b21956dca3fb9848d6 Author: Paul Colby Date: Sat Oct 5 11:40:36 2024 +1000 Try a completely different test case Just to narrow down the test vs framework. commit f8102019941b1a9b2a1af4994ea7f4eba71e8ddd Author: Paul Colby Date: Sat Oct 5 11:29:57 2024 +1000 Correct the path to the test binary commit d2f3924d38ebc464b925b47001c0877043800d4f Author: Paul Colby Date: Sat Oct 5 11:23:43 2024 +1000 Get more macOS debugging commit 1e9617b934e9d0a3268fd9398faeaba8fd02ab0e Author: Paul Colby Date: Sat Oct 5 11:17:39 2024 +1000 Reduce the timeout on macOS builds The default is 360 minutes, but the macOS jobs take ~5 minutes. commit 309647d5ad480d0a64cae2168bd7b3afbf8cba19 Author: Paul Colby Date: Sat Oct 5 10:57:21 2024 +1000 Get some test debug info on macOS commit ceb77f989fdf6bd7b04eb0efc907d8935110659c Author: Paul Colby Date: Sat Oct 5 10:50:16 2024 +1000 Clarify some comments Based on the info in this Qt blog post: https://www.qt.io/blog/qt-on-apple-silicon commit ac1ce117c699146d8fa19657918b1ebed303c454 Author: Paul Colby Date: Sat Oct 5 10:34:22 2024 +1000 Use gcov 14 (with gcc 14) commit b3a4436a015185a0fba734ccb68155559cddfaa7 Author: Paul Colby Date: Sat Oct 5 10:25:33 2024 +1000 Disable clang temporarily to test coverage builds commit 3fc6b7a96c10c4299805313389cabb6c4f821bdb Author: Paul Colby Date: Fri Oct 4 22:36:02 2024 +1000 Reinstate the macOS coverage builds commit fede72011afef9a7b3d2d9c9696d9df3cd279f74 Author: Paul Colby Date: Fri Oct 4 22:18:39 2024 +1000 Restore the macOS clang builds commit 735ac3149ad38ff84723d8159caf1d32431f2316 Author: Paul Colby Date: Fri Oct 4 22:14:13 2024 +1000 Skip some superfluous `echo` commands commit 14dfeb6b5b600c8cc16965a1682431d7bec43149 Author: Paul Colby Date: Fri Oct 4 22:07:38 2024 +1000 Reinstace the Qt6 macOS gcc exclusions Since every one of those is still affected by QTBUG-107050. See https://bugreports.qt.io/browse/QTBUG-107050 commit 93be4daf74e4627bef25ba4a59bbc3a478115ba0 Author: Paul Colby Date: Fri Oct 4 21:49:43 2024 +1000 Correct a step's output access syntax commit e32b03b6a3cf7cf2de538436ab0f3e3b1294741e Author: Paul Colby Date: Fri Oct 4 21:39:18 2024 +1000 Correct the `env.cc` reference commit d507bb98ce59e78948b27c7afa955db311881f0f Author: Paul Colby Date: Fri Oct 4 21:36:51 2024 +1000 Restore the Qt 5.10 (QTBUG-66585) exclusion commit 13c9f718060960cd23cc4427f0054e77cda3e438 Author: Paul Colby Date: Fri Oct 4 21:26:58 2024 +1000 Correct workflow property name commit 3f7365b728f9303febea22928fa14433f34d2bda Author: Paul Colby Date: Fri Oct 4 21:25:17 2024 +1000 Correct a variable name commit 4730ac13e65fd29ddb5dcf0e9ab97501d75be950 Author: Paul Colby Date: Fri Oct 4 21:23:01 2024 +1000 Exclude macOS 14+ w/ gcc w/ Qt <6.2 commit aeae5890bc518778bcb9569bc0ed820e8148f086 Author: Paul Colby Date: Fri Oct 4 20:50:33 2024 +1000 See if *any* gcc builds will pass on macOS 13+ commit ca878582b55f0021d51a97c9f3b77581d69d60ec Author: Paul Colby Date: Fri Oct 4 20:46:24 2024 +1000 Derive the build ID's arch from the target archs commit a337881aacd77098578245e3b239236ab2ca1354 Author: Paul Colby Date: Fri Oct 4 20:37:14 2024 +1000 Remove the early exit commit 51ffc8b452b347c9ee5fe5cd0dc799c6c0a0d96d Author: Paul Colby Date: Fri Oct 4 20:23:07 2024 +1000 Correct the arch handling for gcc commit f7f58eff6fbb01cfd270cb3a1aba34c6d42aa70d Author: Paul Colby Date: Fri Oct 4 19:58:07 2024 +1000 Choose the best available macOS arch commit 271da5ce496355d93a8a8e3e157b0524b64ba349 Author: Paul Colby Date: Fri Oct 4 19:30:13 2024 +1000 Assign CMAKE_OSX_ARCHITECTURES in its own step So we can add more logic to it shortly. commit b342e394065d9fe3001c181f7a686e6e7bdb7803 Author: Paul Colby Date: Fri Oct 4 18:38:57 2024 +1000 Disable gcov builds for now commit 2fa12aa4a725e6d50254751c9ba4947f85c0a826 Author: Paul Colby Date: Fri Oct 4 16:54:46 2024 +1000 Try Qt's own CMake version commit d715bb6cc5aace45d3bdedf8058767e5bb746f47 Author: Paul Colby Date: Fri Oct 4 16:11:13 2024 +1000 Disable Linux and Windows builds for now Just to speed up testing macOS on GitHub runners. commit 40d1901deca9679e44912237b4a6ab13fce8cbb6 Author: Paul Colby Date: Fri Oct 4 14:07:51 2024 +1000 Try macos-15, and gcc-14 on macos runners Because GitHub is about to deprecate macos-12, and macos-15 is about to leave beta. See https://github.com/actions/runner-images/issues/10721 --- .github/workflows/build.yaml | 97 +++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 062431854..09fb668fe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -135,6 +135,7 @@ jobs: mac: runs-on: ${{ matrix.os }} + timeout-minutes: 15 strategy: fail-fast: false matrix: @@ -153,42 +154,55 @@ jobs: - 6.6.3 - 6.7.3 - 6.8.0 - os: [ 'macos-12', 'macos-13', 'macos-14' ] + os: [ 'macos-13', 'macos-14', 'macos-15' ] env: - { cc: clang, cxx: clang++, coverage: false } - - { cc: gcc-12, cxx: g++-12, coverage: false } - - { cc: gcc-12, cxx: g++-12, coverage: true } + - { cc: gcc-14, cxx: g++-14, coverage: false } + - { cc: gcc-14, cxx: g++-14, coverage: true } exclude: - # Exclude Qt 5.x with GCC on macOS 13 (Qt5 only officially supports up to macOS 12). - - { qt: '5.9.9', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.10.1', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.11.3', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.12.12', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.13.2', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.14.2', os: 'macos-13', env: { cc: gcc-12 } } - - { qt: '5.15.2', os: 'macos-13', env: { cc: gcc-12 } } - # Exclude Qt 5.x on macOS 14+ (Qt5 only officially supports up to macOS 12). - - { qt: '5.9.9', os: 'macos-14' } - - { qt: '5.10.1', os: 'macos-14' } - - { qt: '5.11.3', os: 'macos-14' } - - { qt: '5.12.12', os: 'macos-14' } - - { qt: '5.13.2', os: 'macos-14' } - - { qt: '5.14.2', os: 'macos-14' } - - { qt: '5.15.2', os: 'macos-14' } - # Exclude Qt 6.2 on macOS 14+ (Qt6 only officially supports macOS 14 from Qt 6.4+, and some 6.2.n LTS update). - - { qt: '6.2.4', os: 'macos-14' } + # GitHub's macOS 14+ gcc can only target arm64, but Qt didn't add Apple arm64 support until Qt 6.2, so: + # Exclude Qt 5.x (and 6.0, 6.1) with GCC on macOS 14+. Also see the `arch` step below for more details. + - { qt: '5.9.9', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.9.9', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.10.1', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.10.1', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.11.3', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.11.3', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.12.12', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.12.12', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.13.2', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.13.2', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.14.2', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.14.2', os: macos-15, env: { cc: gcc-14 } } + - { qt: '5.15.2', os: macos-14, env: { cc: gcc-14 } } + - { qt: '5.15.2', os: macos-15, env: { cc: gcc-14 } } + # Exclude Qt 5.x and 6.2 with Clang on macOS 14+, since these have unit tests that hang on GitHub's runners. + - { qt: '5.9.9', os: macos-14, env: { cc: clang } } # \todo Explore these hangs on a local macOS host, + - { qt: '5.9.9', os: macos-15, env: { cc: clang } } # \todo because they might not be specific to GitHub. + - { qt: '5.10.1', os: macos-14, env: { cc: clang } } + - { qt: '5.10.1', os: macos-15, env: { cc: clang } } + - { qt: '5.11.3', os: macos-14, env: { cc: clang } } + - { qt: '5.11.3', os: macos-15, env: { cc: clang } } + - { qt: '5.12.12', os: macos-14, env: { cc: clang } } + - { qt: '5.12.12', os: macos-15, env: { cc: clang } } + - { qt: '5.13.2', os: macos-14, env: { cc: clang } } + - { qt: '5.13.2', os: macos-15, env: { cc: clang } } + - { qt: '5.14.2', os: macos-14, env: { cc: clang } } + - { qt: '5.14.2', os: macos-15, env: { cc: clang } } + - { qt: '5.15.2', os: macos-14, env: { cc: clang } } + - { qt: '5.15.2', os: macos-15, env: { cc: clang } } + - { qt: '6.2.4', os: macos-14, env: { cc: clang } } + - { qt: '6.2.4', os: macos-15, env: { cc: clang } } # Exclude Qt 5.10 with GCC on macOS. See https://bugreports.qt.io/browse/QTBUG-66585 - - { qt: '5.10.1', env: { cc: gcc-12 } } - # Exclude Qt6 with GCC on macOS for now, as GCC (only) has lots of false compiler - # errors, that even if worked-around result in SIGBUS errors in unit tests. See - # https://bugreports.qt.io/browse/QTBUG-107050 (non-exhaustive). - - { qt: '6.2.4', env: { cc: gcc-12 } } - - { qt: '6.3.2', env: { cc: gcc-12 } } - - { qt: '6.4.3', env: { cc: gcc-12 } } - - { qt: '6.5.3', env: { cc: gcc-12 } } - - { qt: '6.6.3', env: { cc: gcc-12 } } - - { qt: '6.7.3', env: { cc: gcc-12 } } - - { qt: '6.8.0', env: { cc: gcc-12 } } + - { qt: '5.10.1', env: { cc: gcc-14 } } + # Exclude Qt 6.x with GCC on macOS for now. See https://bugreports.qt.io/browse/QTBUG-107050 + - { qt: '6.2.4', env: { cc: gcc-14 } } + - { qt: '6.3.2', env: { cc: gcc-14 } } + - { qt: '6.4.3', env: { cc: gcc-14 } } + - { qt: '6.5.3', env: { cc: gcc-14 } } + - { qt: '6.6.3', env: { cc: gcc-14 } } + - { qt: '6.7.3', env: { cc: gcc-14 } } + - { qt: '6.8.0', env: { cc: gcc-14 } } steps: - uses: actions/checkout@v4 - name: Install lcov @@ -208,16 +222,28 @@ jobs: name: aqtinstall-log-${{ matrix.os }}-${{ matrix.env.cc }}-${{ matrix.qt }}${{ matrix.env.coverage && '-cov' || ''}} path: aqtinstall.log if-no-files-found: error + - name: Choose target architectures + id: arch + run: | + # Qt only supports x86-64 (not arm64) on macOS prior to Qt 6.2.0. See https://www.qt.io/blog/qt-on-apple-silicon + if [[ '${{ matrix.qt }}' =~ ^(5|6\.[01])\. ]]; then arch=x86_64 + # GitHub runners' (homebrew'd) gcc's only support support x86-64 prior to macos-14, and only arm64 after. + # Note: if we attempt to use multiple archs, gcc will warn, but continue, resulting in later failures. + elif [[ '${{ matrix.env.cc }}' == gcc-* ]]; then + if [[ '${{ matrix.os }}' == 'macos-13' ]]; then arch='x86_64'; else arch='arm64'; fi + # Otherwise, default to universal binaries, where possible. + else arch='arm64;x86_64'; fi + tee -a "$GITHUB_ENV" <<< "CMAKE_OSX_ARCHITECTURES=${arch}" + tee -a "$GITHUB_OUTPUT" <<< "buildId=${arch//;/-}" - name: Build id: build env: CC: ${{ matrix.env.cc }} CXX: ${{ matrix.env.cxx }} - CMAKE_OSX_ARCHITECTURES: ${{ startsWith(matrix.qt, '6') && 'arm64;' || '' }}x86_64 - PROJECT_BUILD_ID: ${{ github.run_number }}.${{ matrix.os }}.${{ startsWith(matrix.qt, '6') && 'arm64-' || '' }}x86_64.${{ matrix.env.cc }}${{ matrix.env.coverage && '-cov' || '' }}.qt-${{ matrix.qt }} + PROJECT_BUILD_ID: ${{ github.run_number }}.${{ matrix.os }}.${{ steps.arch.outputs.buildId }}.${{ matrix.env.cc }}${{ matrix.env.coverage && '-cov' || '' }}.qt-${{ matrix.qt }} run: | cmake -D CMAKE_BUILD_TYPE=Release \ - -D CODECOV_GCOV=${{ startsWith(matrix.env.cc, 'gcc') && '/usr/local/bin/gcov-12' || '/usr/bin/gcov'}} \ + -D CODECOV_GCOV=${{ startsWith(matrix.env.cc, 'gcc') && '/usr/local/bin/gcov-14' || '/usr/bin/gcov'}} \ -D ENABLE_COVERAGE=${{ matrix.env.coverage }} \ -D QT_INSTALL_DOCS="$RUNNER_WORKSPACE/Qt/Docs/Qt-${{ matrix.qt }}" \ -S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP" @@ -229,6 +255,7 @@ jobs: "$RUNNER_TEMP/src/cli/dokit.app/Contents/MacOS/dokit" --version - name: Test run: ctest --output-on-failure --test-dir "$RUNNER_TEMP" --verbose + timeout-minutes: 1 - name: Collate test coverage if: matrix.env.coverage run: cmake --build "$RUNNER_TEMP" --target coverage