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

@@ -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}