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