ccpp_win.yml 4.3 KB

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