mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-25 00:58:35 -07:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
62 lines
2 KiB
YAML
62 lines
2 KiB
YAML
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
|