build pipeline

This commit is contained in:
Rad
2026-03-03 03:34:07 +01:00
parent 682e84e5f4
commit fc190bf9d3
6 changed files with 344 additions and 181 deletions

View File

@@ -67,8 +67,105 @@ jobs:
build-deps-only: ${{ inputs.build-deps-only || false }} build-deps-only: ${{ inputs.build-deps-only || false }}
force-build: ${{ github.event_name == 'schedule' }} force-build: ${{ github.event_name == 'schedule' }}
secrets: inherit secrets: inherit
publish_release:
name: Publish Release
needs: [build_all]
if: ${{ !cancelled() && needs.build_all.result == 'success' && github.event_name != 'pull_request' && github.repository != 'Snapmaker/OrcaSlicer' && inputs.build-deps-only != true }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v4
with:
path: release-assets
- name: Compute release metadata
id: release_meta
shell: bash
run: |
ref_name="${GITHUB_REF_NAME}"
safe_ref=$(printf '%s' "$ref_name" | tr '/ ' '--' | tr -cd '[:alnum:]._-' )
version=$(grep 'set(Snapmaker_VERSION' version.inc | cut -d '"' -f2)
tag="v${version}"
title="Snapmaker Orca Full Spectrum v${version}"
# Look for a release notes file matching the version
notes_file="RELEASE_NOTES_v${version}.md"
if [ -f "$notes_file" ]; then
notes_content=$(cat "$notes_file")
else
notes_content="Automated build for ${GITHUB_REPOSITORY}.
- Ref: ${GITHUB_REF_NAME}
- Commit: ${GITHUB_SHA}
- Version: V${version}
macOS artifacts published from this fork are unsigned and not notarized."
fi
{
echo "tag=$tag"
echo "title=$title"
echo "version=V$version"
echo "notes<<NOTES_EOF"
echo "$notes_content"
echo "NOTES_EOF"
} >> "$GITHUB_OUTPUT"
- name: Collect release files
id: collect_files
shell: bash
run: |
mkdir -p release-upload
find release-assets -type f \
\( -name '*.dmg' -o -name '*.AppImage' -o -name '*.exe' -o -name '*.zip' -o -name '*.flatpak' -o -name 'Snapmaker_Orca_profile_validator' \) \
-print -exec cp -f {} release-upload/ \;
count=$(find release-upload -maxdepth 1 -type f | wc -l | tr -d ' ')
echo "count=$count" >> "$GITHUB_OUTPUT"
if [ "$count" -eq 0 ]; then
echo "::error::No release files were collected from workflow artifacts"
exit 1
fi
find release-upload -maxdepth 1 -type f -printf 'asset=%f\n'
- name: Create or update release
if: steps.collect_files.outputs.count != '0'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
tag="${{ steps.release_meta.outputs.tag }}"
title="${{ steps.release_meta.outputs.title }}"
notes_file="$RUNNER_TEMP/release-notes.md"
printf '%s\n' "${{ steps.release_meta.outputs.notes }}" > "$notes_file"
if gh release view "$tag" >/dev/null 2>&1; then
gh release edit "$tag" \
--title "$title" \
--notes-file "$notes_file" \
--prerelease
else
gh release create "$tag" \
--title "$title" \
--notes-file "$notes_file" \
--target "$GITHUB_SHA" \
--prerelease
fi
while IFS= read -r asset_name; do
gh release delete-asset "$tag" "$asset_name" --yes
done < <(gh release view "$tag" --json assets --jq '.assets[].name')
mapfile -t upload_files < <(find release-upload -maxdepth 1 -type f | sort)
gh release upload "$tag" "${upload_files[@]}" --clobber
flatpak: flatpak:
name: "Flatpak" name: "Flatpak"
if: ${{ github.repository == 'Snapmaker/OrcaSlicer' }}
concurrency: concurrency:
group: flatpak-${{ matrix.variant.arch }}-${{ github.event.pull_request.number || github.ref }} group: flatpak-${{ matrix.variant.arch }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false cancel-in-progress: false

View File

@@ -154,7 +154,7 @@ jobs:
upload_symbols: upload_symbols:
name: Upload Debug Symbols to Sentry name: Upload Debug Symbols to Sentry
needs: [build_orca] needs: [build_orca]
if: ${{ !cancelled() && needs.build_orca.result == 'success' }} if: ${{ !cancelled() && needs.build_orca.result == 'success' && github.repository == 'Snapmaker/OrcaSlicer' }}
uses: ./.github/workflows/sentry_cli.yml uses: ./.github/workflows/sentry_cli.yml
with: with:
os: ${{ inputs.os }} os: ${{ inputs.os }}

View File

@@ -122,7 +122,7 @@ jobs:
# Thanks to RaySajuuk, it's working now # Thanks to RaySajuuk, it's working now
- name: Sign app and notary - name: Sign app and notary
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' }}
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
env: env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
@@ -175,7 +175,7 @@ jobs:
fi fi
- name: Create DMG without notary - name: Create DMG without notary
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14' && github.ref != 'refs/heads/2.2.3' if: ${{ inputs.os == 'macos-14' && (github.repository != 'Snapmaker/OrcaSlicer' || (github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') && github.ref != 'refs/heads/2.2.3')) }}
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
mkdir -p ${{ github.workspace }}/build/universal/Snapmaker_Orca_dmg mkdir -p ${{ github.workspace }}/build/universal/Snapmaker_Orca_dmg
@@ -217,7 +217,7 @@ jobs:
if-no-files-found: warn if-no-files-found: warn
- name: Deploy Mac release - name: Deploy Mac release
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
@@ -228,7 +228,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 max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
- name: Check if profile validator DMG exists - name: Check if profile validator DMG exists
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' }}
id: check_dmg id: check_dmg
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
@@ -242,7 +242,7 @@ jobs:
shell: bash shell: bash
- name: Deploy Mac Snapmaker_Orca_profile_validator DMG release - name: Deploy Mac Snapmaker_Orca_profile_validator DMG release
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' && steps.check_dmg.outputs.exists == 'true' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'macos-14' && steps.check_dmg.outputs.exists == 'true' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
@@ -294,7 +294,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Snapmaker_Orca_Windows_${{ env.ver }}_portable name: Snapmaker_Orca_Windows_${{ env.ver }}_portable
path: ${{ github.workspace }}/build/Snapmaker_Orca path: ${{ github.workspace }}/build/Snapmaker_Orca_Windows_${{ env.ver }}_portable.zip
- name: Upload artifacts Win installer - name: Upload artifacts Win installer
if: inputs.os == 'windows-latest' if: inputs.os == 'windows-latest'
@@ -318,7 +318,7 @@ jobs:
path: ${{ github.workspace }}/build/src/Release/Snapmaker_Orca_profile_validator.exe path: ${{ github.workspace }}/build/src/Release/Snapmaker_Orca_profile_validator.exe
- name: Deploy Windows release portable - name: Deploy Windows release portable
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
@@ -329,7 +329,7 @@ jobs:
max_releases: 1 max_releases: 1
- name: Deploy Windows release installer - name: Deploy Windows release installer
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
@@ -340,7 +340,7 @@ jobs:
max_releases: 1 max_releases: 1
- name: Deploy Windows Snapmaker_Orca_profile_validator release - name: Deploy Windows Snapmaker_Orca_profile_validator release
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'windows-latest' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
@@ -386,13 +386,31 @@ jobs:
chmod +x ./build/Snapmaker_Orca_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage chmod +x ./build/Snapmaker_Orca_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
- name: Build orca_custom_preset_tests - name: Build orca_custom_preset_tests
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' id: custom_preset_tests
if: ${{ github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' }}
working-directory: ${{ github.workspace }}/build/src/Release working-directory: ${{ github.workspace }}/build/src/Release
shell: bash shell: bash
run: | run: |
./Snapmaker_Orca_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1 archive="${{ github.workspace }}/resources/profiles/orca_custom_preset_tests.zip"
rm -f "$archive"
if [ ! -x ./Snapmaker_Orca_profile_validator ]; then
echo "::warning::Snapmaker_Orca_profile_validator is missing; skipping custom preset archive generation"
echo "created=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if ! ./Snapmaker_Orca_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1; then
echo "::warning::Failed to generate custom preset fixtures; skipping archive generation"
echo "created=false" >> "$GITHUB_OUTPUT"
exit 0
fi
cd ${{ github.workspace }}/resources/profiles cd ${{ github.workspace }}/resources/profiles
if [ ! -d user ]; then
echo "::warning::No generated user presets were found; skipping archive generation"
echo "created=false" >> "$GITHUB_OUTPUT"
exit 0
fi
zip -r orca_custom_preset_tests.zip user/ zip -r orca_custom_preset_tests.zip user/
echo "created=true" >> "$GITHUB_OUTPUT"
- name: Upload artifacts Ubuntu - name: Upload artifacts Ubuntu
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }} if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
@@ -414,7 +432,7 @@ jobs:
path: './build/src/Release/Snapmaker_Orca_profile_validator' path: './build/src/Release/Snapmaker_Orca_profile_validator'
- name: Deploy Ubuntu release - name: Deploy Ubuntu release
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }} if: ${{ ! env.ACT && github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
env: env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
@@ -426,7 +444,7 @@ jobs:
asset_content_type: application/octet-stream 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 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 - name: Deploy Ubuntu release
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'ubuntu-24.04' }} if: ${{ ! env.ACT && github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && inputs.os == 'ubuntu-24.04' }}
uses: rickstaa/action-create-tag@v1 uses: rickstaa/action-create-tag@v1
with: with:
tag: "nightly-builds" tag: "nightly-builds"
@@ -435,7 +453,7 @@ jobs:
message: "nightly-builds" message: "nightly-builds"
- name: Deploy Ubuntu Snapmaker_Orca_profile_validator release - name: Deploy Ubuntu Snapmaker_Orca_profile_validator release
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }} if: ${{ ! env.ACT && github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
env: env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }} ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
@@ -448,7 +466,7 @@ jobs:
max_releases: 1 max_releases: 1
- name: Deploy orca_custom_preset_tests - name: Deploy orca_custom_preset_tests
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' }} if: ${{ ! env.ACT && github.repository == 'Snapmaker/OrcaSlicer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' && steps.custom_preset_tests.outputs.created == 'true' }}
uses: WebFreak001/deploy-nightly@v3.2.0 uses: WebFreak001/deploy-nightly@v3.2.0
with: with:
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}

View File

@@ -44,7 +44,7 @@ jobs:
run: | run: |
curl -LJO https://github.com/SoftFever/OrcaSlicer/releases/download/nightly-builds/orca_custom_preset_tests.zip curl -LJO https://github.com/SoftFever/OrcaSlicer/releases/download/nightly-builds/orca_custom_preset_tests.zip
unzip ./orca_custom_preset_tests.zip -d ${{ github.workspace }}/resources/profiles unzip ./orca_custom_preset_tests.zip -d ${{ github.workspace }}/resources/profiles
./Snapmaker_Orca_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2 ./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2

48
RELEASE_NOTES_v0.9.3.md Normal file
View File

@@ -0,0 +1,48 @@
# Snapmaker Orca Full Spectrum v0.9.3 (Pre-release)
Mixed-filament reliability, Local-Z dithering fixes, and fork-safe CI/CD.
Based on Snapmaker Orca v2.2.4.
## Highlights
### Local-Z Dithering Fixes
- Fixed prime tower degradation during Local-Z dithering by directly switching extruders instead of replaying full tool change templates.
- Improved starting component logic for alternating layers so height adjustments are computed from the correct pass sequence.
- Updated tooltip to clearly explain variable layer height blending with concrete examples (e.g. a 66/33 blend at 0.12 mm prints as 0.08 mm + 0.04 mm layers).
### Stable Mixed Filament Identity
- Introduced `stable_id` for mixed filament entries, giving each entry a persistent identity that survives additions, deletions, and reordering.
- Custom GCode tool changes now reference filament IDs instead of extruder IDs, preventing misrouted tool changes when mixed filaments are modified.
- Stable ID allocation and normalization ensures consistent behavior across project save/load cycles.
### Mixed Filament 3MF and GUI Improvements
- Added functions to compute physical filament count and maximum supported filament ID from project configuration.
- GUI now displays total filament counts including mixed filaments in object list and object table.
- Streamlined color assignment and naming for both physical and mixed filaments during initialization.
- Canvas colors now refresh immediately when mixed filaments are modified.
### ObjColorPanel Filament Mapping
- Fixed filament ID assignment during color updates by introducing a mapping mechanism for appended filament IDs.
- Improved filament ID resolution in approximate-match and default-strategy code paths.
### Network Discovery Stability
- Hardened UdpSocket (mDNS/Bonjour) with a socket quarantine mechanism that centralizes error handling for setup, send, and receive operations.
- Added a `cancel` method and `m_socket_usable` flag to prevent operations on broken sockets, fixing crashes on systems where mDNS discovery fails.
## Bug Fixes
- Fixed `MixedFilamentConfigPanel` summary handling to avoid empty-string edge cases in preview data.
- Fixed `instance_shift` type to `Vec3d` for correct object pasting behavior in the Selection class.
- Replaced `wxEmptyString` with `wxString()` across Plater to prevent subtle initialization issues.
## Tests
- Added unit tests for custom GCode tool change handling with mixed filament configurations.
- Added unit tests for stable ID remapping in mixed filament scenarios.
## Important Notes
- Experimental build with limited testing.
- macOS builds from this fork are unsigned and not notarized. macOS Gatekeeper may warn or block the app; use right-click > Open or allow it in System Settings > Privacy & Security.
- Use at your own risk.
## Credits
- FilamentMixer color blending integration is powered by FilamentMixer by [justinh-rahb](https://github.com/justinh-rahb).
- Library: [https://github.com/justinh-rahb/filament-mixer](https://github.com/justinh-rahb/filament-mixer)

View File

@@ -10,7 +10,7 @@ endif()
if(NOT DEFINED BBL_INTERNAL_TESTING) if(NOT DEFINED BBL_INTERNAL_TESTING)
set(BBL_INTERNAL_TESTING "0") set(BBL_INTERNAL_TESTING "0")
endif() endif()
set(Snapmaker_VERSION "2.2.4") set(Snapmaker_VERSION "0.9.3")
set(MIN_FIRM_VER "1.0.0") set(MIN_FIRM_VER "1.0.0")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)"
Snapmaker_VERSION_MATCH ${Snapmaker_VERSION}) Snapmaker_VERSION_MATCH ${Snapmaker_VERSION})