mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-01 14:27:00 +00:00
* ci: build the Windows x64 dependencies and slicer with clang-cl Passes -l -x from the Windows jobs, using the clang-cl and Ninja options added in #15373. Ninja runs each dependency's build step as a plain command, so the jobs set up a VC environment for OpenSSL's nmake. arm64 stays on MSVC for now. The deps cache key gains the compiler, so windows-x64 becomes windows-x64-clang and windows-arm64 becomes windows-arm64-msvc. * deps: select OpenSSL's ARM64 target from DEPS_ARCH CMAKE_GENERATOR_PLATFORM is only set by -A, which Ninja never receives, so the Ninja build selected the x64 target on ARM64. DEPS_ARCH is derived from CMAKE_SYSTEM_PROCESSOR and is already independent of the generator. * ci: build the Windows ARM64 dependencies and slicer with clang-cl Three dependencies need handling first. libpng and OpenCV each build an ARM SIMD path that does not compile with clang-cl, so those paths are off; PNG already had the same opt-out for Apple ARM. OCCT is built with cl, since clang-cl cannot emit one of its large generated files and there is no option to turn that off. All three are gated to Windows ARM64 with clang.
73 lines
2.8 KiB
YAML
73 lines
2.8 KiB
YAML
name: Check Cache
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
os:
|
|
required: true
|
|
type: string
|
|
arch:
|
|
required: false
|
|
type: string
|
|
compiler:
|
|
required: false
|
|
type: string
|
|
default: msvc
|
|
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@v7
|
|
with:
|
|
lfs: 'false'
|
|
|
|
- name: set outputs
|
|
id: set_outputs
|
|
env:
|
|
# Anything that changes how the tree is built belongs in the key, or a job
|
|
# restores one it cannot use. Linux amd64 passes no arch deliberately, so
|
|
# 'linux-clang' keeps the cache it already has.
|
|
cache-os: ${{ runner.os == 'macOS' && format('macos-{0}', inputs.arch) || (runner.os == 'Windows' && format('windows-{0}-{1}', inputs.arch, inputs.compiler) || format('linux-clang{0}', inputs.arch && format('-{0}', inputs.arch) || '')) }}
|
|
# ARM64 builds use the build-arm64 tree (see build_release_vs.bat); x64/other use build.
|
|
dep-folder-name: ${{ runner.os == 'macOS' && format('/{0}', inputs.arch) || (runner.os == 'Windows' && inputs.arch == 'arm64') && '-arm64/OrcaSlicer_dep' || '/OrcaSlicer_dep' }}
|
|
output-cmd: ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
|
run: |
|
|
echo cache-key=${{ env.cache-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@v6
|
|
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 }}
|
|
compiler: ${{ inputs.compiler }}
|
|
build-deps-only: ${{ inputs.build-deps-only }}
|
|
force-build: ${{ inputs.force-build }}
|
|
secrets: inherit
|