ccpp_mac_debug.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. name: C/C++ debug macos
  2. on:
  3. push:
  4. branches:
  5. - debug_macos
  6. jobs:
  7. build:
  8. runs-on: macos-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. with:
  12. ref: 'debug_macos'
  13. - name: update submodule profiles
  14. working-directory: ./resources/profiles
  15. run: git submodule update --init
  16. - name: change date in version
  17. run: |
  18. sed "s/+UNKNOWN/_$(date '+%F')/" version.inc > version.date.inc
  19. mv version.date.inc version.inc
  20. - name: mkdir in deps
  21. run: mkdir deps/build
  22. - name: cmake deps
  23. working-directory: ./deps/build
  24. run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13"
  25. - name: make deps
  26. working-directory: ./deps/build
  27. run: make
  28. - name: ls libs
  29. working-directory: ./deps/build
  30. run: ls ./destdir/usr/local/lib
  31. - name: rename wxscintilla
  32. working-directory: ./deps/build/destdir/usr/local/lib
  33. run: cp libwxscintilla-3.1.a libwx_osx_cocoau_scintilla-3.1.a
  34. - name: ls libs
  35. working-directory: ./deps/build
  36. run: ls ./destdir/usr/local/lib
  37. - name: clean deps
  38. working-directory: ./deps/build
  39. run: rm -rf dep_*
  40. - name: mkdir build
  41. run: mkdir build
  42. - name: cmake
  43. working-directory: ./build
  44. run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" -DSLIC3R_STATIC=1
  45. - name: make SuperSlicer
  46. working-directory: ./build
  47. run: make Slic3r
  48. - name: make .mo
  49. working-directory: ./build
  50. run: make gettext_po_to_mo
  51. - name: update Info.plist
  52. working-directory: ./build/src
  53. run: sed "s/+UNKNOWN/_$(date '+%F')/" Info.plist >Info.date.plist
  54. - name: create directory and copy into it
  55. working-directory: ./build
  56. run: |
  57. mkdir pack
  58. mkdir pack/SuperSlicer
  59. mkdir pack/SuperSlicer/SuperSlicer.app
  60. mkdir pack/SuperSlicer/SuperSlicer.app/Contents
  61. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/_CodeSignature
  62. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/Frameworks
  63. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/MacOS
  64. - name: copy Resources
  65. working-directory: ./build
  66. run: |
  67. cp -Rf ../resources pack/SuperSlicer/SuperSlicer.app/Contents/Resources
  68. cp pack/SuperSlicer/SuperSlicer.app/Contents/Resources/icons/SuperSlicer.icns pack/SuperSlicer/SuperSlicer.app/Contents/resources/SuperSlicer.icns
  69. cp src/Info.date.plist pack/SuperSlicer/SuperSlicer.app/Contents/Info.plist
  70. echo -n -e 'APPL????\x0a' > PkgInfo
  71. cp PkgInfo pack/SuperSlicer/SuperSlicer.app/Contents/PkgInfo
  72. # echo -n -e '\xff\xfeAPPL\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x0a\x00' > PkgInfo
  73. - name: copy bin and do not let it lower case
  74. working-directory: ./build
  75. run: |
  76. cp -f src/superslicer pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  77. chmod u+x pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  78. tar -cvf SuperSlicer.tar pack/SuperSlicer
  79. - name: create dmg
  80. working-directory: ./build
  81. run: |
  82. hdiutil create -ov -fs HFS+ -volname "SuperSlicer" -srcfolder "pack/SuperSlicer" temp.dmg
  83. hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
  84. # - name: signing Resources (creating CodeResources inside _CodeSignature)
  85. # working-directory: .
  86. # run: codesign -s <identity> Resources
  87. # maybe i should just try to do that on a separate pc and copy the file here, more secure as a signing process.
  88. - name: Upload artifact
  89. uses: actions/upload-artifact@v1.0.0
  90. with:
  91. name: nightly_macos.tar
  92. path: build/SuperSlicer.tar
  93. - name: Upload artifact
  94. uses: actions/upload-artifact@v1.0.0
  95. with:
  96. name: nightly_macos_debug.dmg
  97. path: build/SuperSlicer.dmg