Initial release

This commit is contained in:
civ
2026-08-16 18:24:52 +07:00
commit 876886a39a
13244 changed files with 2353959 additions and 0 deletions
+77
View File
@@ -0,0 +1,77 @@
# Validate that the project builds on Ubuntu and macOS (no model download).
name: CI Build
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq cmake build-essential pkg-config libopenblas-dev
mkdir build && cd build
cmake .. -DGGML_BLAS=ON
cmake --build . --config Release -j$(nproc)
- name: Build (macOS)
if: matrix.os == 'macos-latest'
run: |
mkdir build && cd build
cmake ..
cmake --build . --config Release -j$(sysctl -n hw.ncpu)
- name: Smoke test
run: |
./build/ace-lm --help 2>&1 | head -5
./build/ace-synth --help 2>&1 | head -5
./build/quantize --help 2>&1 | head -3
lint:
name: Lint & Static Analysis
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Install lint tools
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq clang-format clang-tidy cppcheck
- name: Run clang-format (check mode)
run: |
find . \
\( -path './.git' -o -path './ggml' -o -path './build' -o -path './vendor' -o -path './mp3' \) -prune -o \
-type f \( -name '*.c' -o -name '*.h' -o -name '*.cc' -o -name '*.cpp' -o -name '*.hpp' \) \
-print0 | xargs -0 clang-format --dry-run --Werror
- name: Run cppcheck
run: |
cppcheck --enable=all --error-exitcode=1 --inline-suppr \
--suppress=missingIncludeSystem \
--suppress=missingInclude \
--suppress=cstyleCast \
--suppress=constVariable \
--suppress=constVariablePointer \
--suppress=constParameterPointer \
--suppress=variableScope \
--suppress=uselessCallsSubstr \
--suppress=useStlAlgorithm \
--suppress=shiftNegativeLHS \
-i ggml -i build -i .git -i mp3 \
.
+263
View File
@@ -0,0 +1,263 @@
name: Build & Release Binaries
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to attach binaries to (e.g. v0.1.0)'
required: true
type: string
skip_linux:
description: 'Skip Linux build'
required: false
type: boolean
default: false
skip_mac:
description: 'Skip macOS build'
required: false
type: boolean
default: false
skip_windows:
description: 'Skip Windows build'
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
build-linux:
name: Build · linux-x64
runs-on: ubuntu-22.04
if: github.event_name != 'workflow_dispatch' || !inputs.skip_linux
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build tools
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq cmake build-essential pkg-config libopenblas-dev
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
create-symlink: true
key: build-linux-ubuntu-22.04
- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.30
with:
log-file-suffix: 'ubuntu-22.04.txt'
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true
- name: Configure & Build
run: |
./buildall.sh
- name: Smoke test
continue-on-error: true
shell: bash
run: |
BIN="build"
"$BIN/ace-lm" 2>&1 | head -5
"$BIN/ace-synth" 2>&1 | head -5
"$BIN/ace-understand" 2>&1 | head -5
"$BIN/neural-codec" 2>&1 | head -5
"$BIN/quantize" 2>&1 | head -3
"$BIN/mp3-codec" 2>&1 | head -3
- name: Resolve release tag
id: tag
shell: bash
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "value=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "value=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
fi
- name: Package binaries
run: |
mkdir -p dist
cp build/ace-* \
build/quantize build/neural-codec build/mp3-codec build/*.so dist/
tar -C dist -czf "acestep-linux-x64.tar.gz" .
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ steps.tag.outputs.value }}" \
"acestep-linux-x64.tar.gz" \
--clobber
build-mac:
name: Build · macos-arm64-metal
runs-on: macos-latest
if: github.event_name != 'workflow_dispatch' || !inputs.skip_mac
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
create-symlink: true
key: build-mac-macos-latest
- name: Configure & Build
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release -j "$(nproc)"
- name: Smoke test
continue-on-error: true
shell: bash
run: |
BIN="build"
"$BIN/ace-lm" 2>&1 | head -5
"$BIN/ace-synth" 2>&1 | head -5
"$BIN/ace-understand" 2>&1 | head -5
"$BIN/neural-codec" 2>&1 | head -5
"$BIN/quantize" 2>&1 | head -3
"$BIN/mp3-codec" 2>&1 | head -3
- name: Resolve release tag
id: tag
shell: bash
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "value=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "value=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
fi
- name: Package binaries
run: |
mkdir -p dist
cd build
for bin in ace-* quantize neural-codec mp3-codec; do
install_name_tool -add_rpath @executable_path "$bin"
done
cp -P ace-* quantize neural-codec mp3-codec libacestep*.a libggml*.dylib ../dist/
cd ..
tar -C dist -czf "acestep-macos-arm64-metal.tar.gz" .
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ steps.tag.outputs.value }}" \
"acestep-macos-arm64-metal.tar.gz" \
--clobber
build-windows:
name: Build · windows-x64
runs-on: windows-latest
if: github.event_name != 'workflow_dispatch' || !inputs.skip_windows
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache CUDA toolkit
id: cache-cuda
uses: actions/cache@v4
with:
path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
key: cuda-12-windows-latest
- name: Install CUDA toolkit
if: steps.cache-cuda.outputs.cache-hit != 'true'
uses: Jimver/cuda-toolkit@v0.2.30
with:
log-file-suffix: 'windows-latest.txt'
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true
- name: Cache build directory
uses: actions/cache@v4
with:
path: build-msvc
key: build-msvc-${{ github.sha }}
restore-keys: |
build-msvc-
- name: Configure & Build
shell: pwsh
run: |
# Configure — only print errors
cmake -S . -B build-msvc `
-DGGML_CPU_ALL_VARIANTS=ON `
-DGGML_CUDA=ON `
-DGGML_VULKAN=ON `
-DGGML_BACKEND_DL=ON `
--log-level=ERROR 2>&1 | Where-Object { $_ -notmatch '^--' }
# Build — suppress per-file progress, only show warnings/errors
cmake --build build-msvc --config Release -j $env:NUMBER_OF_PROCESSORS `
-- /v:minimal /consoleloggerparameters:ErrorsOnly 2>&1 `
| Where-Object { $_ -match '(error|warning|FAILED|fatal)' -or $_ -eq '' } `
| Select-Object -Last 50
- name: Smoke test
continue-on-error: true
shell: bash
run: |
BIN="build-msvc/Release"
"$BIN/ace-lm.exe" 2>&1 | head -5
"$BIN/ace-synth.exe" 2>&1 | head -5
"$BIN/ace-understand.exe" 2>&1 | head -5
"$BIN/neural-codec.exe" 2>&1 | head -5
"$BIN/quantize.exe" 2>&1 | head -3
"$BIN/mp3-codec.exe" 2>&1 | head -3
- name: Resolve release tag
id: tag
shell: bash
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "value=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "value=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
fi
- name: Package binaries
shell: pwsh
run: |
New-Item -ItemType Directory -Path dist | Out-Null
Copy-Item "build-msvc\Release\*.exe" dist\ -ErrorAction SilentlyContinue
Copy-Item "build-msvc\Release\*.dll" dist\ -ErrorAction SilentlyContinue
Compress-Archive -Path dist\* -DestinationPath "acestep-windows-x64.zip"
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
gh release upload "${{ steps.tag.outputs.value }}" `
"acestep-windows-x64.zip" `
--clobber