From 516fae58a97f23688daa9f99d30e79e366c4909f Mon Sep 17 00:00:00 2001 From: Diveyam Mishra Date: Tue, 15 Sep 2026 23:46:56 +0530 Subject: [PATCH] GH-51335: [CI][MATLAB] Fix post-cache failure on Windows 2022 MATLAB --- .github/workflows/matlab.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matlab.yml b/.github/workflows/matlab.yml index a65279b780ef..8154dbc478b0 100644 --- a/.github/workflows/matlab.yml +++ b/.github/workflows/matlab.yml @@ -74,7 +74,7 @@ jobs: uses: actions/cache@v6 with: path: ${{ steps.ccache-info.outputs.cache-dir }} - key: matlab-ccache-ubuntu-${{ hashFiles('cpp/**', 'matlab/**') }} + key: matlab-ccache-ubuntu-${{ hashFiles('cpp/**', 'matlab/CMakeLists.txt', 'matlab/src/**', 'matlab/test/**', 'matlab/tools/**') }} restore-keys: matlab-ccache-ubuntu- - name: Build MATLAB Interface run: ci/scripts/matlab_build.sh $(pwd) @@ -123,7 +123,7 @@ jobs: uses: actions/cache@v6 with: path: ${{ steps.ccache-info.outputs.cache-dir }} - key: matlab-ccache-macos-${{ hashFiles('cpp/**', 'matlab/**') }} + key: matlab-ccache-macos-${{ hashFiles('cpp/**', 'matlab/CMakeLists.txt', 'matlab/src/**', 'matlab/test/**', 'matlab/tools/**') }} restore-keys: matlab-ccache-macos- - name: Build MATLAB Interface run: ci/scripts/matlab_build.sh $(pwd) @@ -165,7 +165,7 @@ jobs: with: path: | ${{ steps.ccache-info.outputs.cache-dir }} - key: matlab-ccache-windows-${{ hashFiles('cpp/**', 'matlab/**') }} + key: matlab-ccache-windows-${{ hashFiles('cpp/**', 'matlab/CMakeLists.txt', 'matlab/src/**', 'matlab/test/**', 'matlab/tools/**') }} restore-keys: matlab-ccache-windows- - name: Build MATLAB Interface shell: cmd @@ -181,3 +181,10 @@ jobs: with: select-by-folder: matlab/test strict: true + - name: Clean up compiler processes and build directory + if: always() + shell: cmd + run: | + taskkill /F /IM mspdbsrv.exe /IM vctip.exe 2>nul || exit 0 + if exist matlab\build rmdir /s /q matlab\build 2>nul || exit 0 +