ccpp_win_rc.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. name: C/C++ Release candidate windows x64
  2. on:
  3. push:
  4. branches:
  5. - rc
  6. - debug_win
  7. jobs:
  8. build_dep:
  9. runs-on: windows-2019
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: ilammy/msvc-dev-cmd@v1
  13. - name: mkdir in deps
  14. run: mkdir deps/build
  15. - name: dep cache
  16. id: cache-action
  17. uses: actions/cache@v3
  18. with:
  19. key: win_2.7
  20. path: deps/build/destdir
  21. - if: steps.cache-action.outputs.cache-hit != 'true'
  22. name: build deps if new cache
  23. working-directory: ./deps/build
  24. run: |
  25. cmake .. -G "Visual Studio 16 2019" -A x64
  26. msbuild /m ALL_BUILD.vcxproj
  27. build:
  28. runs-on: windows-2019
  29. needs: build_dep
  30. steps:
  31. - uses: actions/checkout@v3
  32. - uses: ilammy/msvc-dev-cmd@v1
  33. - name: update submodule profiles
  34. working-directory: ./resources/profiles
  35. run: git submodule update --init
  36. - name: change date in version
  37. shell: powershell
  38. run: |
  39. copy version.inc version.date.inc
  40. (Get-Content version.date.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("")} | Set-Content version.date.inc
  41. - name: dep cache
  42. id: cache-action
  43. uses: actions/cache@v3
  44. with:
  45. key: win_2.7
  46. path: deps/build/destdir
  47. - run: dir deps
  48. - run: dir deps/build
  49. - run: dir deps/build/destdir
  50. - run: dir deps/build/destdir/usr
  51. - run: mkdir msgfmt_bin
  52. - name: copy gettext
  53. working-directory: ./msgfmt_bin
  54. shell: powershell
  55. 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")'
  56. - name: unzip
  57. working-directory: ./msgfmt_bin
  58. shell: cmd
  59. run: '"C:/Program Files/7-Zip/7z.exe" x gettext.zip'
  60. - name: add msgfmt to path
  61. shell: powershell
  62. working-directory: msgfmt_bin
  63. run: echo "$pwd;" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
  64. - run: mkdir build
  65. - name: cmake
  66. working-directory: ./build
  67. 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"
  68. - name: make
  69. working-directory: ./build
  70. run: msbuild /m /P:Configuration=Release INSTALL.vcxproj
  71. - name: make .mo
  72. working-directory: ./build
  73. run: msbuild /m /P:Configuration=Release gettext_po_to_mo.vcxproj
  74. - name: make .pot
  75. working-directory: ./build
  76. run: msbuild /m /P:Configuration=Release gettext_make_pot.vcxproj
  77. - name: create directory and copy into it
  78. working-directory: ./build
  79. run: ls
  80. - name: create directory and copy into it
  81. working-directory: ./build
  82. shell: powershell
  83. #todo: add the opengl folder
  84. run: mkdir package
  85. - name: copy from release
  86. working-directory: ./build
  87. shell: powershell
  88. 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")'
  89. - name: unzip
  90. working-directory: ./build
  91. shell: cmd
  92. run: '"C:/Program Files/7-Zip/7z.exe" x Slic3r_win_build.zip'
  93. - name: copy missing dll content from old release
  94. working-directory: ./build
  95. shell: cmd
  96. run: |
  97. xcopy /RCYIE Slic3r_win_build\*.dll package\
  98. xcopy /RCYIE Slic3r_win_build\local-settings.bat package\${{ github.event.repository.name }}_local-settings.bat
  99. xcopy /RCYIE Slic3r_win_build\mesa package\
  100. - name: copy new resources
  101. working-directory: ./build
  102. shell: cmd
  103. run: |
  104. xcopy /RCYIE ..\resources package\resources
  105. del /S /Q package\resources\localization\*.so
  106. - name: copy dll & exe
  107. working-directory: ./build
  108. shell: cmd
  109. run: |
  110. xcopy /RCYIE src\release\*.dll package\
  111. xcopy /RCYIE src\release\*.exe package\
  112. xcopy /RCYIE c:\windows\system32\VCRUNTIME140* package\
  113. del package\opengl32.dll
  114. # - name: create zip
  115. # working-directory: ./build
  116. # shell: cmd
  117. # run: '"C:/Program Files/7-Zip/7z.exe" a -tzip nightly.zip *'
  118. - name: Upload artifact
  119. uses: actions/upload-artifact@v4
  120. with:
  121. name: rc_win64
  122. path: build/package/