verify.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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@v3
  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@v3
  37. with:
  38. submodules: recursive
  39. fetch-depth: 0
  40. - name: Set up cache
  41. uses: actions/cache@v3
  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@v3
  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. call refreshenv
  82. wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
  83. 7z x buildcache-windows.zip
  84. copy buildcache\bin\buildcache.exe C:\ProgramData\chocolatey\bin
  85. rmdir buildcache
  86. echo %PATH% >> %GITHUB_PATH%
  87. - name: Set up MSVC
  88. uses: ilammy/msvc-dev-cmd@v1
  89. - uses: actions/checkout@v3
  90. with:
  91. submodules: recursive
  92. fetch-depth: 0
  93. - name: Configure
  94. env:
  95. CC: cl.exe
  96. CXX: cl.exe
  97. run: |
  98. glslangValidator --version
  99. mkdir build
  100. 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 -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
  101. - name: Build
  102. run: cmake --build build
  103. - name: Cache Summary
  104. run: buildcache -s
  105. - name: Pack
  106. shell: pwsh
  107. run: .\.ci\scripts\windows\upload.ps1
  108. - name: Upload
  109. uses: actions/upload-artifact@v3
  110. with:
  111. name: msvc
  112. path: artifacts/