From fd3a3e71012f55a9c9140bafcd9baf59f57fffd7 Mon Sep 17 00:00:00 2001 From: remi durand Date: Thu, 29 Apr 2021 16:26:12 +0200 Subject: [PATCH] update Action files add debug versions makes the appimage keep its linux tags supermerill/SuperSlicer#1125 --- .github/workflows/ccpp_mac.yml | 31 +------ .github/workflows/ccpp_mac_debug.yml | 98 ++++++++++++++++++++++ .github/workflows/ccpp_ubuntu.yml | 17 ++-- .github/workflows/ccpp_ubuntu_debug.yml | 88 ++++++++++++++++++++ .github/workflows/ccpp_win.yml | 9 +- .github/workflows/ccpp_win_debug.yml | 106 ++++++++++++++++++++++++ 6 files changed, 313 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ccpp_mac_debug.yml create mode 100644 .github/workflows/ccpp_ubuntu_debug.yml create mode 100644 .github/workflows/ccpp_win_debug.yml diff --git a/.github/workflows/ccpp_mac.yml b/.github/workflows/ccpp_mac.yml index 8a62f81cd..44b04f053 100644 --- a/.github/workflows/ccpp_mac.yml +++ b/.github/workflows/ccpp_mac.yml @@ -1,9 +1,9 @@ -name: C/C++ CI macos +name: C/C++ Nigthly macos on: push: branches: - - CI + - Nigthly jobs: build: @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 'CI' + ref: 'Nigthly' - name: change date in version run: | sed "s/+UNKNOWN/_$(date '+%F')/" version.inc > version.date.inc @@ -63,7 +63,7 @@ jobs: working-directory: ./build run: | cp -Rf ../resources pack/Slic3r/Slic3r.app/Contents/Resources - cp pack/Slic3r/Slic3r.app/Contents/Resources/icons/slic3r.icns pack/Slic3r/Slic3r.app/Contents/resources/Slic3r.icns + cp pack/Slic3r/Slic3r.app/Contents/Resources/icons/Slic3r.icns pack/Slic3r/Slic3r.app/Contents/resources/Slic3r.icns cp src/Info.date.plist pack/Slic3r/Slic3r.app/Contents/Info.plist echo -n -e 'APPL????\x0a' > PkgInfo cp PkgInfo pack/Slic3r/Slic3r.app/Contents/PkgInfo @@ -93,26 +93,3 @@ jobs: with: name: nightly_macos.dmg path: build/Slic3r.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/Slic3r Slic3r/Slic3r.app/Contents/MacOS/Slic3r -# chmod u+x Slic3r/Slic3r.app/Contents/MacOS/Slic3r -# tar -cvf Slic3r.tar Slic3r -# - name: create dmg -# working-directory: ./build -# run: | -# rm Slic3r.dmg -# hdiutil create -ov -fs HFS+ -volname "Slic3r" -srcfolder "Slic3r" temp.dmg -# hdiutil convert temp.dmg -format UDZO -o Slic3r.dmg -# - name: Upload artifact -# uses: actions/upload-artifact@v1.0.0 -# with: -# name: nightly_macos_DEBUG.dmg diff --git a/.github/workflows/ccpp_mac_debug.yml b/.github/workflows/ccpp_mac_debug.yml new file mode 100644 index 000000000..fc42d9211 --- /dev/null +++ b/.github/workflows/ccpp_mac_debug.yml @@ -0,0 +1,98 @@ +name: C/C++ debug macos + +on: + push: + branches: + - debug_macos + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: 'debug_macos' + - name: update submodule profiles + working-directory: ./resources/profiles + run: git submodule update + - 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_BUILD_TYPE=Debug -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_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: 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 pack + mkdir pack/Slic3r + mkdir pack/Slic3r/Slic3r.app + mkdir pack/Slic3r/Slic3r.app/Contents + mkdir pack/Slic3r/Slic3r.app/Contents/_CodeSignature + mkdir pack/Slic3r/Slic3r.app/Contents/Frameworks + mkdir pack/Slic3r/Slic3r.app/Contents/MacOS + - name: copy Resources + working-directory: ./build + run: | + cp -Rf ../resources pack/Slic3r/Slic3r.app/Contents/Resources + cp pack/Slic3r/Slic3r.app/Contents/Resources/icons/Slic3r.icns pack/Slic3r/Slic3r.app/Contents/resources/Slic3r.icns + cp src/Info.date.plist pack/Slic3r/Slic3r.app/Contents/Info.plist + echo -n -e 'APPL????\x0a' > PkgInfo + cp PkgInfo pack/Slic3r/Slic3r.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/Slic3r pack/Slic3r/Slic3r.app/Contents/MacOS/Slic3r + chmod u+x pack/Slic3r/Slic3r.app/Contents/MacOS/Slic3r + tar -cvf Slic3r.tar pack/Slic3r + - name: create dmg + working-directory: ./build + run: | + hdiutil create -ov -fs HFS+ -volname "Slic3r" -srcfolder "pack/Slic3r" temp.dmg + hdiutil convert temp.dmg -format UDZO -o Slic3r.dmg +# - name: signing Resources (creating CodeResources inside _CodeSignature) +# working-directory: . +# run: codesign -s 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/Slic3r.tar + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: nightly_macos_debug.dmg + path: build/Slic3r.dmg diff --git a/.github/workflows/ccpp_ubuntu.yml b/.github/workflows/ccpp_ubuntu.yml index f1d2858b0..f8a20112e 100644 --- a/.github/workflows/ccpp_ubuntu.yml +++ b/.github/workflows/ccpp_ubuntu.yml @@ -1,9 +1,9 @@ -name: C/C++ CI ubuntu +name: C/C++ Nigthly ubuntu on: push: branches: - - CI + - Nigthly jobs: build: @@ -13,7 +13,10 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 'CI' + ref: 'Nigthly' + - name: update submodule profiles + working-directory: ./resources/profiles + run: git submodule update - name: change date in version run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc - name: update clock @@ -73,11 +76,13 @@ jobs: working-directory: ./build/package run: | chmod +x ../build_appimage.sh - ../build_appimage.sh Slic3r_ubu64.AppImage + ../build_appimage.sh + - name: 'Tar files' + working-directory: ./build/package + run: tar -cvf Slic3r_ubu64.AppImage.tar Slic3r_ubu64.AppImage - name: Upload appimage uses: actions/upload-artifact@v1.0.0 with: name: Slic3r-AppImage.tar - path: build/package/Slic3r_ubu64.AppImage + path: build/package/Slic3r_ubu64.AppImage.tar - \ No newline at end of file diff --git a/.github/workflows/ccpp_ubuntu_debug.yml b/.github/workflows/ccpp_ubuntu_debug.yml new file mode 100644 index 000000000..1ca83177e --- /dev/null +++ b/.github/workflows/ccpp_ubuntu_debug.yml @@ -0,0 +1,88 @@ +name: C/C++ debug ubuntu + +on: + push: + branches: + - debug_ubuntu + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + with: + ref: 'debug_ubuntu' + - name: update submodule profiles + working-directory: ./resources/profiles + run: git submodule update + - name: change date in version + run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc + - name: update clock + run: sudo hwclock -s + - name: update apt + run: sudo apt update + - name: install gtk2 glew + run: sudo apt install libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev + - name: mkdir in deps + run: mkdir deps/build + - name: cmake deps + working-directory: ./deps/build + run: cmake .. + - name: make deps + working-directory: ./deps/build + run: make + - name: rename wxscintilla + working-directory: ./deps/build/destdir/usr/local/lib + run: cp libwxscintilla-3.1.a libwx_gtk2u_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_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="/home/runner/work/Slic3r/Slic3r/deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 + - name: make Slic3r + working-directory: ./build + run: make Slic3r + - name: create directory and copy into it + working-directory: ./build + run: | + mkdir package + mkdir package/bin + - name: copy resources + working-directory: ./build + run: cp -Rf ../resources package/resources + - name: copy bin + working-directory: ./build + run: cp -f src/Slic3r package/bin/Slic3r + - name: create sh from echo + working-directory: ./build/package + run: | + echo -e '#!/bin/bash\nDIR=$(readlink -f "$0" | xargs dirname)\nexport LD_LIBRARY_PATH="$DIR/bin"\nexec "$DIR/bin/Slic3r" "$@"' >Slic3r + chmod u+x Slic3r + tar -cvf ../Slic3r.tar . + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: nightly_linux.tar + path: build/Slic3r.tar + - name: build appimage + working-directory: ./build/package + run: | + chmod +x ../build_appimage.sh + ../build_appimage.sh + - name: 'Tar files' + working-directory: ./build/package + run: tar -cvf Slic3r_ubu64.AppImage.tar Slic3r_ubu64.AppImage + - name: Upload appimage + uses: actions/upload-artifact@v1.0.0 + with: + name: Slic3r-AppImage.tar + path: build/package/Slic3r_ubu64.AppImage.tar + diff --git a/.github/workflows/ccpp_win.yml b/.github/workflows/ccpp_win.yml index 0ac62b5be..4861ab0ff 100644 --- a/.github/workflows/ccpp_win.yml +++ b/.github/workflows/ccpp_win.yml @@ -1,9 +1,9 @@ -name: C/C++ CI windows x64 +name: C/C++ Nigthly windows x64 on: push: branches: - - CI + - Nigthly jobs: build_dep: @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 'CI' + ref: 'Nigthly' - uses: ilammy/msvc-dev-cmd@v1 - name: mkdir in deps run: mkdir deps/build @@ -34,6 +34,9 @@ jobs: steps: - uses: actions/checkout@v1 - uses: ilammy/msvc-dev-cmd@v1 + - name: update submodule profiles + working-directory: ./resources/profiles + run: git submodule update - name: change date in version shell: powershell run: (Get-Content version.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("_" + [datetime]::Today.ToString("yyyy-MM-dd"))} | Set-Content version.inc diff --git a/.github/workflows/ccpp_win_debug.yml b/.github/workflows/ccpp_win_debug.yml new file mode 100644 index 000000000..9e7acc198 --- /dev/null +++ b/.github/workflows/ccpp_win_debug.yml @@ -0,0 +1,106 @@ +name: C/C++ debug windows x64 + +on: + push: + branches: + - debug_win + +jobs: + build_dep: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: 'debug_win' + - uses: ilammy/msvc-dev-cmd@v1 + - name: mkdir in deps + run: mkdir deps/build + - name: cmake and make deps + working-directory: ./deps/build + run: | + cmake .. -G "Visual Studio 16 2019" -A x64 + msbuild /m ALL_BUILD.vcxproj + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: deps_win + path: ./deps/build/destdir/ + + build: + runs-on: windows-latest + needs: build_dep + + steps: + - uses: actions/checkout@v1 + - uses: ilammy/msvc-dev-cmd@v1 + - name: update submodule profiles + working-directory: ./resources/profiles + run: git submodule update + - name: change date in version + shell: powershell + run: (Get-Content version.inc) | Foreach-Object {$_ -replace "\+UNKNOWN", ("_" + [datetime]::Today.ToString("yyyy-MM-dd"))} | Set-Content version.inc + - name: mkdir in deps directory + run: mkdir deps/destdir + - name: download deps + uses: actions/download-artifact@v1 + with: + name: deps_win + path: deps/destdir + - name: echo dir deps + run: dir deps + - name: echo dir deps destdir + run: dir deps/destdir + - name: mkdir + run: mkdir build + - name: cmake + working-directory: ./build + run: cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="d:\a\Slic3r\Slic3r\deps\destdir\usr\local" + - name: make + working-directory: ./build + run: msbuild /m /P:Configuration=Debug INSTALL.vcxproj + - name: create directory and copy into it + working-directory: ./build + run: ls + - name: create directory and copy into it + working-directory: ./build + shell: powershell + #todo: add the opengl folder + run: mkdir package + - name: copy from release + working-directory: ./build + shell: powershell + run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/supermerill/Slic3r/releases/download/2.2.53.3/Slic3r_2.2.53.3_win64_20201005.zip", "Slic3r_2.2.53.3_win64_20201005.zip")' + - name: unzip + working-directory: ./build + shell: cmd + run: '"C:/Program Files/7-Zip/7z.exe" x Slic3r_2.2.53.3_win64_20201005.zip' + - name: copy old release content + working-directory: ./build + shell: cmd + run: xcopy /RCYIE Slic3r_2.2.53.3_win64_20201005\* package\ + - name: copy new resources + working-directory: ./build + shell: cmd + run: xcopy /RCYIE ..\resources package\resources + - name: copy dll + working-directory: ./build + shell: cmd + run: xcopy /RCYIE src\release\*.dll package\ + - name: copy exe + working-directory: ./build + shell: cmd + run: xcopy /RCYIE src\release\*.exe package\ + - name: copy ms runtime + working-directory: ./build + shell: cmd + run: xcopy /RCYIE c:\windows\system32\VCRUNTIME140* package\ +# - name: create zip +# working-directory: ./build +# shell: cmd +# run: '"C:/Program Files/7-Zip/7z.exe" a -tzip nightly.zip *' + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: nightly_win64_debug + path: build/package/