verify.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. name: 'yuzu verify'
  2. on:
  3. pull_request:
  4. branches: [ master ]
  5. jobs:
  6. format:
  7. name: 'verify format'
  8. runs-on: ubuntu-latest
  9. container:
  10. image: yuzuemu/build-environments:linux-clang-format
  11. options: -u 1001
  12. steps:
  13. - uses: actions/checkout@v2
  14. with:
  15. submodules: false
  16. - name: 'Verify Formatting'
  17. run: bash -ex ./.ci/scripts/format/script.sh
  18. build:
  19. name: 'test build'
  20. needs: format
  21. runs-on: ubuntu-latest
  22. strategy:
  23. fail-fast: false
  24. matrix:
  25. include:
  26. - type: clang
  27. image: linux-fresh
  28. - type: linux
  29. image: linux-fresh
  30. - type: windows
  31. image: linux-mingw
  32. container:
  33. image: yuzuemu/build-environments:${{ matrix.image }}
  34. options: -u 1001
  35. steps:
  36. - uses: actions/checkout@v2
  37. with:
  38. submodules: recursive
  39. fetch-depth: 0
  40. - name: Set up cache
  41. uses: actions/cache@v2
  42. id: ccache-restore
  43. with:
  44. path: ~/.ccache
  45. key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
  46. restore-keys: |
  47. ${{ runner.os }}-${{ matrix.type }}-
  48. - name: Create ccache directory
  49. if: steps.ccache-restore.outputs.cache-hit != 'true'
  50. run: mkdir -p ~/.ccache
  51. - name: Build
  52. run: ./.ci/scripts/${{ matrix.type }}/docker.sh
  53. env:
  54. ENABLE_COMPATIBILITY_REPORTING: "ON"
  55. build-msvc:
  56. name: 'test build (windows, msvc)'
  57. needs: format
  58. runs-on: windows-2019
  59. steps:
  60. - name: Set up cache
  61. uses: actions/cache@v2
  62. with:
  63. path: ~/.buildcache
  64. key: ${{ runner.os }}-msvc-${{ github.sha }}
  65. restore-keys: |
  66. ${{ runner.os }}-msvc-
  67. - name: Install dependencies
  68. shell: cmd
  69. run: |
  70. choco install vulkan-sdk wget
  71. python -m pip install --upgrade pip conan
  72. call refreshenv
  73. wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
  74. 7z x buildcache-windows.zip
  75. copy buildcache\bin\buildcache.exe C:\ProgramData\chocolatey\bin
  76. rmdir buildcache
  77. echo %PATH% >> %GITHUB_PATH%
  78. - name: Set up MSVC
  79. uses: ilammy/msvc-dev-cmd@v1
  80. - uses: actions/checkout@v2
  81. with:
  82. submodules: recursive
  83. fetch-depth: 0
  84. - name: Configure
  85. env:
  86. CC: cl.exe
  87. CXX: cl.exe
  88. run: |
  89. glslangValidator --version
  90. mkdir build
  91. 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
  92. - name: Build
  93. run: cmake --build build
  94. - name: Cache Summary
  95. run: buildcache -s