From 95887780b91f3acd2a7fff4032e17b2ed3dadecd Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 12:15:13 +0800 Subject: [PATCH 01/12] enable cache --- .github/workflows/build_all.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index f71148e6ede..76df77eeadd 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -76,5 +76,4 @@ jobs: with: bundle: orcaslicer.flatpak manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml - cache-key: flatpak-builder-${{ github.sha }} - cache: false + cache: true From 50089ded0a047021dac9d1ee3f6254e929c93031 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 12:16:05 +0800 Subject: [PATCH 02/12] disable other jobs temporarily --- .github/workflows/build_all.yml | 19 ------------------- flatpak/setup_env_ubuntu24.04.sh | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 19 deletions(-) create mode 100755 flatpak/setup_env_ubuntu24.04.sh diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 76df77eeadd..fa20b3a12ce 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -41,25 +41,6 @@ concurrency: jobs: - build_all: - name: Build All - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-20.04 - - os: ubuntu-24.04 - - os: windows-latest - - os: macos-14 - arch: x86_64 - - 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 }} - secrets: inherit flatpak: name: "Flatpak" runs-on: ubuntu-latest diff --git a/flatpak/setup_env_ubuntu24.04.sh b/flatpak/setup_env_ubuntu24.04.sh new file mode 100755 index 00000000000..e184e81d522 --- /dev/null +++ b/flatpak/setup_env_ubuntu24.04.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +sudo apt update +sudo apt install build-essential flatpak flatpak-builder gnome-software-plugin-flatpak -y +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +flatpak install flathub org.gnome.Platform//46 org.gnome.Sdk//46 + +mkdir orcaslicer-build +cd orcaslicer-build + +git clone https://github.com/SoftFever/OrcaSlicer.git +cd OrcaSlicer + +flatpak-builder --force-clean build-dir flatpak/io.github.softfever.OrcaSlicer.yml \ No newline at end of file From 50b7c9fca1616f23e797816e9117142960d01087 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 17:08:41 +0800 Subject: [PATCH 03/12] test --- flatpak/setup_env_ubuntu24.04.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/flatpak/setup_env_ubuntu24.04.sh b/flatpak/setup_env_ubuntu24.04.sh index e184e81d522..d26531e0019 100755 --- a/flatpak/setup_env_ubuntu24.04.sh +++ b/flatpak/setup_env_ubuntu24.04.sh @@ -5,10 +5,11 @@ sudo apt install build-essential flatpak flatpak-builder gnome-software-plugin-f flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.gnome.Platform//46 org.gnome.Sdk//46 -mkdir orcaslicer-build -cd orcaslicer-build -git clone https://github.com/SoftFever/OrcaSlicer.git -cd OrcaSlicer +## +# in OrcaSlicer folder, run following command to build Orca +# # First time build +# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user --force-clean build-dir flatpak/io.github.softfever.OrcaSlicer.yml -flatpak-builder --force-clean build-dir flatpak/io.github.softfever.OrcaSlicer.yml \ No newline at end of file +# # Subsequent builds (only rebuilding OrcaSlicer) +# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user build-dir flatpak/io.github.softfever.OrcaSlicer.yml --build-only=OrcaSlicer \ No newline at end of file From ad4725342a78ee04e2e55e619c72ef603b5de3ed Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 17:40:10 +0800 Subject: [PATCH 04/12] try to fix orca_deps cache miss --- flatpak/io.github.softfever.OrcaSlicer.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flatpak/io.github.softfever.OrcaSlicer.yml b/flatpak/io.github.softfever.OrcaSlicer.yml index 0eb8b86c144..69f641efb93 100755 --- a/flatpak/io.github.softfever.OrcaSlicer.yml +++ b/flatpak/io.github.softfever.OrcaSlicer.yml @@ -138,26 +138,31 @@ modules: - name: orca_deps buildsystem: simple + build-options: + env: + # Keep downloads in a persistent location + DEP_DOWNLOAD_DIR: /app/external-packages build-commands: # start build - | mkdir deps/build && cd deps/build cmake ../ \ -DDEP_WX_GTK3=ON \ - -DDEP_DOWNLOAD_DIR=/run/build/orca_deps/external-packages \ + -DDEP_DOWNLOAD_DIR=/app/external-packages \ -DCMAKE_PREFIX_PATH=/app \ -DDESTDIR=/app \ -DCMAKE_INSTALL_LIBDIR=/app/lib \ -DFLATPAK=ON \ -DCMAKE_INSTALL_PREFIX=/app cmake --build . - rm -r /run/build/orca_deps/external-packages + # Don't remove external-packages cleanup: - /app/include - "*.a" - "*.la" - /app/lib/cmake + - /app/external-packages # Clean up after build instead sources: # - From 5a9f4f9a89c65bd4020a284a5d06c5b9cb36d2b8 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 17:45:52 +0800 Subject: [PATCH 05/12] revert and test --- flatpak/io.github.softfever.OrcaSlicer.yml | 9 ++------- version.inc | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/flatpak/io.github.softfever.OrcaSlicer.yml b/flatpak/io.github.softfever.OrcaSlicer.yml index 69f641efb93..0eb8b86c144 100755 --- a/flatpak/io.github.softfever.OrcaSlicer.yml +++ b/flatpak/io.github.softfever.OrcaSlicer.yml @@ -138,31 +138,26 @@ modules: - name: orca_deps buildsystem: simple - build-options: - env: - # Keep downloads in a persistent location - DEP_DOWNLOAD_DIR: /app/external-packages build-commands: # start build - | mkdir deps/build && cd deps/build cmake ../ \ -DDEP_WX_GTK3=ON \ - -DDEP_DOWNLOAD_DIR=/app/external-packages \ + -DDEP_DOWNLOAD_DIR=/run/build/orca_deps/external-packages \ -DCMAKE_PREFIX_PATH=/app \ -DDESTDIR=/app \ -DCMAKE_INSTALL_LIBDIR=/app/lib \ -DFLATPAK=ON \ -DCMAKE_INSTALL_PREFIX=/app cmake --build . - # Don't remove external-packages + rm -r /run/build/orca_deps/external-packages cleanup: - /app/include - "*.a" - "*.la" - /app/lib/cmake - - /app/external-packages # Clean up after build instead sources: # - diff --git a/version.inc b/version.inc index 7eb37fdde40..959a5a14d65 100644 --- a/version.inc +++ b/version.inc @@ -10,7 +10,7 @@ endif() if(NOT DEFINED BBL_INTERNAL_TESTING) set(BBL_INTERNAL_TESTING "0") endif() -set(SoftFever_VERSION "2.3.0-dev") +set(SoftFever_VERSION "2.35.0-dev") string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" SoftFever_VERSION_MATCH ${SoftFever_VERSION}) set(ORCA_VERSION_MAJOR ${CMAKE_MATCH_1}) From f3619434438b80b67733a75ca177a51f973abc30 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 11 Dec 2024 22:26:41 +0800 Subject: [PATCH 06/12] tweak naming --- .github/workflows/build_all.yml | 37 ++++++++++++++++++- ...o.github.softfever.OrcaSlicer.metainfo.xml | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index fa20b3a12ce..46cd8f17838 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -41,9 +41,32 @@ concurrency: jobs: + build_all: + name: Build All + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-20.04 + - os: ubuntu-24.04 + - os: windows-latest + - os: macos-14 + arch: x86_64 + - 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 }} + secrets: inherit flatpak: name: "Flatpak" runs-on: ubuntu-latest + env: + date: + ver: + ver_pure: container: image: bilelmoussaoui/flatpak-github-actions:gnome-46 options: --privileged @@ -53,8 +76,20 @@ jobs: run: sudo rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY" - uses: actions/checkout@v4 + - name: Get the version and date + run: | + ver_pure=$(grep 'set(SoftFever_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: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: orcaslicer.flatpak + bundle: OrcaSlicer-Linux_${{ env.ver }}.flatpak manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml cache: true diff --git a/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml b/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml index 1b2a60d7431..4c04ff99a08 100755 --- a/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml +++ b/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml @@ -36,7 +36,7 @@ -

A 3D printer slicer forked from Bambu Studio, PrusaSlicer, and SuperSlicer with many more printer profiles, helpful calibration prints, and many more features to get your 3D printer printing perfectly!

+

A powerful, free and open-source 3D printer slicer that features cutting-edge technology.

#009688 From d39799c2c30a429235d6d86560a16dd640570768 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 11 Dec 2024 23:29:56 +0800 Subject: [PATCH 07/12] free space --- .github/workflows/build_all.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 46cd8f17838..bfccd53b9fa 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -71,10 +71,16 @@ jobs: image: bilelmoussaoui/flatpak-github-actions:gnome-46 options: --privileged steps: - # maybe i'm too dumb and fucked up to do CI. OH WELL :D -ppd - - name: "Remove unneeded stuff to free disk space" - run: - sudo rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY" + - name: free disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - uses: actions/checkout@v4 - name: Get the version and date run: | From ca2db3a60fab7f15b0a7a2f58bfc13239ca819ac Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 11 Dec 2024 23:30:55 +0800 Subject: [PATCH 08/12] keep docker --- .github/workflows/build_all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index bfccd53b9fa..59f8f1b9f4b 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -79,7 +79,7 @@ jobs: dotnet: true haskell: true large-packages: true - docker-images: true + docker-images: false swap-storage: true - uses: actions/checkout@v4 - name: Get the version and date From efa6fc9b8c5213182caf08cf14e2fde1fae7e4d9 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Mon, 30 Dec 2024 23:35:06 +0800 Subject: [PATCH 09/12] 11 --- .github/workflows/build_all.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 59f8f1b9f4b..4ca93aa0336 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -70,17 +70,20 @@ jobs: container: image: bilelmoussaoui/flatpak-github-actions:gnome-46 options: --privileged + volumes: + - /usr/local/lib/android:/usr/local/lib/android + - /usr/share/dotnet:/usr/share/dotnet steps: - name: free disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: true + tool-cache: false android: true dotnet: true - haskell: true - large-packages: true + haskell: false + large-packages: false docker-images: false - swap-storage: true + swap-storage: false - uses: actions/checkout@v4 - name: Get the version and date run: | From 8219b553921efa99d12f50cad1951011650bb342 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Tue, 31 Dec 2024 11:28:31 +0800 Subject: [PATCH 10/12] 12 --- .github/workflows/build_all.yml | 31 ++++++++++++++++++++----------- .github/workflows/build_orca.yml | 10 +++++----- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 4ca93aa0336..da3141250b1 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -73,17 +73,12 @@ jobs: 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 steps: - - name: free disk space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: false - large-packages: false - docker-images: false - swap-storage: false + - name: "Remove unneeded stuff to free disk space" + run: + sudo rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" - uses: actions/checkout@v4 - name: Get the version and date run: | @@ -99,6 +94,20 @@ jobs: shell: bash - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: OrcaSlicer-Linux_${{ env.ver }}.flatpak + bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml cache: true + - name: test + run: | + apt install tree + tree + - name: Deploy Flatpak to daily release + if: ${{github.ref == 'refs/heads/main'}} + uses: WebFreak001/deploy-nightly@v3.1.0 + with: + upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} + release_id: 137995723 + asset_path: ./build/OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak + asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}.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 diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index ae855633d76..56548dc46a2 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -257,8 +257,8 @@ jobs: ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} run: | ./BuildLinux.sh -isr - mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage - chmod +x ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.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' @@ -277,7 +277,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }} - path: './build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.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') }} @@ -287,8 +287,8 @@ jobs: with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 - asset_path: ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage - asset_name: OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.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 From 4d5944090fcecb5bc4da7349011240dd05119284 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Tue, 31 Dec 2024 12:54:16 +0800 Subject: [PATCH 11/12] nightly build --- .github/workflows/build_all.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index da3141250b1..6aa50095c02 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -97,17 +97,13 @@ jobs: bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml cache: true - - name: test - run: | - apt install tree - tree - - name: Deploy Flatpak to daily release + - name: Deploy Flatpak to nightly release if: ${{github.ref == 'refs/heads/main'}} uses: WebFreak001/deploy-nightly@v3.1.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} release_id: 137995723 - asset_path: ./build/OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak + asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}.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 From 3e13ee049d1234257c2befdf7d92f523af947408 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Tue, 31 Dec 2024 14:42:30 +0800 Subject: [PATCH 12/12] revert version --- version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.inc b/version.inc index 959a5a14d65..7eb37fdde40 100644 --- a/version.inc +++ b/version.inc @@ -10,7 +10,7 @@ endif() if(NOT DEFINED BBL_INTERNAL_TESTING) set(BBL_INTERNAL_TESTING "0") endif() -set(SoftFever_VERSION "2.35.0-dev") +set(SoftFever_VERSION "2.3.0-dev") string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" SoftFever_VERSION_MATCH ${SoftFever_VERSION}) set(ORCA_VERSION_MAJOR ${CMAKE_MATCH_1})