mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-11 06:23:08 +00:00
build pipeline
This commit is contained in:
421
.github/workflows/build_all.yml
vendored
421
.github/workflows/build_all.yml
vendored
@@ -1,162 +1,259 @@
|
||||
name: Build all
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2.0
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- 'localization/**'
|
||||
- 'resources/**'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2.0
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'build_linux.sh'
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
schedule:
|
||||
- cron: '35 7 * * *' # run once a day near midnight US Pacific time
|
||||
|
||||
workflow_dispatch: # allows for manual dispatch
|
||||
inputs:
|
||||
build-deps-only:
|
||||
description: 'Only build dependencies (bypasses caching)'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
build_all:
|
||||
name: Build All
|
||||
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
|
||||
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
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
concurrency:
|
||||
group: flatpak-${{ matrix.variant.arch }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
|
||||
options: --privileged
|
||||
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
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.variant.runner }}
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
steps:
|
||||
- name: "Remove unneeded stuff to free disk space"
|
||||
run:
|
||||
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
|
||||
- uses: actions/checkout@v5
|
||||
- name: Get the version and date
|
||||
run: |
|
||||
ver_pure=$(grep 'set(Snapmaker_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: flathub-infra/flatpak-github-actions/flatpak-builder@master
|
||||
with:
|
||||
bundle: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
manifest-path: scripts/flatpak/io.github.Snapmaker.Snapmaker_Orca.yml
|
||||
cache: true
|
||||
arch: ${{ matrix.variant.arch }}
|
||||
upload-artifact: false
|
||||
- name: Find Flatpak bundle file
|
||||
id: find_bundle
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
BUNDLE_NAME="Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak"
|
||||
# Try multiple possible locations
|
||||
if [ -f "$BUNDLE_NAME" ]; then
|
||||
BUNDLE_PATH="$(pwd)/$BUNDLE_NAME"
|
||||
elif [ -f "/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME" ]; then
|
||||
BUNDLE_PATH="/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME"
|
||||
else
|
||||
# Search in current directory and subdirectories
|
||||
FOUND=$(find . -name "$BUNDLE_NAME" -type f | head -1)
|
||||
if [ -z "$FOUND" ]; then
|
||||
echo "Error: Could not find $BUNDLE_NAME"
|
||||
echo "Searching for any .flatpak files:"
|
||||
find . -name "*.flatpak" -type f || true
|
||||
exit 1
|
||||
fi
|
||||
# Convert relative path to absolute
|
||||
BUNDLE_PATH="$(cd "$(dirname "$FOUND")" && pwd)/$(basename "$FOUND")"
|
||||
fi
|
||||
echo "path=$BUNDLE_PATH" >> $GITHUB_OUTPUT
|
||||
echo "Found bundle at: $BUNDLE_PATH"
|
||||
ls -lh "$BUNDLE_PATH" || true
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts Flatpak
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
path: ${{ steps.find_bundle.outputs.path }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy Flatpak to nightly release
|
||||
if: ${{github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3'}}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
release_id: 169912305
|
||||
asset_path: ${{ steps.find_bundle.outputs.path }}
|
||||
asset_name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}_Beta.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
|
||||
name: Build all
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2.0
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- 'localization/**'
|
||||
- 'resources/**'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2.0
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'build_linux.sh'
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
schedule:
|
||||
- cron: '35 7 * * *' # run once a day near midnight US Pacific time
|
||||
|
||||
workflow_dispatch: # allows for manual dispatch
|
||||
inputs:
|
||||
build-deps-only:
|
||||
description: 'Only build dependencies (bypasses caching)'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
build_all:
|
||||
name: Build All
|
||||
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
|
||||
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
|
||||
|
||||
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:
|
||||
name: "Flatpak"
|
||||
if: ${{ github.repository == 'Snapmaker/OrcaSlicer' }}
|
||||
concurrency:
|
||||
group: flatpak-${{ matrix.variant.arch }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
|
||||
options: --privileged
|
||||
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
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.variant.runner }}
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
steps:
|
||||
- name: "Remove unneeded stuff to free disk space"
|
||||
run:
|
||||
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
|
||||
- uses: actions/checkout@v5
|
||||
- name: Get the version and date
|
||||
run: |
|
||||
ver_pure=$(grep 'set(Snapmaker_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: flathub-infra/flatpak-github-actions/flatpak-builder@master
|
||||
with:
|
||||
bundle: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
manifest-path: scripts/flatpak/io.github.Snapmaker.Snapmaker_Orca.yml
|
||||
cache: true
|
||||
arch: ${{ matrix.variant.arch }}
|
||||
upload-artifact: false
|
||||
- name: Find Flatpak bundle file
|
||||
id: find_bundle
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
BUNDLE_NAME="Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak"
|
||||
# Try multiple possible locations
|
||||
if [ -f "$BUNDLE_NAME" ]; then
|
||||
BUNDLE_PATH="$(pwd)/$BUNDLE_NAME"
|
||||
elif [ -f "/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME" ]; then
|
||||
BUNDLE_PATH="/__w/Snapmaker_Orca/Snapmaker_Orca/$BUNDLE_NAME"
|
||||
else
|
||||
# Search in current directory and subdirectories
|
||||
FOUND=$(find . -name "$BUNDLE_NAME" -type f | head -1)
|
||||
if [ -z "$FOUND" ]; then
|
||||
echo "Error: Could not find $BUNDLE_NAME"
|
||||
echo "Searching for any .flatpak files:"
|
||||
find . -name "*.flatpak" -type f || true
|
||||
exit 1
|
||||
fi
|
||||
# Convert relative path to absolute
|
||||
BUNDLE_PATH="$(cd "$(dirname "$FOUND")" && pwd)/$(basename "$FOUND")"
|
||||
fi
|
||||
echo "path=$BUNDLE_PATH" >> $GITHUB_OUTPUT
|
||||
echo "Found bundle at: $BUNDLE_PATH"
|
||||
ls -lh "$BUNDLE_PATH" || true
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts Flatpak
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
path: ${{ steps.find_bundle.outputs.path }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy Flatpak to nightly release
|
||||
if: ${{github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.3'}}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
release_id: 169912305
|
||||
asset_path: ${{ steps.find_bundle.outputs.path }}
|
||||
asset_name: Snapmaker_Orca-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}_Beta.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
|
||||
|
||||
4
.github/workflows/build_deps.yml
vendored
4
.github/workflows/build_deps.yml
vendored
@@ -154,11 +154,11 @@ jobs:
|
||||
upload_symbols:
|
||||
name: Upload Debug Symbols to Sentry
|
||||
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
|
||||
with:
|
||||
os: ${{ inputs.os }}
|
||||
pdb-artifact-name: PDB
|
||||
dsym-artifact-name: ${{ inputs.os == 'macos-14' && format('dSYM_Mac_{0}', needs.build_orca.outputs.release) || '' }}
|
||||
release: ${{ needs.build_orca.outputs.release || github.sha }}
|
||||
secrets: inherit
|
||||
secrets: inherit
|
||||
|
||||
48
.github/workflows/build_orca.yml
vendored
48
.github/workflows/build_orca.yml
vendored
@@ -122,7 +122,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/') || 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 }}
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
@@ -175,7 +175,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- 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 }}
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/build/universal/Snapmaker_Orca_dmg
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
if-no-files-found: warn
|
||||
|
||||
- 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
|
||||
with:
|
||||
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
|
||||
|
||||
- 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
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
@@ -242,7 +242,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- 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
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -294,7 +294,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
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
|
||||
if: inputs.os == 'windows-latest'
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
path: ${{ github.workspace }}/build/src/Release/Snapmaker_Orca_profile_validator.exe
|
||||
|
||||
- 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
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -329,7 +329,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- 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
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -340,7 +340,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- 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
|
||||
with:
|
||||
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
|
||||
|
||||
- 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
|
||||
shell: bash
|
||||
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
|
||||
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/
|
||||
echo "created=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload artifacts Ubuntu
|
||||
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'
|
||||
|
||||
- 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:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
@@ -426,7 +444,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' || 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
|
||||
with:
|
||||
tag: "nightly-builds"
|
||||
@@ -435,7 +453,7 @@ jobs:
|
||||
message: "nightly-builds"
|
||||
|
||||
- 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:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
@@ -448,7 +466,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- 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
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
|
||||
2
.github/workflows/check_profiles.yml
vendored
2
.github/workflows/check_profiles.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
run: |
|
||||
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
|
||||
./Snapmaker_Orca_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user