ccpp_mac_debug.yml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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
  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: update Info.plist
  49. working-directory: ./build/src
  50. run: sed "s/+UNKNOWN/_$(date '+%F')/" Info.plist >Info.date.plist
  51. - name: create directory and copy into it
  52. working-directory: ./build
  53. run: |
  54. mkdir pack
  55. mkdir pack/SuperSlicer
  56. mkdir pack/SuperSlicer/SuperSlicer.app
  57. mkdir pack/SuperSlicer/SuperSlicer.app/Contents
  58. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/_CodeSignature
  59. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/Frameworks
  60. mkdir pack/SuperSlicer/SuperSlicer.app/Contents/MacOS
  61. - name: copy Resources
  62. working-directory: ./build
  63. run: |
  64. cp -Rf ../resources pack/SuperSlicer/SuperSlicer.app/Contents/Resources
  65. cp pack/SuperSlicer/SuperSlicer.app/Contents/Resources/icons/SuperSlicer.icns pack/SuperSlicer/SuperSlicer.app/Contents/resources/SuperSlicer.icns
  66. cp src/Info.date.plist pack/SuperSlicer/SuperSlicer.app/Contents/Info.plist
  67. echo -n -e 'APPL????\x0a' > PkgInfo
  68. cp PkgInfo pack/SuperSlicer/SuperSlicer.app/Contents/PkgInfo
  69. # echo -n -e '\xff\xfeAPPL\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x0a\x00' > PkgInfo
  70. - name: copy bin and do not let it lower case
  71. working-directory: ./build
  72. run: |
  73. cp -f src/superslicer pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  74. chmod u+x pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  75. tar -cvf SuperSlicer.tar pack/SuperSlicer
  76. - name: create dmg
  77. working-directory: ./build
  78. run: |
  79. hdiutil create -ov -fs HFS+ -volname "SuperSlicer" -srcfolder "pack/SuperSlicer" temp.dmg
  80. hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
  81. # - name: signing Resources (creating CodeResources inside _CodeSignature)
  82. # working-directory: .
  83. # run: codesign -s <identity> Resources
  84. # maybe i should just try to do that on a separate pc and copy the file here, more secure as a signing process.
  85. - name: Upload artifact
  86. uses: actions/upload-artifact@v1.0.0
  87. with:
  88. name: nightly_macos.tar
  89. path: build/SuperSlicer.tar
  90. - name: Upload artifact
  91. uses: actions/upload-artifact@v1.0.0
  92. with:
  93. name: nightly_macos_debug.dmg
  94. path: build/SuperSlicer.dmg