From 95887780b91f3acd2a7fff4032e17b2ed3dadecd Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 8 Dec 2024 12:15:13 +0800 Subject: [PATCH 1/8] 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 f71148e6ed..76df77eead 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 2/8] 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 76df77eead..fa20b3a12c 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 0000000000..e184e81d52 --- /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 3/8] 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 e184e81d52..d26531e001 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 4/8] 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 0eb8b86c14..69f641efb9 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 5/8] 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 69f641efb9..0eb8b86c14 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 7eb37fdde4..959a5a14d6 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 6/8] 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 fa20b3a12c..46cd8f1783 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 1b2a60d743..4c04ff99a0 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 7/8] 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 46cd8f1783..bfccd53b9f 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 8/8] 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 bfccd53b9f..59f8f1b9f4 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