mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-04-06 00:32:05 +02:00
fix errors
This commit is contained in:
27
.github/workflows/build_all.yml
vendored
27
.github/workflows/build_all.yml
vendored
@@ -152,20 +152,29 @@ jobs:
|
||||
self-hosted-runner: orca-lnx-server
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
# Don't run scheduled builds on forks; skip aarch64 on self-hosted (no ARM runner)
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') && (!vars.SELF_HOSTED || matrix.variant.self-hosted-runner) }}
|
||||
runs-on: ${{ vars.SELF_HOSTED && matrix.variant.self-hosted-runner || matrix.variant.runner }}
|
||||
# Don't run scheduled builds on forks
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
# When SELF_HOSTED is set, use self-hosted runner if available, otherwise fall back to
|
||||
# cheapest GitHub runner (variant will be skipped via step conditions anyway)
|
||||
runs-on: ${{ vars.SELF_HOSTED && (matrix.variant.self-hosted-runner || 'ubuntu-24.04') || matrix.variant.runner }}
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
steps:
|
||||
- name: Check if variant should run
|
||||
id: should-run
|
||||
run: echo "skip=true" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
if: ${{ vars.SELF_HOSTED && !matrix.variant.self-hosted-runner }}
|
||||
- name: "Remove unneeded stuff to free disk space"
|
||||
if: ${{ !vars.SELF_HOSTED }}
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' && !vars.SELF_HOSTED }}
|
||||
run:
|
||||
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" /opt/hostedtoolcache1/*
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
- name: Get the version and date
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
run: |
|
||||
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
@@ -182,30 +191,33 @@ jobs:
|
||||
shell: bash
|
||||
# Manage flatpak-builder cache externally so PRs restore but never upload
|
||||
- name: Restore flatpak-builder cache
|
||||
if: github.event_name == 'pull_request'
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' && github.event_name == 'pull_request' }}
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .flatpak-builder
|
||||
key: flatpak-builder-${{ matrix.variant.arch }}-${{ github.event.pull_request.base.sha }}
|
||||
restore-keys: flatpak-builder-${{ matrix.variant.arch }}-
|
||||
- name: Save/restore flatpak-builder cache
|
||||
if: github.event_name != 'pull_request'
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' && github.event_name != 'pull_request' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .flatpak-builder
|
||||
key: flatpak-builder-${{ matrix.variant.arch }}-${{ github.sha }}
|
||||
restore-keys: flatpak-builder-${{ matrix.variant.arch }}-
|
||||
- name: Disable debug info for faster CI builds
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
run: |
|
||||
sed -i '/^build-options:/a\ no-debuginfo: true\n strip: true' \
|
||||
scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml
|
||||
shell: bash
|
||||
- name: Inject git commit hash into Flatpak manifest
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
run: |
|
||||
sed -i "/name: OrcaSlicer/{n;s|buildsystem: simple|buildsystem: simple\n build-options:\n env:\n git_commit_hash: \"$git_commit_hash\"|}" \
|
||||
scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml
|
||||
shell: bash
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@master
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
with:
|
||||
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
manifest-path: scripts/flatpak/io.github.orcaslicer.OrcaSlicer.yml
|
||||
@@ -213,12 +225,13 @@ jobs:
|
||||
arch: ${{ matrix.variant.arch }}
|
||||
upload-artifact: false
|
||||
- name: Upload artifacts Flatpak
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' }}
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
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.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && !vars.SELF_HOSTED
|
||||
if: ${{ steps.should-run.outputs.skip != 'true' && github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && !vars.SELF_HOSTED }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
|
||||
4
.github/workflows/build_orca.yml
vendored
4
.github/workflows/build_orca.yml
vendored
@@ -297,7 +297,7 @@ jobs:
|
||||
run: .\build_release_vs.bat slicer
|
||||
|
||||
- name: Create installer Win
|
||||
if: runner.os == 'Windows'
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: |
|
||||
cpack -G NSIS
|
||||
@@ -322,7 +322,7 @@ jobs:
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer
|
||||
|
||||
- name: Upload artifacts Win installer
|
||||
if: runner.os == 'Windows'
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}
|
||||
|
||||
Reference in New Issue
Block a user