ccpp_mac.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. name: C/C++ Nigthly macos
  2. on:
  3. push:
  4. branches:
  5. - Nigthly
  6. jobs:
  7. build:
  8. runs-on: macos-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. with:
  12. ref: 'Nigthly'
  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_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_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.dmg
  94. path: build/SuperSlicer.dmg
  95. # build again, but the debug one this time
  96. # - name: cmake
  97. # working-directory: ./build
  98. # run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" -DSLIC3R_STATIC=1
  99. # - name: make slic3r
  100. # working-directory: ./build
  101. # run: make slic3r
  102. # - name: copy bin and do not let it lower case
  103. # working-directory: ./build
  104. # run: |
  105. # cp -f src/superslicer SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  106. # chmod u+x SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
  107. # tar -cvf SuperSlicer.tar SuperSlicer
  108. # - name: create dmg
  109. # working-directory: ./build
  110. # run: |
  111. # rm SuperSlicer.dmg
  112. # hdiutil create -ov -fs HFS+ -volname "SuperSlicer" -srcfolder "SuperSlicer" temp.dmg
  113. # hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
  114. # - name: Upload artifact
  115. # uses: actions/upload-artifact@v1.0.0
  116. # with:
  117. # name: nightly_macos_DEBUG.dmg