From c742459b14028458647ca8bd453695cfc842afb7 Mon Sep 17 00:00:00 2001 From: cochcoder Date: Tue, 18 Feb 2025 13:40:13 -0500 Subject: [PATCH] Rebase on main --- .github/workflows/build_all.yml | 22 ++-------- .github/workflows/build_check_cache.yml | 2 +- .github/workflows/build_deps.yml | 47 +++++----------------- .github/workflows/build_orca.yml | 38 ++++++++--------- flatpak/io.github.softfever.OrcaSlicer.yml | 19 ++++----- 5 files changed, 43 insertions(+), 85 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 9167553a6e..5da2b6979f 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -48,13 +48,7 @@ jobs: matrix: include: - os: ubuntu-20.04 - arch: x86_64 - - os: ubuntu-20.04 - arch: aarch64 - os: ubuntu-24.04 - arch: x86_64 - - os: ubuntu-24.04 - arch: aarch64 - os: windows-latest - os: macos-14 arch: x86_64 @@ -68,15 +62,7 @@ jobs: secrets: inherit flatpak: name: "Flatpak" - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - arch: x86_64 - - os: ubuntu-latest - arch: aarch64 - fail-fast: false + runs-on: ubuntu-latest env: date: ver: @@ -106,15 +92,15 @@ jobs: echo "ver_pure=$ver_pure" >> $GITHUB_ENV echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV shell: bash - - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + - uses: flatpak/flatpak-github-actions/flatpak-builder@master with: bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml cache: true - arch: ${{ matrix.arch }} + upload-artifact: false - name: Deploy Flatpak to nightly release if: ${{github.ref == 'refs/heads/main'}} - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 diff --git a/.github/workflows/build_check_cache.yml b/.github/workflows/build_check_cache.yml index 34b67f7afe..f71cc9b281 100644 --- a/.github/workflows/build_check_cache.yml +++ b/.github/workflows/build_check_cache.yml @@ -31,7 +31,7 @@ jobs: id: set_outputs env: underscore-arch: ${{ inputs.os == 'macos-14' && '_' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing - dash-arch: ${{ inputs.os == 'macos-14' && '-' || '' }}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing + dash-arch: ${{ inputs.os == 'macos-14' && '-' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-14') && 'OrcaSlicer_dep' || 'destdir' }} output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}} run: | diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index f2abb44061..163cbca23c 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -66,8 +66,6 @@ jobs: working-directory: ${{ github.workspace }} run: | choco install strawberryperl - mkdir ${{ github.workspace }}/deps/build - mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep .\build_release_vs2022.bat deps .\build_release_vs2022.bat pack cd ${{ github.workspace }}/deps/build @@ -84,9 +82,9 @@ jobs: ./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 -1 brew install zstd - # Note for later: may need libtool and libpng++-dev dependencies for arm builds - - name: Install Ubuntu ${{ inputs.arch }} Build Dependencies - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' && inputs.arch == 'x86_64' + + - name: Install Ubuntu Build Dependencies + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' working-directory: ${{ github.workspace }} env: apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }} @@ -99,44 +97,17 @@ jobs: libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo - - name: Install Ubuntu ${{ inputs.arch }} Build Dependencies - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' && inputs.arch == 'aarch64' - working-directory: ${{ github.workspace }} - env: - apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }} - webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }} - run: | - ${{ env.apt-cmd }} update - ${{ env.apt-cmd }} install -y cmake git g++ build-essential libgl1-mesa-dev m4 \ - libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \ - libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \ - libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \ - gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo - - - - name: Build on Ubuntu ${{ inputs.arch }} - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' && inputs.arch == 'x86_64' + - name: Build on Ubuntu + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' working-directory: ${{ github.workspace }} run: | - mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }} - mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/destdir + mkdir -p ${{ github.workspace }}/deps/build + mkdir -p ${{ github.workspace }}/deps/build/destdir sudo ./BuildLinux.sh -ur sudo chown $USER -R ./ ./BuildLinux.sh -dr - cd deps/build_${{ inputs.arch }} - tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d")_${{ inputs.arch }}.tar.gz destdir - - - name: Build on Ubuntu ${{ inputs.arch }} - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' && inputs.arch == 'aarch64' - working-directory: ${{ github.workspace }} - run: | - mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }} - mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/destdir - sudo ./BuildLinux.sh -ur - sudo chown $USER -R ./ - ./BuildLinux.sh -dr - cd deps/build_${{ inputs.arch }} - tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d")_${{ inputs.arch }}.tar.gz destdir + cd deps/build + tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir # Upload Artifacts diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index c68ee12dcf..e417b3ef36 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -143,7 +143,7 @@ jobs: - name: Deploy Mac release if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14' - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 @@ -194,7 +194,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: OrcaSlicer_Windows_${{ env.ver }}_portable - path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip + path: ${{ github.workspace }}/build/OrcaSlicer - name: Upload artifacts Win installer if: inputs.os == 'windows-latest' @@ -212,7 +212,7 @@ jobs: - name: Deploy Windows release portable if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest' - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 @@ -223,7 +223,7 @@ jobs: - name: Deploy Windows release installer if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest' - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 @@ -234,7 +234,7 @@ jobs: # Ubuntu - name: Install dependencies - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' env: apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }} webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }} @@ -248,28 +248,28 @@ jobs: libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }} - name: Install dependencies from BuildLinux.sh - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' shell: bash run: sudo ./BuildLinux.sh -ur - name: Fix permissions - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' shell: bash run: sudo chown $USER -R ./ - name: Build slicer - if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' + if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' shell: bash env: ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} run: | ./BuildLinux.sh -isr - mv -n ./build_${{ inputs.arch }}/OrcaSlicer_Linux_V${{ env.ver_pure }}_${{ inputs.arch }}.AppImage ./build_${{ inputs.arch }}/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}_${{ inputs.arch }}.AppImage - chmod +x ./build_${{ inputs.arch }}/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}_${{ inputs.arch }}.AppImage + mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage + chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage - name: Build orca_custom_preset_tests - if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' - working-directory: ${{ github.workspace }}/build_${{ inputs.arch }}/src + if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' + working-directory: ${{ github.workspace }}/build/src shell: bash run: | ./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1 @@ -277,31 +277,31 @@ jobs: zip -r orca_custom_preset_tests.zip user/ - name: Upload artifacts Ubuntu - if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64' }} + if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }} env: ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }} ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} uses: actions/upload-artifact@v4 with: name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }} - path: './build_${{ inputs.arch }}/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}_${{ inputs.arch }}.AppImage' + path: './build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage' - name: Deploy Ubuntu release - if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' || inputs.arch == 'x86_64' || inputs.arch == 'aarch64') }} + if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }} env: ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 - asset_path: ./build_${{ inputs.arch }}/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}_${{ inputs.arch }}.AppImage - asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}_${{ inputs.arch }}.AppImage + asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage + asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage 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 - name: Deploy orca_custom_preset_tests if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }} - uses: WebFreak001/deploy-nightly@v3.1.0 + uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 diff --git a/flatpak/io.github.softfever.OrcaSlicer.yml b/flatpak/io.github.softfever.OrcaSlicer.yml index b7bdf221fa..73ab58b17d 100755 --- a/flatpak/io.github.softfever.OrcaSlicer.yml +++ b/flatpak/io.github.softfever.OrcaSlicer.yml @@ -31,12 +31,6 @@ modules: - -Ddoc=disabled - -Dexamples=disabled - -Dtests=disabled - build-options: - arch: - aarch64: - config-opts: - - -Dnls=disabled - - -Dstatic=disabled sources: - type: archive url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz @@ -266,13 +260,18 @@ modules: url: https://github.com/glfw/glfw/archive/refs/tags/3.3.7.zip dest: external-packages/GLFW sha256: e02d956935e5b9fb4abf90e2c2e07c9a0526d7eacae8ee5353484c69a2a76cd0 + # libnoise + - type: file + url: https://github.com/SoftFever/Orca-deps-libnoise/archive/refs/tags/1.0.zip + dest: external-packages/libnoise + sha256: 96ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6 - name: OrcaSlicer buildsystem: simple build-commands: - | - mkdir -p build && cd build - CXXFLAGS=-std=gnu++20 cmake ../ \ + mkdir -p build + CXXFLAGS=-std=gnu++20 cmake . -B build \ -DSLIC3R_PCH=OFF \ -DSLIC3R_FHS=ON \ -DSLIC3R_GTK=3 \ @@ -284,7 +283,9 @@ modules: -DBBL_RELEASE_TO_PUBLIC=1 \ -DCMAKE_PREFIX_PATH=/app \ -DCMAKE_INSTALL_PREFIX=/app - CXXFLAGS=-std=gnu++20 cmake --build . --target install -j$FLATPAK_BUILDER_N_JOBS + CXXFLAGS=-std=gnu++20 cmake --build build --target OrcaSlicer -j$FLATPAK_BUILDER_N_JOBS + ./run_gettext.sh + CXXFLAGS=-std=gnu++20 cmake --build build --target install -j$FLATPAK_BUILDER_N_JOBS cleanup: - /include