ccpp_win_debug.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. name: C/C++ debug windows x64
  2. on:
  3. push:
  4. branches:
  5. - debug_win
  6. jobs:
  7. build_dep:
  8. runs-on: windows-2019
  9. steps:
  10. - uses: actions/checkout@v3
  11. - uses: ilammy/msvc-dev-cmd@v1
  12. - name: mkdir in deps
  13. run: mkdir deps/build
  14. - name: dep cache
  15. id: cache-action
  16. uses: actions/cache@v3
  17. with:
  18. key: win_debug_2.7
  19. path: deps/build/destdir
  20. - if: steps.cache-action.outputs.cache-hit != 'true'
  21. name: build deps if new cache
  22. working-directory: ./deps/build
  23. run: |
  24. cmake .. -G "Visual Studio 16 2019" -A x64
  25. msbuild /m ALL_BUILD.vcxproj
  26. build_pot:
  27. runs-on: windows-2019
  28. needs: build_dep
  29. steps:
  30. - uses: actions/checkout@v3
  31. - uses: ilammy/msvc-dev-cmd@v1
  32. - name: update submodule profiles
  33. working-directory: ./resources/profiles
  34. run: git submodule update --init
  35. - run: mkdir deps/destdir
  36. - name: dep cache
  37. id: cache-action
  38. uses: actions/cache@v3
  39. with:
  40. key: win_2.7
  41. path: deps/build/destdir
  42. - run: dir deps
  43. - run: dir deps/destdir
  44. - run: dir deps/destdir/usr
  45. - run: mkdir msgfmt_bin
  46. - name: copy gettext
  47. working-directory: ./msgfmt_bin
  48. shell: powershell
  49. run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
  50. - name: unzip
  51. working-directory: ./msgfmt_bin
  52. shell: cmd
  53. run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
  54. - name: add msgfmt to path
  55. shell: powershell
  56. working-directory: msgfmt_bin
  57. run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
  58. - run: mkdir build
  59. - name: cmake
  60. working-directory: ./build
  61. run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\destdir\usr\local"
  62. - name: make .mo
  63. working-directory: ./build
  64. run: msbuild /m /P:Configuration=RelWithDebInfo gettext_po_to_mo.vcxproj
  65. - name: make .pot
  66. working-directory: ./build
  67. run: msbuild /m /P:Configuration=RelWithDebInfo gettext_make_pot.vcxproj
  68. build:
  69. runs-on: windows-2019
  70. needs: build_dep
  71. steps:
  72. - uses: actions/checkout@v3
  73. - uses: ilammy/msvc-dev-cmd@v1
  74. - name: update submodule profiles
  75. working-directory: ./resources/profiles
  76. run: git submodule update --init
  77. - name: change date in version
  78. shell: powershell
  79. run: |
  80. copy version.inc version.date.inc
  81. (Get-Content version.date.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("_" + [datetime]::Today.ToString("yyyy-MM-dd"))} | Set-Content version.date.inc
  82. - name: mkdir in deps directory
  83. run: mkdir deps/destdir
  84. - name: dep cache
  85. id: cache-action
  86. uses: actions/cache@v3
  87. with:
  88. key: win_2.7
  89. path: deps/build/destdir
  90. - run: dir deps
  91. - run: dir deps/destdir
  92. - run: mkdir msgfmt_bin
  93. - name: copy gettext
  94. working-directory: ./msgfmt_bin
  95. shell: powershell
  96. run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/gettext/gettext-tools-static-0.18.1.1.zip", "gettext.zip")'
  97. - name: unzip
  98. working-directory: ./msgfmt_bin
  99. shell: cmd
  100. run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
  101. - name: add msgfmt to path
  102. shell: powershell
  103. working-directory: msgfmt_bin
  104. run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
  105. - run: mkdir build
  106. - name: cmake
  107. working-directory: ./build
  108. run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\${{ github.event.repository.name }}\${{ github.event.repository.name }}\deps\build\destdir\usr\local"
  109. - name: make
  110. working-directory: ./build
  111. run: msbuild /m /P:Configuration=Debug INSTALL.vcxproj
  112. - name: make .mo
  113. working-directory: ./build
  114. run: msbuild /m /P:Configuration=Debug gettext_po_to_mo.vcxproj
  115. - name: create directory and copy into it
  116. working-directory: ./build
  117. run: ls
  118. - name: create directory and copy into it
  119. working-directory: ./build
  120. shell: powershell
  121. #todo: add the opengl folder
  122. run: mkdir package
  123. - name: copy from release
  124. working-directory: ./build
  125. shell: powershell
  126. run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/SuperSlicer_deps/releases/download/1.8/Slic3r_win_build.zip", "Slic3r_win_build.zip")'
  127. - name: unzip
  128. working-directory: ./build
  129. shell: cmd
  130. run: '"C:/Program Files/7-Zip/7z.exe" x Slic3r_win_build.zip'
  131. - name: copy missing dll content from old release
  132. working-directory: ./build
  133. shell: cmd
  134. run: |
  135. xcopy /RCYIE Slic3r_win_build\*.dll package\
  136. xcopy /RCYIE Slic3r_win_build\local-settings.bat package\${{ github.event.repository.name }}_local-settings.bat
  137. xcopy /RCYIE Slic3r_win_build\mesa package\
  138. - name: copy new resources
  139. working-directory: ./build
  140. shell: cmd
  141. run: xcopy /RCYIE ..\resources package\resources
  142. - name: copy dll & exe
  143. working-directory: ./build
  144. shell: cmd
  145. run: |
  146. xcopy /RCYIE src\debug\*.dll package\
  147. xcopy /RCYIE src\debug\*.exe package\
  148. xcopy /RCYIE src\debug\*.pdb package\
  149. xcopy /RCYIE c:\windows\system32\VCRUNTIME140* package\
  150. del package\opengl32.dll
  151. # - name: create zip
  152. # working-directory: ./build
  153. # shell: cmd
  154. # run: '"C:/Program Files/7-Zip/7z.exe" a -tzip nightly.zip *'
  155. - name: Upload artifact
  156. uses: actions/upload-artifact@v4
  157. with:
  158. name: nightly_win64_debug
  159. path: build/package/