123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- name: C/C++ CI macos
- on:
- push:
- branches:
- - CI
- jobs:
- build:
- runs-on: macos-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- ref: 'CI'
- - name: change date in version
- run: |
- sed "s/+UNKNOWN/_$(date '+%F')/" version.inc > version.date.inc
- mv version.date.inc version.inc
- - name: mkdir in deps
- run: mkdir deps/build
- - name: cmake deps
- working-directory: ./deps/build
- run: cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13"
- - name: make deps
- working-directory: ./deps/build
- run: make
- - name: ls libs
- working-directory: ./deps/build
- run: ls ./destdir/usr/local/lib
- - name: rename wxscintilla
- working-directory: ./deps/build/destdir/usr/local/lib
- run: cp libwxscintilla-3.1.a libwx_osx_cocoau_scintilla-3.1.a
- - name: ls libs
- working-directory: ./deps/build
- run: ls ./destdir/usr/local/lib
- - name: clean deps
- working-directory: ./deps/build
- run: rm -rf dep_*
- - name: mkdir build
- run: mkdir build
- - name: cmake
- working-directory: ./build
- run: cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" -DSLIC3R_STATIC=1
- - name: make slic3r
- working-directory: ./build
- run: make slic3r
- - name: update Info.plist
- working-directory: ./build/src
- run: sed "s/+UNKNOWN/_$(date '+%F')/" Info.plist >Info.date.plist
- - name: create directory and copy into it
- working-directory: ./build
- run: |
- mkdir SuperSlicer
- mkdir SuperSlicer/SuperSlicer.app
- mkdir SuperSlicer/SuperSlicer.app/Contents
- mkdir SuperSlicer/SuperSlicer.app/Contents/_CodeSignature
- mkdir SuperSlicer/SuperSlicer.app/Contents/Frameworks
- mkdir SuperSlicer/SuperSlicer.app/Contents/MacOS
- - name: copy resources
- working-directory: ./build
- run: |
- cp -Rf ../resources SuperSlicer/SuperSlicer.app/Contents/resources
- cp SuperSlicer/SuperSlicer.app/Contents/resources/icons/slic3r.icns SuperSlicer/SuperSlicer.app/Contents/resources/Slic3r.icns
- cp src/Info.date.plist SuperSlicer/SuperSlicer.app/Contents/Info.plist
- echo -n -e 'APPL????\x0a' > PkgInfo
- cp PkgInfo SuperSlicer/SuperSlicer.app/Contents/PkgInfo
- # echo -n -e '\xff\xfeAPPL\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x0a\x00' > PkgInfo
- - name: copy bin and do not let it lower case
- working-directory: ./build
- run: |
- cp -f src/superslicer SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- chmod u+x SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- tar -cvf SuperSlicer.tar SuperSlicer
- - name: create dmg
- working-directory: ./build
- run: |
- hdiutil create -ov -fs HFS+ -volname "SuperSlicer" -srcfolder "SuperSlicer" temp.dmg
- hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
- # - name: signing resources (creating CodeResources inside _CodeSignature)
- # working-directory: .
- # run: codesign -s <identity> resources
- # maybe i should just try to do that on a separate pc and copy the file here, more secure as a signing process.
- - name: Upload artifact
- uses: actions/upload-artifact@v1.0.0
- with:
- name: nightly_macos.tar
- path: build/SuperSlicer.tar
- - name: Upload artifact
- uses: actions/upload-artifact@v1.0.0
- with:
- name: nightly_macos.dmg
- path: build/SuperSlicer.dmg
- # build again, but the debug one this time
- - name: cmake
- working-directory: ./build
- run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" -DSLIC3R_STATIC=1
- - name: make slic3r
- working-directory: ./build
- run: make slic3r
- - name: copy bin and do not let it lower case
- working-directory: ./build
- run: |
- cp -f src/superslicer SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- chmod u+x SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- tar -cvf SuperSlicer.tar SuperSlicer
- - name: create dmg
- working-directory: ./build
- run: |
- rm SuperSlicer.dmg
- hdiutil create -ov -fs HFS+ -volname "SuperSlicer" -srcfolder "SuperSlicer" temp.dmg
- hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
- - name: Upload artifact
- uses: actions/upload-artifact@v1.0.0
- with:
- name: nightly_macos_DEBUG.dmg
- path: build/SuperSlicer.dmg
|