diff --git a/.github/workflows/release-portable.yml b/.github/workflows/release-portable.yml new file mode 100644 index 00000000..745db80e --- /dev/null +++ b/.github/workflows/release-portable.yml @@ -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 diff --git a/.gitignore b/.gitignore index 80599b3f..4f255144 100644 --- a/.gitignore +++ b/.gitignore @@ -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/