|
6 | 6 | pull_request: |
7 | 7 | types: [opened, synchronize, reopened] |
8 | 8 |
|
| 9 | +env: |
| 10 | + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" |
| 11 | + |
9 | 12 | jobs: |
10 | 13 | build: |
11 | 14 | runs-on: windows-2022 |
12 | 15 | steps: |
13 | | - - name: Build UI Base |
14 | | - id: build-uibase |
15 | | - uses: ModOrganizer2/build-with-mob-action@master |
| 16 | + # https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache |
| 17 | + - name: Export GitHub Actions cache environment variables |
| 18 | + uses: actions/github-script@v7 |
| 19 | + with: |
| 20 | + script: | |
| 21 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 22 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| 23 | +
|
| 24 | + - name: Install Qt |
| 25 | + uses: jurplel/install-qt-action@v3 |
16 | 26 | with: |
17 | | - mo2-third-parties: gtest spdlog boost |
18 | | - mo2-dependencies: cmake_common |
19 | | - mo2-cmake-command: -DUIBASE_TESTS=1 .. |
| 27 | + version: 6.7.0 |
| 28 | + modules: |
| 29 | + cache: true |
20 | 30 |
|
21 | | - - name: Build UI Base Tests |
22 | | - run: cmake --build vsbuild --config RelWithDebInfo -j4 --target uibase-tests |
23 | | - working-directory: ${{ steps.build-uibase.outputs.working-directory }} |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - uses: lukka/run-vcpkg@v11 |
| 33 | + with: |
| 34 | + vcpkgJsonGlob: ${{ github.workspace }}/usvfs/vcpkg.json |
| 35 | + |
| 36 | + - name: Configure UI Base build |
| 37 | + shell: pwsh |
| 38 | + run: cmake --preset vs2022-windows "-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" -DBUILD_TESTING=ON |
| 39 | + |
| 40 | + - name: Build UI Base |
| 41 | + run: cmake --build vsbuild --config RelWithDebInfo --target uibase-tests |
24 | 42 |
|
25 | 43 | - name: Test UI Base |
26 | 44 | run: ctest --test-dir vsbuild -C RelWithDebInfo --output-on-failure |
27 | | - working-directory: ${{ steps.build-uibase.outputs.working-directory }} |
|
0 commit comments