diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c634868..c41ba4c 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -85,6 +85,25 @@ jobs: - name: Configure, build, test, verify run: .gitea/scripts/macos-build.sh + - name: Drop non-relocatable OBS build tree before caching + # cmake/common/buildspec_common.cmake's obs-studio sub-build writes + # an out-of-source CMakeCache.txt (.deps/obs-studio-*/build_*) that + # bakes in this job's absolute checkout path. The next run's + # checkout lands at a *different* absolute path, so restoring that + # directory from the cache above makes CMake refuse to reconfigure + # it ("CMakeCache.txt directory ... is different than the directory + # ... where CMakeCache.txt was created"). Everything that actually + # needs to survive between runs -- the extracted source, and the + # already-installed libobs package under .deps/cmake, .deps/include, + # .deps/lib -- has no such path baked in and is unaffected. Delete + # only the intermediate build tree, after it has already done its + # job (libobs is built and installed by this point), so the cache + # saved at the end of this job contains nothing that requires the + # path it was created under. + if: always() + continue-on-error: true + run: rm -rf .deps/obs-studio-*/build_* + - name: Upload plugin continue-on-error: true uses: actions/upload-artifact@v3 @@ -123,6 +142,22 @@ jobs: shell: powershell run: ./.gitea/scripts/windows-build.ps1 + - name: Drop non-relocatable OBS build tree before caching + # See the matching step in the macOS job above. Confirmed live on + # this runner: caching .deps/obs-studio-30.0.2/build_x86 as-is made + # every run's first configure attempt fail with a path mismatch + # against the job that populated the cache, falling back to + # -DSTPLUGIN_BOOTSTRAP_OBS=OFF and only succeeding because the + # already-installed libobs package (path-independent) was still + # found. That fallback masked the problem behind a misleading + # "::warning::OBS SDK bootstrap failed" every run instead of fixing + # it. Deleting the build tree here, after libobs is already built + # and installed, is the actual fix. + if: always() + continue-on-error: true + shell: powershell + run: Remove-Item -Recurse -Force .deps\obs-studio-*\build_* -ErrorAction SilentlyContinue + - name: Upload plugin continue-on-error: true uses: actions/upload-artifact@v3