verify.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. - name: Pack
  56. run: ./.ci/scripts/${{ matrix.type }}/upload.sh
  57. env:
  58. NO_SOURCE_PACK: "YES"
  59. - name: Upload
  60. uses: actions/upload-artifact@v3
  61. with:
  62. name: ${{ matrix.type }}
  63. path: artifacts/
  64. build-msvc:
  65. name: 'test build (windows, msvc)'
  66. needs: format
  67. runs-on: windows-2019
  68. steps:
  69. - name: Set up cache
  70. uses: actions/cache@v2
  71. with:
  72. path: ~/.buildcache
  73. key: ${{ runner.os }}-msvc-${{ github.sha }}
  74. restore-keys: |
  75. ${{ runner.os }}-msvc-
  76. - name: Install dependencies
  77. # due to how chocolatey works, only cmd.exe is supported here
  78. shell: cmd
  79. run: |
  80. choco install vulkan-sdk wget
  81. python -m pip install --upgrade pip conan
  82. call refreshenv
  83. wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
  84. 7z x buildcache-windows.zip
  85. copy buildcache\bin\buildcache.exe C:\ProgramData\chocolatey\bin
  86. rmdir buildcache
  87. echo %PATH% >> %GITHUB_PATH%
  88. - name: Set up MSVC
  89. uses: ilammy/msvc-dev-cmd@v1
  90. - uses: actions/checkout@v2
  91. with:
  92. submodules: recursive
  93. fetch-depth: 0
  94. - name: Configure
  95. env:
  96. CC: cl.exe
  97. CXX: cl.exe
  98. run: |
  99. glslangValidator --version
  100. mkdir build
  101. 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
  102. - name: Build
  103. run: cmake --build build
  104. - name: Cache Summary
  105. run: buildcache -s
  106. - name: Pack
  107. shell: pwsh
  108. run: .\.ci\scripts\windows\upload.ps1
  109. - name: Upload
  110. uses: actions/upload-artifact@v3
  111. with:
  112. name: msvc
  113. path: artifacts/