Skip to content

Commit

Permalink
Upgrade workflows to macos-15 and gcc-14
Browse files Browse the repository at this point in the history
Also dropped the about-to-be-deprecated macos-12.

Squashed commit of the following:

commit 17e712b3346ac380132bd50d7071bac9768a1fa8
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 14:36:03 2024 +1000

    Restore the Linux and Windows builds

commit 17a4ddc
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 12:56:41 2024 +1000

    Correct a Qt version number

commit 42e7078
Author: Paul Colby <git@colby.id.au>
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 f668de2
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 12:47:40 2024 +1000

    Restore the remaining macOS builds

commit 965ce30
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 12:46:03 2024 +1000

    Return to the macOS runner's provded CMake

commit 763026a
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 12:45:37 2024 +1000

    Exclude Qt 5.x and 6.2 with Clang on macOS 14+

commit 2887b8f
Author: Paul Colby <git@colby.id.au>
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 e15a9e9
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 11:49:18 2024 +1000

    Enable debugging via Qt's logging rules

commit 48defe8
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 11:40:36 2024 +1000

    Try a completely different test case

    Just to narrow down the test vs framework.

commit f810201
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 11:29:57 2024 +1000

    Correct the path to the test binary

commit d2f3924
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 11:23:43 2024 +1000

    Get more macOS debugging

commit 1e9617b
Author: Paul Colby <git@colby.id.au>
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 309647d
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 10:57:21 2024 +1000

    Get some test debug info on macOS

commit ceb77f9
Author: Paul Colby <git@colby.id.au>
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 ac1ce11
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 10:34:22 2024 +1000

    Use gcov 14 (with gcc 14)

commit b3a4436
Author: Paul Colby <git@colby.id.au>
Date:   Sat Oct 5 10:25:33 2024 +1000

    Disable clang temporarily to test coverage builds

commit 3fc6b7a
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 22:36:02 2024 +1000

    Reinstate the macOS coverage builds

commit fede720
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 22:18:39 2024 +1000

    Restore the macOS clang builds

commit 735ac31
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 22:14:13 2024 +1000

    Skip some superfluous `echo` commands

commit 14dfeb6
Author: Paul Colby <git@colby.id.au>
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 93be4da
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:49:43 2024 +1000

    Correct a step's output access syntax

commit e32b03b
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:39:18 2024 +1000

    Correct the `env.cc` reference

commit d507bb9
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:36:51 2024 +1000

    Restore the Qt 5.10 (QTBUG-66585) exclusion

commit 13c9f71
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:26:58 2024 +1000

    Correct workflow property name

commit 3f7365b
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:25:17 2024 +1000

    Correct a variable name

commit 4730ac1
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 21:23:01 2024 +1000

    Exclude macOS 14+ w/ gcc w/ Qt <6.2

commit aeae589
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 20:50:33 2024 +1000

    See if *any* gcc builds will pass on macOS 13+

commit ca87858
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 20:46:24 2024 +1000

    Derive the build ID's arch from the target archs

commit a337881
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 20:37:14 2024 +1000

    Remove the early exit

commit 51ffc8b
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 20:23:07 2024 +1000

    Correct the arch handling for gcc

commit f7f58ef
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 19:58:07 2024 +1000

    Choose the best available macOS arch

commit 271da5c
Author: Paul Colby <git@colby.id.au>
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 b342e39
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 18:38:57 2024 +1000

    Disable gcov builds for now

commit 2fa12aa
Author: Paul Colby <git@colby.id.au>
Date:   Fri Oct 4 16:54:46 2024 +1000

    Try Qt's own CMake version

commit d715bb6
Author: Paul Colby <git@colby.id.au>
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 40d1901
Author: Paul Colby <git@colby.id.au>
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 actions/runner-images#10721
  • Loading branch information
pcolby committed Oct 5, 2024
1 parent 3c5d461 commit 7d2d077
Showing 1 changed file with 62 additions and 35 deletions.
97 changes: 62 additions & 35 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:

mac:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 7d2d077

Please sign in to comment.