Skip to content

Commit dc03896

Browse files
ci: bust stale macOS OGRE cache (xcode263) — unblock 3.9.1 macOS deploy (#756)
* ci: bust stale macOS OGRE cache (xcode263) — unblock the macOS deploy The 3.9.1 release deploy failed on build-macos: No rule to make target '.../Xcode_26.5/.../libz.tbd', needed by QtMeshEditor The Pin-Xcode step selects Xcode 26.3 consistently on all macOS jobs, but the OGRE cache under key 'xcode26b' was built earlier under Xcode 26.5 and its CMake export hardcodes 26.5's libz.tbd path. Restoring it into a 26.3 build breaks the link. Bump MACOS_CACHE_VERSION xcode26b → xcode263 so OGRE/Assimp rebuild under the pinned 26.3 and the stale cache is discarded. (Windows + Linux .deb artifacts already published for 3.9.1; this lets the macOS artifact + Homebrew cask update complete on a deploy re-run.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: self-heal macOS OGRE cache across differing per-job Xcode images The real cause of the build-macos libz.tbd failure: the producer (build-n-cache-ogre-macos) and consumer (build-macos) run on DIFFERENT runner images whose "newest Xcode" differs — producer resolved Xcode 26.5 and cached OGRE with 26.5's absolute libz.tbd path baked into its CMake export; consumer resolved 26.3 and linked against the missing 26.5 path. Just pinning "newest" or bumping the cache version doesn't help because the two images disagree. Fix (self-healing): - Fold the resolved Xcode app name into XCODE_TAG and append it to all macOS assimp/ogre cache keys + restore-keys, so a job only restores a cache built under its OWN Xcode. - Give build-macos (consumer) the same "check out + build OGRE on cache miss" steps the producer has. When the consumer's Xcode differs from the producer's (cache miss), it rebuilds OGRE under its own SDK instead of failing on a stale libz.tbd path. This makes the macOS build robust regardless of which Xcode each runner image ships. (Bigger than the earlier one-line bump, but that couldn't fix a cross-image Xcode disagreement.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: keep assimp macOS cache Xcode-agnostic (only ogre is Xcode-keyed) Previous commit Xcode-keyed BOTH the assimp and ogre macOS caches. That broke build-macos on a runner whose Xcode differed from the producer's: assimp cache-missed (no assimp-build-on-miss exists) so find_package(assimp) failed with "Could not find a package configuration file provided by assimp". Assimp is a plain static lib that doesn't bake absolute SDK paths, so one assimp cache is valid across Xcode versions — revert XCODE_TAG on the 3 assimp keys, keeping it ONLY on the 2 ogre keys (ogre's CMake export DOES bake an absolute libz.tbd path, which is why ogre needs per-Xcode keying + the consumer's rebuild-on-miss). The shared assimp cache is then always present for the ogre rebuild to link against. Verified on the failing run: Qt + OGRE now resolve and link (no libz.tbd error); this removes the remaining assimp-not-found failure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: fix flaky MainWindowTest.ModeBarLoadsAndModeChange (show window first) This test failed intermittently on CI (Xvfb) with: Value of: window->m_modeBarShell->isHidden() Actual: true Expected: false The fixture constructs MainWindow but never show()s it. QToolBar::isHidden() reflects effective visibility, which is only realized once the parent window is mapped — so under Xvfb the shell reports hidden and the assertion is racy. It hit BOTH this branch and the unrelated CI-only PR #756 (which has no source changes), confirming it's a pre-existing flake, not a regression. Fix: show() the window and processEvents() before the visibility assertion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: pin SDKROOT so CMake ZLIB resolves under the selected Xcode (macOS) build-macos still failed with the Xcode_26.5 libz.tbd path even after pinning DEVELOPER_DIR=Xcode_26.3 and rebuilding OGRE: CMake's find_package(ZLIB) resolved to the SDK that `xcrun` defaults to (26.5 on these images) rather than the xcode-select'd one, so the OGRE SDK's CMake export baked a 26.5 libz.tbd path that the cache then carried forward. Fix: export SDKROOT (from `xcrun --sdk macosx --show-sdk-path` under the pinned Xcode) in the Pin step, so clang AND CMake resolve system libs under the SAME pinned SDK on every macOS job. Bump MACOS_CACHE_VERSION → sdkpin1 to discard the OGRE caches that still carry the 26.5 path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0b370c9 commit dc03896

2 files changed

Lines changed: 92 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 85 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ env:
2323
ASSIMP_DIR_VERSION: '6.0'
2424
OGRE_VERSION: '14.5.2'
2525
# Bump to bust the macOS assimp/ogre caches. The cached OGRE/Assimp SDKs bake
26-
# absolute Xcode SDK paths (e.g. .../usr/lib/libz.tbd) into their CMake export;
27-
# when the macos-latest runner image bumps Xcode, a stale cache hit makes
28-
# build-macos fail with "No rule to make target '<old-SDK>/libz.tbd'". Bump
29-
# this whenever the runner's Xcode/SDK changes.
30-
MACOS_CACHE_VERSION: 'xcode26b'
26+
# an absolute Xcode SDK path (e.g. .../usr/lib/libz.tbd) into their CMake
27+
# export. The Pin-Xcode step below selects a CONSISTENT Xcode across all macOS
28+
# jobs (currently 26.3), but a cache built earlier under a different Xcode
29+
# (26.5) still carries that old libz.tbd path and, when restored into a 26.3
30+
# build, fails with "No rule to make target '.../Xcode_26.5/...libz.tbd'"
31+
# (this broke the 3.9.1 macOS deploy). Bump this whenever the pinned Xcode
32+
# changes so the SDK is rebuilt against it. (xcode263 = under Pin step Xcode 26.3.)
33+
MACOS_CACHE_VERSION: 'sdkpin1'
3134

3235
jobs:
3336
# send-slack-notification:
@@ -1580,6 +1583,22 @@ jobs:
15801583
echo "Selected Xcode: $DEV"
15811584
sudo xcode-select -s "$DEV"
15821585
echo "DEVELOPER_DIR=$DEV" >> "$GITHUB_ENV"
1586+
# Pin SDKROOT too. xcode-select / DEVELOPER_DIR alone don't stop
1587+
# CMake's find_package(ZLIB) from resolving to whatever SDK `xcrun`
1588+
# defaults to (on these images that was Xcode 26.5 even with 26.3
1589+
# selected), so OGRE's CMake export baked a 26.5 libz.tbd path that
1590+
# then failed to link under 26.3. Exporting SDKROOT makes clang AND
1591+
# CMake resolve system libs under the SAME pinned SDK everywhere.
1592+
SDKROOT_PATH="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
1593+
[ -n "$SDKROOT_PATH" ] && echo "SDKROOT=$SDKROOT_PATH" >> "$GITHUB_ENV"
1594+
echo "Pinned SDKROOT: $SDKROOT_PATH"
1595+
# The per-job runner images can carry DIFFERENT newest Xcodes
1596+
# (e.g. producer image has 26.5, consumer image only 26.3). Fold the
1597+
# resolved Xcode app into the cache key so each job only restores a
1598+
# cache built under its OWN Xcode; build-macos rebuilds OGRE on a
1599+
# miss (steps below) so a mismatch self-heals instead of failing
1600+
# with "No rule to make target '.../Xcode_XX/...libz.tbd'".
1601+
echo "XCODE_TAG=$(basename "$(dirname "$(dirname "$DEV")")")" >> "$GITHUB_ENV"
15831602
15841603
- name: change folder permissions
15851604
run: |
@@ -1603,6 +1622,9 @@ jobs:
16031622
/usr/local/lib/libzlibstatic.a
16041623
#key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/work/QtMeshEditor/QtMeshEditor/assimp') }}
16051624
# Need to delete manually if needed to rebuild. Until I find a better solution for detecting changes in the assimp repo.
1625+
# NOTE: assimp is NOT Xcode-keyed (unlike ogre): it's a plain static lib
1626+
# that doesn't bake absolute SDK paths, so one assimp cache works across
1627+
# Xcode versions and stays shared so the ogre-rebuild-on-miss can use it.
16061628
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}
16071629
restore-keys: |
16081630
${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}-
@@ -1633,6 +1655,22 @@ jobs:
16331655
echo "Selected Xcode: $DEV"
16341656
sudo xcode-select -s "$DEV"
16351657
echo "DEVELOPER_DIR=$DEV" >> "$GITHUB_ENV"
1658+
# Pin SDKROOT too. xcode-select / DEVELOPER_DIR alone don't stop
1659+
# CMake's find_package(ZLIB) from resolving to whatever SDK `xcrun`
1660+
# defaults to (on these images that was Xcode 26.5 even with 26.3
1661+
# selected), so OGRE's CMake export baked a 26.5 libz.tbd path that
1662+
# then failed to link under 26.3. Exporting SDKROOT makes clang AND
1663+
# CMake resolve system libs under the SAME pinned SDK everywhere.
1664+
SDKROOT_PATH="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
1665+
[ -n "$SDKROOT_PATH" ] && echo "SDKROOT=$SDKROOT_PATH" >> "$GITHUB_ENV"
1666+
echo "Pinned SDKROOT: $SDKROOT_PATH"
1667+
# The per-job runner images can carry DIFFERENT newest Xcodes
1668+
# (e.g. producer image has 26.5, consumer image only 26.3). Fold the
1669+
# resolved Xcode app into the cache key so each job only restores a
1670+
# cache built under its OWN Xcode; build-macos rebuilds OGRE on a
1671+
# miss (steps below) so a mismatch self-heals instead of failing
1672+
# with "No rule to make target '.../Xcode_XX/...libz.tbd'".
1673+
echo "XCODE_TAG=$(basename "$(dirname "$(dirname "$DEV")")")" >> "$GITHUB_ENV"
16361674
16371675
- name: change folder permissions
16381676
run: |
@@ -1665,7 +1703,7 @@ jobs:
16651703
cache-name: cache-ogre-macos
16661704
with:
16671705
path: ${{github.workspace}}/ogre/SDK
1668-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}
1706+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}-${{ env.XCODE_TAG }}
16691707

16701708
- if: steps.cache-ogre-macos.outputs.cache-hit != 'true'
16711709
name: Check out ogre repo
@@ -1698,6 +1736,22 @@ jobs:
16981736
echo "Selected Xcode: $DEV"
16991737
sudo xcode-select -s "$DEV"
17001738
echo "DEVELOPER_DIR=$DEV" >> "$GITHUB_ENV"
1739+
# Pin SDKROOT too. xcode-select / DEVELOPER_DIR alone don't stop
1740+
# CMake's find_package(ZLIB) from resolving to whatever SDK `xcrun`
1741+
# defaults to (on these images that was Xcode 26.5 even with 26.3
1742+
# selected), so OGRE's CMake export baked a 26.5 libz.tbd path that
1743+
# then failed to link under 26.3. Exporting SDKROOT makes clang AND
1744+
# CMake resolve system libs under the SAME pinned SDK everywhere.
1745+
SDKROOT_PATH="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
1746+
[ -n "$SDKROOT_PATH" ] && echo "SDKROOT=$SDKROOT_PATH" >> "$GITHUB_ENV"
1747+
echo "Pinned SDKROOT: $SDKROOT_PATH"
1748+
# The per-job runner images can carry DIFFERENT newest Xcodes
1749+
# (e.g. producer image has 26.5, consumer image only 26.3). Fold the
1750+
# resolved Xcode app into the cache key so each job only restores a
1751+
# cache built under its OWN Xcode; build-macos rebuilds OGRE on a
1752+
# miss (steps below) so a mismatch self-heals instead of failing
1753+
# with "No rule to make target '.../Xcode_XX/...libz.tbd'".
1754+
echo "XCODE_TAG=$(basename "$(dirname "$(dirname "$DEV")")")" >> "$GITHUB_ENV"
17011755
17021756
- name: change folder permissions
17031757
run: |
@@ -1761,7 +1815,31 @@ jobs:
17611815
cache-name: cache-ogre-macos
17621816
with:
17631817
path: ${{github.workspace}}/ogre/SDK
1764-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}
1818+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MACOS_CACHE_VERSION }}-${{ env.XCODE_TAG }}
1819+
1820+
# If this runner image's Xcode differs from the one the producer cached
1821+
# under, the key above misses. Rebuild OGRE here under THIS job's Xcode so
1822+
# the SDK's baked libz.tbd path matches what we link against (self-heals the
1823+
# cross-image Xcode mismatch instead of failing on a stale libz.tbd path).
1824+
- if: steps.cache-ogre-macos.outputs.cache-hit != 'true'
1825+
name: Check out ogre repo (cache miss)
1826+
uses: actions/checkout@master
1827+
with:
1828+
repository: OGRECave/ogre
1829+
ref: v${{ env.OGRE_VERSION }}
1830+
path: ${{github.workspace}}/ogre
1831+
1832+
- if: steps.cache-ogre-macos.outputs.cache-hit != 'true'
1833+
name: Build Ogre3D repo (cache miss)
1834+
run: |
1835+
cd ${{github.workspace}}/ogre/
1836+
sudo cmake -S . -DOGRE_BUILD_PLUGIN_ASSIMP=ON -Dassimp_DIR=/usr/local/lib/cmake/assimp-${{ env.ASSIMP_DIR_VERSION }}/ \
1837+
-DOGRE_BUILD_PLUGIN_DOT_SCENE=ON -DOGRE_BUILD_RENDERSYSTEM_GL=ON -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON \
1838+
-DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF -DOGRE_BUILD_TESTS=OFF -DOGRE_BUILD_TOOLS=OFF -DOGRE_BUILD_SAMPLES=OFF \
1839+
-DOGRE_BUILD_COMPONENT_CSHARP=OFF -DOGRE_BUILD_COMPONENT_JAVA=OFF -DOGRE_BUILD_COMPONENT_PYTHON=OFF \
1840+
-DOGRE_INSTALL_TOOLS=OFF -DOGRE_INSTALL_DOCS=OFF -DOGRE_INSTALL_SAMPLES=OFF -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF \
1841+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
1842+
sudo make install -j8
17651843
17661844
- name: Configure CMake
17671845
env:

src/mainwindow_test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ TEST_F(MainWindowTest, ModeBarLoadsAndModeChangeUpdatesStatusIndicator)
282282
ASSERT_EQ(window->m_modeBar->status(), QQuickWidget::Ready);
283283
EXPECT_GE(window->m_modeBar->minimumWidth(), 560);
284284
EXPECT_EQ(window->toolBarArea(window->m_modeBarShell), Qt::TopToolBarArea);
285+
// QToolBar::isHidden() reflects effective visibility, which is only
286+
// meaningful once the parent window has been shown. The fixture constructs
287+
// MainWindow without show()ing it, so under Xvfb this assertion was flaky
288+
// (the shell reports hidden until the window is mapped). Show the window and
289+
// drain events so the toolbar's visibility is realized before asserting.
290+
window->show();
291+
app->processEvents();
285292
EXPECT_FALSE(window->m_modeBarShell->isHidden());
286293
ASSERT_NE(window->m_editModeLabel, nullptr);
287294

0 commit comments

Comments
 (0)