mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-30 04:40:47 -07:00
Fix missing force-build, use non-docker publish action, be nice to cache (#11688)
Some checks failed
Some checks failed
* Fix missing force-build and use non-docker publish action Fixes #11687 Fixes #10404 * Initial deletion of build_check_cache Start to fold functionality into build_deps, but definitely broken. * Tests can be built separately Missed this before * Create artifact for all platforms, fix cache usage Cache is only created on `main` branch. Artifact is used to move files between jobs. The Linux artifact was broken, now it's not. The Mac artifact didn't exist, now it does. The Windows artifact gets a new name and now isn't a zip-within-a-zip. Perhaps this will cause a permissions problem; we will see shortly. * Apparently cannot update env used for `if` mid-stream * Force-build causes a clean deps build * Either build or pull from cache Cache only has final output, not intermediate files. So we either build or use the cache. * Keep dep uploads for 10 days instead It's just the final object outputs, not intermediates, so it's not as large and we can keep it slightly longer.
This commit is contained in:
parent
1ca20469d7
commit
8989e2102d
5 changed files with 51 additions and 128 deletions
62
.github/workflows/build_check_cache.yml
vendored
62
.github/workflows/build_check_cache.yml
vendored
|
|
@ -1,62 +0,0 @@
|
|||
name: Check Cache
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
arch:
|
||||
required: false
|
||||
type: string
|
||||
build-deps-only:
|
||||
required: false
|
||||
type: boolean
|
||||
force-build:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
check_cache: # determines if there is a cache and outputs variables used in caching process
|
||||
name: Check Cache
|
||||
runs-on: ${{ inputs.os }}
|
||||
outputs:
|
||||
cache-key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||
cache-path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
- name: set outputs
|
||||
id: set_outputs
|
||||
env:
|
||||
dep-folder-name: ${{ inputs.os != 'macos-14' && '/OrcaSlicer_dep' || '' }}
|
||||
output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
||||
run: |
|
||||
echo cache-key=${{ inputs.os }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
|
||||
echo cache-path=${{ github.workspace }}/deps/build${{ env.dep-folder-name }} >> ${{ env.output-cmd }}
|
||||
|
||||
- name: load cache
|
||||
id: cache_deps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||
key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||
lookup-only: true
|
||||
|
||||
build_deps: # call next step
|
||||
name: Build Deps
|
||||
needs: [check_cache]
|
||||
uses: ./.github/workflows/build_deps.yml
|
||||
with:
|
||||
cache-key: ${{ needs.check_cache.outputs.cache-key }}
|
||||
cache-path: ${{ needs.check_cache.outputs.cache-path }}
|
||||
valid-cache: ${{ needs.check_cache.outputs.valid-cache == 'true' }}
|
||||
os: ${{ inputs.os }}
|
||||
arch: ${{ inputs.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only }}
|
||||
force-build: ${{ inputs.force-build }}
|
||||
secrets: inherit
|
||||
Loading…
Add table
Add a link
Reference in a new issue