summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorGravatar liushuyu2021-12-23 18:23:02 -0700
committerGravatar liushuyu2022-07-04 21:21:56 -0600
commit40493231edad7085544b79b6c3ac7360d112170c (patch)
tree5124d6fde6ca6b913c13aca60620c134e3bcf3f1 /.github
parentCI: use Ninja to build stuff faster (diff)
downloadyuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.gz
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.xz
yuzu-40493231edad7085544b79b6c3ac7360d112170c.zip
CI: fix caching
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/verify.yml51
1 files changed, 48 insertions, 3 deletions
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index e601ecd40..d26ebc3ac 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -6,7 +6,7 @@ on:
6 6
7jobs: 7jobs:
8 format: 8 format:
9 name: 'verify formatting' 9 name: 'verify format'
10 runs-on: ubuntu-latest 10 runs-on: ubuntu-latest
11 container: 11 container:
12 image: yuzuemu/build-environments:linux-clang-format 12 image: yuzuemu/build-environments:linux-clang-format
@@ -41,12 +41,57 @@ jobs:
41 fetch-depth: 0 41 fetch-depth: 0
42 - name: Set up cache 42 - name: Set up cache
43 uses: actions/cache@v2 43 uses: actions/cache@v2
44 id: ccache-restore
44 with: 45 with:
45 path: ~/.ccache 46 path: ~/.ccache
46 key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }} 47 key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
47 restore-keys: | 48 restore-keys: |
48 ${{ runner.os }}-${{ matrix.image }}- 49 ${{ runner.os }}-${{ matrix.type }}-
50 - name: Create ccache directory
51 if: steps.ccache-restore.outputs.cache-hit != 'true'
52 run: mkdir -p ~/.ccache
49 - name: Build 53 - name: Build
50 run: ./.ci/scripts/${{ matrix.type }}/docker.sh 54 run: ./.ci/scripts/${{ matrix.type }}/docker.sh
51 env: 55 env:
52 ENABLE_COMPATIBILITY_REPORTING: "ON" 56 ENABLE_COMPATIBILITY_REPORTING: "ON"
57 build-msvc:
58 name: 'test build (windows, msvc)'
59 needs: format
60 runs-on: windows-2019
61 steps:
62 - name: Set up cache
63 uses: actions/cache@v2
64 with:
65 path: ~/.buildcache
66 key: ${{ runner.os }}-msvc-${{ github.sha }}
67 restore-keys: |
68 ${{ runner.os }}-msvc-
69 - name: Install dependencies
70 shell: cmd
71 run: |
72 choco install vulkan-sdk wget
73 python -m pip install --upgrade pip conan
74 call refreshenv
75 wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
76 7z x buildcache-windows.zip
77 copy buildcache\bin\buildcache.exe C:\ProgramData\chocolatey\bin
78 rmdir buildcache
79 echo %PATH% >> %GITHUB_PATH%
80 - name: Set up MSVC
81 uses: ilammy/msvc-dev-cmd@v1
82 - uses: actions/checkout@v2
83 with:
84 submodules: recursive
85 fetch-depth: 0
86 - name: Configure
87 env:
88 CC: cl.exe
89 CXX: cl.exe
90 run: |
91 glslangValidator --version
92 mkdir build
93 cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release
94 - name: Build
95 run: cmake --build build
96 - name: Cache Summary
97 run: buildcache -s