This commit is contained in:
Filve 2026-10-07 19:39:03 +02:00
parent bbcbe7459e
commit 85a45a4164
2 changed files with 84 additions and 1 deletions

77
.github/workflows/release-portable.yml vendored Normal file
View file

@ -0,0 +1,77 @@
name: Release portable package
# Builds relocatable packages with dynamic ggml backends
# (see docs/build.md, "Build a portable package").
on:
workflow_dispatch:
push:
tags:
- "portable-v*"
permissions:
contents: write
jobs:
package:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x86_64
cmake_args: >-
-DGGML_CPU_ALL_VARIANTS=ON -DGGML_NATIVE=OFF
- os: macos-14
name: darwin-arm64
cmake_args: >-
-DSD_METAL=ON
- os: windows-latest
name: windows-x86_64
cmake_args: >-
-DGGML_CPU_ALL_VARIANTS=ON -DGGML_NATIVE=OFF
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Checkout required submodules
run: git submodule update --init ggml thirdparty/libwebp thirdparty/libwebm
- name: Setup MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
shell: bash
run: >-
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
-DSD_BUILD_SHARED_GGML_LIB=ON -DBUILD_SHARED_LIBS=ON -DGGML_BACKEND_DL=ON
${{ matrix.cmake_args }}
- name: Build
shell: bash
run: cmake --build build -j
- name: Security smoke test
if: runner.os != 'Windows'
shell: bash
run: ./test/security_smoke.sh build/bin/sd-cli
- name: Package
shell: bash
run: ./scripts/package_portable.sh build dist
- uses: actions/upload-artifact@v4
with:
name: portable-${{ matrix.name }}
path: dist/*.zip
- name: Attach to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/*.zip

8
.gitignore vendored
View file

@ -1,6 +1,12 @@
build*/
cmake-build-*/
test/
dist/
# Fork: the curated robustness suite is tracked; everything else in test/ stays local.
test/*
!test/README.md
!test/security_smoke.sh
!test/api_robustness.cpp
!test/fuzz_model_loader.py
tests/
.vscode/
.idea/