File tree Expand file tree Collapse file tree 3 files changed +43
-5
lines changed
Expand file tree Collapse file tree 3 files changed +43
-5
lines changed Original file line number Diff line number Diff line change 2222 - uses : actions/checkout@v4
2323
2424 - name : Cache VCPKG
25- uses : action /cache@v4
25+ uses : actions /cache@v4
2626 with :
2727 path : |
2828 ${{ env.VCPKG_ROOT }}/installed
3333 restore-keys : ${{ runner.os }}-vcpkg-
3434
3535 - name : Cache build
36- uses : action /cache@v4
36+ uses : actions /cache@v4
3737 with :
3838 path : |
3939 build/${{ matrix.preset }}
Original file line number Diff line number Diff line change @@ -25,11 +25,30 @@ jobs:
2525 steps :
2626 - uses : actions/checkout@v4
2727
28+ - name : Cache VCPKG
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ${{ env.VCPKG_ROOT }}/installed
33+ ${{ env.VCPKG_ROOT }}/buildtrees
34+ ${{ env.VCPKG_ROOT }}/packages
35+ ~/.cache/vcpkg
36+ key : ${{ runner.os }}-vcpkg-${{ matrix.preset }}-${{ hashFiles('vcpkg.json') }}
37+ restore-keys : ${{ runner.os }}-vcpkg-
38+
39+ - name : Cache build
40+ uses : actions/cache@v4
41+ with :
42+ path : |
43+ build/${{ matrix.preset }}
44+ key : ${{ runner.os }}-cmake-${{ matrix.preset }}-${{ hashFiles('CMakeLists.txt', '**/*.cmake') }}
45+ restore-keys : ${{ runner.os }}-cmake-
46+
2847 - name : Configure (${{ matrix.preset }})
2948 run : |
3049 set +e
3150 cmake --preset ${{ matrix.preset }} 2>&1 | tee configure_output.txt
32- CONFIGURE_EXIT_CODE=$?
51+ CONFIGURE_EXIT_CODE=${PIPESTATUS[0]} # Capture CMake exit code, not tee
3352 set -e
3453
3554 if [ $CONFIGURE_EXIT_CODE -eq 0 ]; then
5170 run : |
5271 set +e
5372 cmake --build --preset ${{ matrix.preset }} 2>&1 | tee build_output.txt
54- BUILD_EXIT_CODE=$?
73+ BUILD_EXIT_CODE=${PIPESTATUS[0]} # Capture CMake exit code, not tee
5574 set -e
5675
5776 if [ $BUILD_EXIT_CODE -eq 0 ]; then
7392 run : |
7493 set +e
7594 ctest --preset ${{ matrix.preset }} --output-on-failure 2>&1 | tee test_output.txt
76- TEST_EXIT_CODE=$?
95+ TEST_EXIT_CODE=${PIPESTATUS[0]} # Capture CMake exit code, not tee
7796 set -e
7897
7998 if [ $TEST_EXIT_CODE -eq 0 ]; then
Original file line number Diff line number Diff line change 1515 steps :
1616 - uses : actions/checkout@v4
1717
18+ - name : Cache VCPKG
19+ uses : actions/cache@v4
20+ with :
21+ path : |
22+ C:\vcpkg\installed
23+ C:\vcpkg\packages
24+ C:\vcpkg\buildtrees
25+ ~\AppData\Local\vcpkg\archives
26+ key : ${{ runner.os }}-vcpkg-${{ matrix.preset }}-${{ hashFiles('vcpkg.json') }}
27+ restore-keys : ${{ runner.os }}-vcpkg-
28+
29+ - name : Cache build
30+ uses : actions/cache@v4
31+ with :
32+ path : |
33+ build/${{ matrix.preset }}
34+ key : ${{ runner.os }}-cmake-${{ matrix.preset }}-${{ hashFiles('CMakeLists.txt', '**/*.cmake') }}
35+ restore-keys : ${{ runner.os }}-cmake-
36+
1837 - name : Configure (${{ matrix.preset }})
1938 env :
2039 VCPKG_ROOT : C:\vcpkg
You can’t perform that action at this time.
0 commit comments