|
16 | 16 | os: |
17 | 17 | description: A list of OSes |
18 | 18 | type: string |
19 | | - default: "['Ubuntu', 'Windows']" |
| 19 | + default: "['Windows']" |
20 | 20 | build_type: |
21 | 21 | description: A list of build types |
22 | 22 | type: string |
23 | | - default: "['Debug', 'Release']" |
| 23 | + default: "['Debug']" |
24 | 24 | shared_lib: |
25 | 25 | description: A list of options for building shared library |
26 | 26 | type: string |
27 | | - default: "['ON', 'OFF']" |
| 27 | + default: "['ON']" |
28 | 28 |
|
29 | 29 | permissions: |
30 | 30 | contents: read |
@@ -75,17 +75,29 @@ jobs: |
75 | 75 | - name: Get information about platform |
76 | 76 | if: matrix.os == 'Ubuntu' |
77 | 77 | run: .github/scripts/get_system_info.sh |
| 78 | + |
| 79 | + - name: Restore vcpkg cache |
| 80 | + if: matrix.os == 'Windows' |
| 81 | + uses: actions/cache/restore@v4 |
| 82 | + id: cache-restore |
| 83 | + with: |
| 84 | + path: ${{env.BUILD_DIR}}/cache.zip |
| 85 | + key: reusable-gpu-${{matrix.os}} |
| 86 | + |
| 87 | + - name: Unpack vcpkg cache |
| 88 | + if: steps.cache-restore.outcome.cache-hit == 'true' && matrix.os == 'Windows' |
| 89 | + run: Expand-Archive -Path ${{github.workspace}}/cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force |
78 | 90 |
|
79 | 91 | - name: "[Win] Initialize vcpkg" |
80 | | - if: matrix.os == 'Windows' |
| 92 | + if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows' |
81 | 93 | uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 |
82 | 94 | with: |
83 | 95 | vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025 |
84 | 96 | vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg |
85 | 97 | vcpkgJsonGlob: '**/vcpkg.json' |
86 | 98 |
|
87 | 99 | - name: "[Win] Install dependencies" |
88 | | - if: matrix.os == 'Windows' |
| 100 | + if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows' |
89 | 101 | run: vcpkg install --triplet x64-windows |
90 | 102 |
|
91 | 103 | # note: disable all providers except the one being tested |
@@ -140,6 +152,18 @@ jobs: |
140 | 152 | mkdir -p ${{env.COVERAGE_DIR}} |
141 | 153 | mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} |
142 | 154 |
|
| 155 | + - name: Prepare vcpkg cache |
| 156 | + if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows' |
| 157 | + run: | |
| 158 | + Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg -DestinationPath ${{github.workspace}}/cache.zip -Force |
| 159 | +
|
| 160 | + - name: Cache save |
| 161 | + if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows' |
| 162 | + uses: actions/cache/save@v4 |
| 163 | + with: |
| 164 | + path: ${{github.workspace}}/cache.zip |
| 165 | + key: reusable-gpu-${{matrix.os}} |
| 166 | + |
143 | 167 | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
144 | 168 | if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }} |
145 | 169 | with: |
|
0 commit comments