Skip to content

Commit

Permalink
Merge branch 'codespace-opulent-parakeet-r64rrvrvw7jhx5vp' of https:/…
Browse files Browse the repository at this point in the history
…/github.com/J-DRD/GalaxySlicer into codespace-opulent-parakeet-r64rrvrvw7jhx5vp
  • Loading branch information
J-DRD committed Dec 25, 2023
2 parents aea84ba + b15555b commit 07639bf
Showing 1 changed file with 64 additions and 83 deletions.
147 changes: 64 additions & 83 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-latest
- os: windows-latest
#- os: macos-12
#arch: x86_64
Expand All @@ -50,51 +50,35 @@ jobs:
uses: actions/checkout@v3

- name: Get the version and date on Ubuntu and macOS
if: inputs.os != 'windows-latest'
if: matrix.os != 'windows-latest'
id: get-version-unix
run: |
ver=1.0 #$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
echo "ver=$ver" >> $GITHUB_ENV
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
shell: bash

- name: Get the version and date on Windows
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
id: get-version-windows
run: |
$date = Get-Date -Format 'yyyyMMdd'
$ref = "${{ github.ref }}"
$eventName = "${{ github.event_name }}"
$prNumber = "${{ github.event.number }}"
if ($ref -eq 'refs/heads/main') {
$ver = "nightly" + $date.Substring(2)
} elseif ($eventName -eq 'pull_request') {
$ver = "PR" + $prNumber
} else {
$versionContent = Get-Content version.inc -Raw
if ($versionContent -match 'set\(SLIC3R_VERSION "(.*?)"\)') {
$ver = $matches[1]
}
$ver = "V$ver"
echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
# Extract the version from the file
$versionContent = Get-Content version.inc -Raw
if ($versionContent -match 'set\(SoftFever_VERSION "(.*?)"\)') {
$ver = $matches[1]
}

echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "date=$date" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "date: ${{ env.date }} version: ${{ env.ver }}"
echo "date: ${{ env.date }} version: $ver"
shell: pwsh

- name: load cached deps
uses: actions/cache@v3
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}


# Mac
#- name: Install tools mac
# if: matrix.os == 'macos-12'
# run: |
# brew install cmake git gettext zstd tree
# mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}
# mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/GalaxySlicer_dep_${{matrix.arch}}
# mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}}

# - name: build deps
# if: matrix.os == 'macos-12'
Expand All @@ -103,7 +87,7 @@ jobs:
# env:
# cache-name: ${{ runner.os }}-cache-orcaslicer_deps_${{matrix.arch}}
# with:
# path: ${{ github.workspace }}/deps/build/GalaxySlicer_dep
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
# key: build-${{ env.cache-name }}

# - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }}
Expand All @@ -115,11 +99,11 @@ jobs:
# if: matrix.os == 'macos-12'
# working-directory: ${{ github.workspace }}
# run: |
# curl -LJO https://github.com/fr3ak2402/GalaxySlicer_dep/releases/download/December_23/GalaxySlicer_dep_mac_${{matrix.arch}}_061223
# tar -zvxf ./GalaxySlicer_dep_mac_${{matrix.arch}}_061223 -C ${{ github.workspace }}/deps/build_${{matrix.arch}}
# curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz
# tar -zvxf ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}}
# chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}}
# tree ${{ github.workspace }}/deps/build_${{matrix.arch}}
# rm ./GalaxySlicer_dep_mac_${{matrix.arch}}_061223
# rm ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz


#- name: Build slicer mac
Expand Down Expand Up @@ -147,56 +131,56 @@ jobs:
# security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
# security list-keychain -d user -s $KEYCHAIN_PATH
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH
# codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/GalaxySlicer/GalaxySlicer.app
# ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/GalaxySlicer/Applications
# hdiutil create -volname "GalaxySlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/GalaxySlicer -ov -format UDZO GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/OrcaSlicer.app
# ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications
# hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}"
# xcrun notarytool submit "GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
# xcrun stapler staple GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# xcrun notarytool submit "OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
# xcrun stapler staple OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg

#- name: Create DMG without notary
# if: github.ref != 'refs/heads/main' && matrix.os == 'macos-12'
# working-directory: ${{ github.workspace }}
# run: |
# ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/GalaxySlicer/Applications
# hdiutil create -volname "GalaxySlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/GalaxySlicer -ov -format UDZO GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications
# hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg

#- name: Upload artifacts mac
# if: matrix.os == 'macos-12'
# uses: actions/upload-artifact@v3
# with:
# name: GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}
# path: ${{ github.workspace }}/GalaxySlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
# name: OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}
# path: ${{ github.workspace }}/OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg

# Windows
- name: setup MSVC
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.1

- name: Install nsis
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
run: |
dir "C:/Program Files (x86)/Windows Kits/10/Include"
choco install nsis
- name: download deps
if: matrix.os == 'windows-latest'
shell: powershell
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/fr3ak2402/GalaxySlicer_dep/releases/download/December_23/GalaxySlicer_dep_Win64_06-12-23_vs2022.zip", "$env:temp\GalaxySlicer_dep_Win64_06-12-23_vs2022.zip")'
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_win64_20230810_vs2022.zip", "$env:temp\OrcaSlicer_dep_win64_20230810_vs2022.zip")'

- name: maker dir
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}
run: |
mkdir ${{ github.workspace }}/deps/build
mkdir ${{ github.workspace }}/deps/build/GalaxySlicer_dep
mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep
- name: extract deps
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}/deps/build
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\GalaxySlicer_dep_Win64_06-12-23_vs2022.zip'
run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_win64_20230810_vs2022.zip'

# - name: build deps
# if: matrix.os == 'windows-latest'
Expand All @@ -205,7 +189,7 @@ jobs:
# env:
# cache-name: ${{ runner.os }}-cache-orcaslicer_deps
# with:
# path: ${{ github.workspace }}/deps/build/GalaxySlicer_dep
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
# key: ${{ runner.os }}-build-${{ env.cache-name }}

# - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }}
Expand All @@ -214,10 +198,10 @@ jobs:
# continue-on-error: true
# run: .\build_release_vs2022.bat deps

# - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude GalaxySlicer_dep | Remove-Item -Recurse -Force
# - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force

- name: Build slicer Win
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}
run: .\build_release_vs2019.bat slicer

Expand All @@ -227,47 +211,44 @@ jobs:
run: .\build_release_vs2022.bat slicer

- name: Create installer Win
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}/build
run: |
cpack -G NSIS
- name: Pack app
if: inputs.os == 'windows-latest'
- name: pack app
if: matrix.os == 'windows-latest'
working-directory: ${{ github.workspace }}/build
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip GalaxySlicer_Windows_${{ env.ver }}_portable.zip ${{ github.workspace }}/build/GalaxySlicer'
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_dev_build.zip ${{ github.workspace }}/build/OrcaSlicer'

- name: Pack PDB
if: inputs.os == 'windows-latest'
working-directory: ${{ github.workspace }}/build/src/Release
shell: cmd
run: '"C:/Program Files/7-Zip/7z.exe" a -m0=lzma2 -mx9 Debug_PDB_${{ env.ver }}_for_developers_only.7z *.pdb'

- name: Upload artifacts Win zip
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: GalaxySlicer_Windows_${{ env.ver }}_portable
path: ${{ github.workspace }}/build/GalaxySlicer_Windows_${{ env.ver }}_portable.zip
name: OrcaSlicer_Windows_V${{ env.ver }}_portable
path: ${{ github.workspace }}/build/OrcaSlicer

- name: Upload artifacts Win installer
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: GalaxySlicer_Windows_${{ env.ver }}
path: ${{ github.workspace }}/build/GalaxySlicer*.exe
name: OrcaSlicer_Windows_V${{ env.ver }}
path: ${{ github.workspace }}/build/OrcaSlicer*.exe

- name: Upload artifacts Win PDB
if: inputs.os == 'windows-latest'
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: PDB
path: ${{ github.workspace }}/build/src/Release/Debug_PDB_${{ env.ver }}_for_developers_only.7z

name: OrcaSlicer_Windows_V${{ env.ver }}_pdb
path: ${{ github.workspace }}/build/src/Release/*.pdb
# Ubuntu
build:
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
if: inputs.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
Expand All @@ -279,12 +260,12 @@ jobs:
m4 pkgconf sudo wayland-protocols wget
- name: Install dependencies from BuildLinux.sh
if: inputs.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-20.04'
shell: bash
run: sudo ./BuildLinux.sh -ur

- name: Fix permissions
if: inputs.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-20.04'
shell: bash
run: sudo chown $USER -R ./

Expand All @@ -310,23 +291,23 @@ jobs:
run: |
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
curl -LJO https://github.com/fr3ak2402/GalaxySlicer_dep/releases/download/December_23/GalaxySlicer_dep_ubuntu_061223.zip
unzip ./GalaxySlicer_dep_ubuntu_061223.zip -d ${{ github.workspace }}/deps/build/destdir
curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_ubuntu_20231008.zip
unzip ./OrcaSlicer_dep_ubuntu_20231008.zip -d ${{ github.workspace }}/deps/build/destdir
chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build/destdir
ls -l ${{ github.workspace }}/deps/build/destdir
rm GalaxySlicer_dep_ubuntu_061223.zip
rm OrcaSlicer_dep_ubuntu_20231008.zip
- name: Create AppImage
- name: Build slicer
if: matrix.os == 'ubuntu-20.04'
working-directory: ${{ github.workspace }}
shell: bash
run: |
./BuildLinux.sh -isr
chmod +x ./build/GalaxySlicer_ubu64.AppImage
chmod +x ./build/OrcaSlicer_ubu64.AppImage
- name: Upload artifacts Ubuntu
if: inputs.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: GalaxySlicer_Linux_${{ env.ver }}
path: './build/GalaxySlicer_ubu64.AppImage'
name: OrcaSlicer_Linux_V${{ env.ver }}
path: './build/OrcaSlicer_ubu64.AppImage'

0 comments on commit 07639bf

Please sign in to comment.