Merge branch 'main' into dev/p2s-pr

This commit is contained in:
SoftFever
2025-10-29 22:28:09 +08:00
committed by GitHub
15 changed files with 227 additions and 110 deletions

View File

@@ -33,6 +33,9 @@ on:
- 'resources/**'
schedule:
- cron: '0 17 * * *' # run once a day at 1 AM Singapore time (UTC+8)
workflow_dispatch: # allows for manual dispatch
inputs:
build-deps-only:
@@ -46,24 +49,72 @@ concurrency:
jobs:
build_linux:
name: Build Linux
strategy:
fail-fast: false
# Don't run scheduled builds on forks:
if: github.event_name != 'schedule' || github.repository == 'SoftFever/OrcaSlicer'
uses: ./.github/workflows/build_check_cache.yml
with:
os: ubuntu-24.04
build-deps-only: ${{ inputs.build-deps-only || false }}
secrets: inherit
build_all:
name: Build All
name: Build Non-Linux
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
# Don't run scheduled builds on forks:
if: github.event_name != 'schedule' || github.repository == 'SoftFever/OrcaSlicer'
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
unit_tests:
name: Unit Tests
runs-on: ubuntu-24.04
needs: build_linux
if: ${{ success() }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
sparse-checkout: |
.github
scripts
- name: Apt-Install Dependencies
uses: ./.github/actions/apt-install-deps
- name: Restore Test Artifact
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-tests
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
- name: Unpackage and Run Unit Tests
timeout-minutes: 20
run: |
tar -xvf build_tests.tar
scripts/run_unit_tests.sh
- name: Upload Test Logs
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: unit-test-logs
path: build/tests/**/*.log
- name: Publish Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "ctest_results.xml"
flatpak:
name: "Flatpak"
container:
@@ -82,6 +133,8 @@ jobs:
runner: ubuntu-24.04
- arch: aarch64
runner: ubuntu-24.04-arm
# Don't run scheduled builds on forks:
if: github.event_name != 'schedule' || github.repository == 'SoftFever/OrcaSlicer'
runs-on: ${{ matrix.variant.runner }}
env:
date:
@@ -120,7 +173,7 @@ jobs:
name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
path: '/__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak'
- name: Deploy Flatpak to nightly release
if: ${{github.ref == 'refs/heads/main'}}
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}

View File

@@ -12,6 +12,9 @@ on:
build-deps-only:
required: false
type: boolean
force-build:
required: false
type: boolean
jobs:
check_cache: # determines if there is a cache and outputs variables used in caching process
@@ -55,4 +58,5 @@ jobs:
os: ${{ inputs.os }}
arch: ${{ inputs.arch }}
build-deps-only: ${{ inputs.build-deps-only }}
force-build: ${{ inputs.force-build }}
secrets: inherit

View File

@@ -19,11 +19,14 @@ on:
build-deps-only:
required: false
type: boolean
force-build:
required: false
type: boolean
jobs:
build_deps:
name: Build Deps
if: inputs.build-deps-only || inputs.valid-cache != true
if: inputs.build-deps-only || inputs.force-build || inputs.valid-cache != true
runs-on: ${{ inputs.os }}
env:
date:
@@ -85,28 +88,15 @@ jobs:
brew install zstd
- 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: |
${{ 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 wget sudo autoconf curl libunwind-dev texinfo
- name: Apt-Install Dependencies
if: inputs.os == 'ubuntu-24.04'
uses: ./.github/actions/apt-install-deps
- 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 ./build_linux.sh -ur
sudo chown $USER -R ./
./build_linux.sh -dr
cd deps/build
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
@@ -139,7 +129,7 @@ jobs:
build_orca:
name: Build OrcaSlicer
needs: [build_deps]
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success()) }}
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.force-build || (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success())) }}
uses: ./.github/workflows/build_orca.yml
with:
cache-key: ${{ inputs.cache-key }}

View File

@@ -108,7 +108,7 @@ jobs:
# Thanks to RaySajuuk, it's working now
- name: Sign app and notary
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-14'
if: github.repository == 'SoftFever/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-14'
working-directory: ${{ github.workspace }}
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
@@ -195,7 +195,7 @@ jobs:
if-no-files-found: ignore
- name: Deploy Mac release
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
@@ -206,7 +206,7 @@ jobs:
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 Mac OrcaSlicer_profile_validator DMG release
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
@@ -282,7 +282,7 @@ jobs:
path: ${{ github.workspace }}/build/src/Release/OrcaSlicer_profile_validator.exe
- name: Deploy Windows release portable
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
@@ -293,7 +293,7 @@ jobs:
max_releases: 1
- name: Deploy Windows release installer
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
@@ -304,7 +304,7 @@ jobs:
max_releases: 1
- name: Deploy Windows OrcaSlicer_profile_validator release
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
if: github.repository == 'SoftFever/OrcaSlicer' && github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
@@ -315,39 +315,34 @@ jobs:
max_releases: 1
# Ubuntu
- name: Install dependencies
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: |
${{ 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 libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }}
- name: Apt-Install Dependencies
if: inputs.os == 'ubuntu-24.04'
uses: ./.github/actions/apt-install-deps
- name: Install dependencies from build_linux.sh
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
run: sudo env "ORCA_UPDATER_SIG_KEY=$ORCA_UPDATER_SIG_KEY" ./build_linux.sh -ur
- name: Fix permissions
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
run: sudo chown $USER -R ./
- name: Build slicer
# Tests must built at the same time as the slicer;
# if you untangle them feel free to separate them here too
- name: Build slicer and tests
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
run: |
./build_linux.sh -isr
./build_linux.sh -istr
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
tar -cvpf build_tests.tar build/tests
# Use tar because upload-artifacts won't always preserve directory structure
# and doesn't preserve file permissions
- name: Upload Test Artifact
if: inputs.os == 'ubuntu-24.04'
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-tests
overwrite: true
path: build_tests.tar
retention-days: 5
if-no-files-found: error
- name: Build orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04'
@@ -378,7 +373,7 @@ jobs:
path: './build/src/Release/OrcaSlicer_profile_validator'
- name: Deploy Ubuntu release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
if: ${{ github.repository == 'SoftFever/OrcaSlicer' && ! 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.2.0
@@ -390,7 +385,7 @@ jobs:
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 Ubuntu release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }}
if: ${{ github.repository == 'SoftFever/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }}
uses: rickstaa/action-create-tag@v1
with:
tag: "nightly-builds"
@@ -399,7 +394,7 @@ jobs:
message: "nightly-builds"
- name: Deploy Ubuntu OrcaSlicer_profile_validator release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
if: ${{ github.repository == 'SoftFever/OrcaSlicer' && ! 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.2.0
@@ -412,7 +407,7 @@ jobs:
max_releases: 1
- name: Deploy orca_custom_preset_tests
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }}
if: ${{ github.repository == 'SoftFever/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }}
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}