Skip to content

Commit

Permalink
Merge branch 'adaptive-respect-range-pr' of https://github.com/vovodr…
Browse files Browse the repository at this point in the history
…oid/OrcaSlicer into adaptive-respect-range-pr
  • Loading branch information
vovodroid committed Nov 21, 2024
2 parents 03366d0 + 9676db1 commit ac41e53
Show file tree
Hide file tree
Showing 1,745 changed files with 114,196 additions and 35,437 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
github: SoftFever
ko_fi: SoftFever
custom: https://paypal.me/softfever3d
36 changes: 19 additions & 17 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
- os: windows-latest
- os: macos-14
arch: x86_64
Expand All @@ -59,20 +60,21 @@ jobs:
arch: ${{ matrix.arch }}
build-deps-only: ${{ inputs.build-deps-only || false }}
secrets: inherit
# flatpak:
# name: "Flatpak"
# runs-on: ubuntu-latest
# container:
# image: bilelmoussaoui/flatpak-github-actions:gnome-45
# 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"
# - uses: actions/checkout@v4
# - uses: flatpak/flatpak-github-actions/flatpak-builder@v6
# with:
# bundle: orcaslicer.flatpak
# manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
# cache-key: flatpak-builder-${{ github.sha }}
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
container:
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"
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: orcaslicer.flatpak
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
cache-key: flatpak-builder-${{ github.sha }}
cache: false
29 changes: 21 additions & 8 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0" # use most recent 3.28.x version

- name: setup dev on Windows
if: inputs.os == 'windows-latest'
uses: microsoft/setup-msbuild@v2
Expand Down Expand Up @@ -72,7 +76,6 @@ jobs:
if: inputs.os == 'macos-14'
working-directory: ${{ github.workspace }}
run: |
brew install cmake
brew install automake texinfo ninja libtool
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
Expand All @@ -82,16 +85,24 @@ jobs:
brew install zstd
- name: Build on Ubuntu
if: inputs.os == 'ubuntu-20.04'
- 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') || '' }}
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
run: |
sudo apt-get update
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
${{ 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-4.0-dev \
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
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
sudo ./BuildLinux.sh -ur
Expand All @@ -117,10 +128,12 @@ jobs:
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip

- name: Upload Ubuntu artifacts
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
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') || '' }}
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz

build_orca:
Expand Down
49 changes: 33 additions & 16 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
key: ${{ inputs.cache-key }}
fail-on-cache-miss: true

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0" # use most recent 3.28.x version

- name: Get the version and date on Ubuntu and macOS
if: inputs.os != 'windows-latest'
run: |
Expand Down Expand Up @@ -77,7 +81,6 @@ jobs:
- name: Install tools mac
if: inputs.os == 'macos-14'
run: |
brew install cmake
brew install tree ninja libtool
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}
Expand Down Expand Up @@ -156,6 +159,9 @@ jobs:
- name: Build slicer Win
if: inputs.os == 'windows-latest'
working-directory: ${{ github.workspace }}
env:
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
WindowsSDKVersion: '10.0.22000.0\'
run: .\build_release_vs2022.bat slicer

- name: Create installer Win
Expand Down Expand Up @@ -221,32 +227,38 @@ jobs:

# Ubuntu
- name: Install dependencies
if: inputs.os == 'ubuntu-20.04'
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') || '' }}
libfuse2-pkg: ${{ (inputs.os == 'ubuntu-20.04' && 'libfuse2') || (inputs.os == 'ubuntu-24.04' && 'libfuse2t64') || '' }}
run: |
sudo apt-get update
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
${{ env.apt-cmd }} update
${{ env.apt-cmd }} install -y autoconf build-essential cmake curl eglexternalplatform-dev \
extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \
libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \
libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget
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'
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'
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'
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/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
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
- name: Build orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
Expand All @@ -258,20 +270,25 @@ jobs:
zip -r orca_custom_preset_tests.zip user/
- name: Upload artifacts Ubuntu
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
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_${{ env.ver }}
path: './build/OrcaSlicer_Linux_${{ env.ver }}.AppImage'
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
path: './build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'

- name: Deploy Ubuntu release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
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/[email protected]
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
asset_name: OrcaSlicer_Linux_${{ env.ver }}.AppImage
asset_path: ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
asset_name: OrcaSlicer_Linux${{ 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

Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/check_profiles.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: Check profiles
on:
pull_request:
branches:
- main
paths:
- 'resources/profiles/**'
- ".github/workflows/check_profiles.yml"
pull_request:
branches:
- main
paths:
- 'resources/profiles/**'
- ".github/workflows/check_profiles.yml"

workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'


jobs:
check_translation:
name: Check profiles
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/orca_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: Orca bot
on:
schedule:
- cron: "0 0 * * *"

workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'

jobs:
stale:
runs-on: ubuntu-latest
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/publish_docs_to_wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
branches:
- main # This can be changed to any branch of your preference

workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'

env:
USER_TOKEN: ${{ secrets.GH_WIKI_PAT }} # This is the repository secret personal access token
USER_NAME: ${{ vars.BOT_USER_NAME }} # Enter the username of your (bot) account
Expand All @@ -16,7 +23,6 @@ env:

jobs:
publish_docs_to_wiki:
if: ${{ !env.ACT }} # Skip if using `act`
name: Publish docs to Wiki
runs-on: ubuntu-latest
steps:
Expand All @@ -28,7 +34,7 @@ jobs:
run: |
git config --global user.name "$USER_NAME"
git config --global user.email "$USER_NAME"@users.noreply.github.com
git clone https://"$USER_TOKEN"@github.com/"$OWNER"/"$REPOSITORY_NAME".wiki.git tmp_wiki
git clone https://"$USER_TOKEN"@github.com/SoftFever/"$REPOSITORY_NAME".wiki.git tmp_wiki
# 4. Synchronize differences between `doc` & `tmp_wiki`
# 5. Push new Wiki content
- name: Push main repo content to wiki
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/update-translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update Translation Catalog
on:
# schedule:
# - cron: 0 0 * * 1
workflow_dispatch:

jobs:
update_translation:
name: Update translation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install gettext
run: |
sudo apt-get update
sudo apt-get install -y gettext
- name: Update translation catalog
run: |
./run_gettext.sh --full
git add localization/i18n/*
- name: Commit translation catalog updates
uses: qoomon/actions--create-commit@v1
id: commit
with:
message: Update translation catalog
skip-empty: true

- name: Push changes
run: git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ src/OrcaSlicer-doc/
/deps/DL_CACHE
**/.flatpak-builder/
resources/profiles/user/default
*.code-workspace
9 changes: 6 additions & 3 deletions BuildLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fi

DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release)
# treat ubuntu as debian
if [ "${DISTRIBUTION}" == "ubuntu" ]
if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]
then
DISTRIBUTION="debian"
fi
Expand Down Expand Up @@ -127,8 +127,11 @@ then
if [[ -n "${BUILD_DEBUG}" ]]
then
# have to build deps with debug & release or the cmake won't find everything it needs
mkdir deps/build/release
cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="../destdir" ${BUILD_ARGS}
if [ ! -d "deps/build/release" ]
then
mkdir deps/build/release
fi
cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="${PWD}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${PWD}/deps/DL_CACHE" ${BUILD_ARGS}
cmake --build deps/build/release
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
fi
Expand Down
Loading

0 comments on commit ac41e53

Please sign in to comment.