bugfix: Mixed filament — 3MF persistence, Local-Z settings, dialog pa… #1064
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build all | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 2.2.0 | |
| - release/* | |
| paths: | |
| - 'deps/**' | |
| - 'src/**' | |
| - '**/CMakeLists.txt' | |
| - 'version.inc' | |
| - 'localization/**' | |
| - 'resources/**' | |
| - ".github/workflows/build_*.yml" | |
| - 'scripts/flatpak/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 2.2.0 | |
| - release/* | |
| paths: | |
| - 'deps/**' | |
| - 'src/**' | |
| - '**/CMakeLists.txt' | |
| - 'version.inc' | |
| - ".github/workflows/build_*.yml" | |
| - 'build_linux.sh' | |
| - 'build_release_vs2022.bat' | |
| - 'build_release_macos.sh' | |
| - 'scripts/flatpak/**' | |
| schedule: | |
| - cron: '35 7 * * *' # run once a day near midnight US Pacific time | |
| workflow_dispatch: # allows for manual dispatch | |
| inputs: | |
| build-deps-only: | |
| description: 'Only build dependencies (bypasses caching)' | |
| type: boolean | |
| default: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_all: | |
| name: Build All | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Deprecate 20.04appimage | |
| # - os: ubuntu-20.04 | |
| - os: ubuntu-24.04 | |
| - os: windows-latest | |
| - os: macos-14 | |
| arch: arm64 | |
| uses: ./.github/workflows/build_check_cache.yml | |
| with: | |
| os: ${{ matrix.os }} | |
| arch: ${{ matrix.arch }} | |
| build-deps-only: ${{ inputs.build-deps-only || false }} | |
| force-build: ${{ github.event_name == 'schedule' }} | |
| secrets: inherit | |
| flatpak: | |
| name: "Flatpak" | |
| concurrency: | |
| group: flatpak-${{ matrix.variant.arch }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: false | |
| container: | |
| image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 | |
| options: --privileged | |
| volumes: | |
| - /usr/local/lib/android:/usr/local/lib/android | |
| - /usr/share/dotnet:/usr/share/dotnet | |
| - /opt/ghc:/opt/ghc1 | |
| - /usr/local/share/boost:/usr/local/share/boost1 | |
| strategy: | |
| matrix: | |
| variant: | |
| - arch: x86_64 | |
| runner: ubuntu-24.04 | |
| - arch: aarch64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.variant.runner }} | |
| env: | |
| date: | |
| ver: | |
| ver_pure: | |
| steps: | |
| - name: "Remove unneeded stuff to free disk space" | |
| run: | |
| rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" | |
| - uses: actions/checkout@v5 | |
| - name: Get the version and date | |
| run: | | |
| ver_pure=$(grep 'set(Snapmaker_VERSION' version.inc | cut -d '"' -f2) | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| ver="PR-${{ github.event.number }}" | |
| else | |
| ver=V$ver_pure | |
| fi | |
| echo "ver=$ver" >> $GITHUB_ENV | |
| echo "ver_pure=$ver_pure" >> $GITHUB_ENV | |
| echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
| shell: bash | |
| - uses: flathub-infra/flatpak-github-actions/flatpak-builder@master | |
| with: | |
| bundle: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak | |
| manifest-path: scripts/flatpak/io.github.Snapmaker.Snapmaker_Orca.yml | |
| cache: true | |
| arch: ${{ matrix.variant.arch }} | |
| upload-artifact: false | |
| - name: Find Flatpak bundle file | |
| id: find_bundle | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| BUNDLE_NAME="Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak" | |
| # Try multiple possible locations | |
| if [ -f "$BUNDLE_NAME" ]; then | |
| BUNDLE_PATH="$(pwd)/$BUNDLE_NAME" | |
| elif [ -f "/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME" ]; then | |
| BUNDLE_PATH="/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME" | |
| else | |
| # Search in current directory and subdirectories | |
| FOUND=$(find . -name "$BUNDLE_NAME" -type f | head -1) | |
| if [ -z "$FOUND" ]; then | |
| echo "Error: Could not find $BUNDLE_NAME" | |
| echo "Searching for any .flatpak files:" | |
| find . -name "*.flatpak" -type f || true | |
| exit 1 | |
| fi | |
| # Convert relative path to absolute | |
| BUNDLE_PATH="$(cd "$(dirname "$FOUND")" && pwd)/$(basename "$FOUND")" | |
| fi | |
| echo "path=$BUNDLE_PATH" >> $GITHUB_OUTPUT | |
| echo "Found bundle at: $BUNDLE_PATH" | |
| ls -lh "$BUNDLE_PATH" || true | |
| shell: bash | |
| - name: Upload artifacts Flatpak | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak | |
| path: ${{ steps.find_bundle.outputs.path }} | |
| if-no-files-found: error | |
| - name: Deploy Flatpak to nightly release | |
| if: ${{github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.3.0-final'}} | |
| uses: WebFreak001/deploy-nightly@v3.2.0 | |
| with: | |
| upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} | |
| release_id: 169912305 | |
| asset_path: ${{ steps.find_bundle.outputs.path }} | |
| asset_name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}_Beta.flatpak | |
| asset_content_type: application/octet-stream | |
| max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted |