Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 181 additions & 81 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,98 +9,74 @@ on:
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:
name: Build · ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x64
os: ubuntu-22.04
cmake_flags: -DGGML_BLAS=ON
apt_extra: pkg-config libopenblas-dev
install_cuda: true
install_vulkan: true
- name: macos-arm64-metal
os: macos-latest
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 (Linux)
if: runner.os == 'Linux'
- name: Install build tools
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq cmake build-essential ${{ matrix.apt_extra || '' }}
sudo apt-get install -y -qq cmake build-essential pkg-config libopenblas-dev

- name: ccache
if: runner.os != 'Windows'
uses: hendrikmuhs/ccache-action@v1.2
with:
create-symlink: true
key: ${{ github.job }}-${{ matrix.os }}
key: build-linux-ubuntu-22.04

- name: Install CUDA toolkit (Linux)
- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.30
if: matrix.install_cuda == true
with:
log-file-suffix: '${{matrix.os}}.txt'
log-file-suffix: 'ubuntu-22.04.txt'
Comment on lines +54 to +57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and read the workflow file
cat -n .github/workflows/release.yml | head -100

Repository: ServeurpersoCom/acestep.cpp

Length of output: 3435


🏁 Script executed:

# Also check if the file exists and get its total line count
wc -l .github/workflows/release.yml

Repository: ServeurpersoCom/acestep.cpp

Length of output: 104


🏁 Script executed:

# Read the specific sections mentioned (lines 58-61 and 193-205)
sed -n '50,70p' .github/workflows/release.yml | cat -n

Repository: ServeurpersoCom/acestep.cpp

Length of output: 789


🏁 Script executed:

# Read the Windows section around lines 193-205
sed -n '185,210p' .github/workflows/release.yml | cat -n

Repository: ServeurpersoCom/acestep.cpp

Length of output: 1025


🌐 Web query:

Jimver/cuda-toolkit v0.2.30 default CUDA version

💡 Result:

In Jimver/cuda-toolkit v0.2.30, if you don’t specify the cuda input, the action installs CUDA 13.1.0 by default (inputs.cuda.default: '13.1.0'). [1]


Pin CUDA toolkit version explicitly in both Linux and Windows jobs.

Both Jimver/cuda-toolkit steps omit the cuda: input and default to 13.1.0, while the Windows cache key is labeled cuda-12-windows-latest, creating a mismatch between the expected and actual toolchain version. Define the cuda: version explicitly in both steps (lines 58-61 and ~202-206) to ensure consistency and prevent DLL ABI drift between builds.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 58 - 61, The "Install CUDA
toolkit" steps using Jimver/cuda-toolkit@v0.2.30 in both the Linux and Windows
jobs are missing an explicit cuda: input and thus default to CUDA 13.1.0; update
both occurrences of the "Install CUDA toolkit" step (the ones that call
Jimver/cuda-toolkit@v0.2.30) to include a cuda: input pinned to your CUDA 12
toolchain (e.g., cuda: '12.1.0' or whatever exact 12.x version your cache key
uses) so the runtime/toolchain version matches the Windows cache key
(cuda-12-windows-latest).


- name: Install Vulkan SDK (Windows)
if: matrix.install_vulkan == true
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true

- name: Configure & Build (Linux / macOS)
if: runner.os == 'Linux'
- name: Configure & Build
run: |
./buildall.sh

- name: Configure & Build (Linux / macOS)
if: runner.os == 'macOS'
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release -j "$(nproc)"

- name: Configure & Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Path build | Out-Null
Set-Location build
cmake -B build-msvc -DGGML_CPU_ALL_VARIANTS=ON -DGGML_CUDA=ON -DGGML_VULKAN=ON -DGGML_BACKEND_DL=ON
cmake --build build-msvc --config Release -j $env:NUMBER_OF_PROCESSORS

- name: Smoke test
continue-on-error: true
shell: bash
Comment on lines 70 to 71
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Smoke-test failures currently do not block release uploads.

Line 70, Line 131, and Line 227 set continue-on-error: true, so failed binaries can still be packaged and uploaded in release runs.

Suggested patch
-      - name: Smoke test
-        continue-on-error: true
+      - name: Smoke test
+        continue-on-error: ${{ github.event_name == 'workflow_dispatch' }}
@@
-      - name: Smoke test
-        continue-on-error: true
+      - name: Smoke test
+        continue-on-error: ${{ github.event_name == 'workflow_dispatch' }}
@@
-      - name: Smoke test
-        continue-on-error: true
+      - name: Smoke test
+        continue-on-error: ${{ github.event_name == 'workflow_dispatch' }}

Also applies to: 131-132, 227-228

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 70 - 71, The workflow sets
continue-on-error: true at multiple steps (the continue-on-error key present
near the shell: bash entries), which allows smoke-test failures to not block
releases; update each occurrence (the continue-on-error entries at the three
locations) to either remove the continue-on-error key or set it to false so
failures fail the job and prevent packaging/uploading of bad binaries, then
re-run CI to ensure smoke-test failures now fail the release workflow.

run: |
if [ "$RUNNER_OS" = "Windows" ]; then
BIN="build/Release"
EXT=".exe"
else
BIN="build"
EXT=""
fi
"$BIN/ace-lm$EXT" 2>&1 | head -5
"$BIN/ace-synth$EXT" 2>&1 | head -5
"$BIN/ace-understand$EXT" 2>&1 | head -5
"$BIN/neural-codec$EXT" 2>&1 | head -5
"$BIN/quantize$EXT" 2>&1 | head -3
"$BIN/mp3-codec$EXT" 2>&1 | head -3
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
Expand All @@ -112,16 +88,68 @@ jobs:
echo "value=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
fi

- name: Package binaries (Linux)
if: runner.os == 'Linux'
- 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-${{ matrix.name }}.tar.gz" .
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: Package binaries (macOS)
if: runner.os == 'macOS'
- 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
Expand All @@ -130,34 +158,106 @@ jobs:
done
cp -P ace-* quantize neural-codec mp3-codec libacestep*.a libggml*.dylib ../dist/
cd ..
tar -C dist -czf "acestep-${{ matrix.name }}.tar.gz" .

- name: Package binaries (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Path dist | Out-Null
$bins = @('ace-lm','ace-synth','ace-understand','quantize','neural-codec','mp3-codec')
foreach ($b in $bins) {
Copy-Item "build\Release\$b.exe" dist\
}
Compress-Archive -Path dist\* -DestinationPath "acestep-${{ matrix.name }}.zip"

- name: Upload to release (Linux / macOS)
if: runner.os != 'Windows'
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-${{ matrix.name }}.tar.gz" \
"acestep-macos-arm64-metal.tar.gz" \
--clobber

- name: Upload to release (Windows)
if: runner.os == 'Windows'
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"
Comment on lines +248 to +254
Copy link
Contributor

@coderabbitai coderabbitai bot Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

The Windows ZIP is not portable yet.

This step only copies files from build-msvc\Release. The PR notes call out extra MSVC runtime DLLs and matching CUDA runtime DLLs as required for portability, so the uploaded archive will still fail on clean Windows hosts. While curating that list, exclude build-only tools like vulkan-shaders-gen.exe from the release payload.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 261 - 267, The "Package binaries"
job only copies files from build-msvc\Release and omits required redistributable
runtime DLLs (MSVC CRT/MSVCP, matching CUDA runtime DLLs) while also potentially
including build-only tools like vulkan-shaders-gen.exe; update the step that
currently runs Copy-Item and Compress-Archive so it collects and copies the MSVC
runtime DLLs and the matching CUDA runtime DLLs into dist (explicitly list or
resolve them from the VC++/CUDA redistributable folders) and ensure you filter
out build-only artifacts (e.g., exclude vulkan-shaders-gen.exe) before creating
the ZIP so the archive is portable on clean Windows hosts and only contains
runtime redistributables plus the final executables and required DLLs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A community user in this thread confirmed the Windows builds are working

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmangani, thanks for the update! Good to know the builds are working for the community. It's worth noting that cynodesmus did mention having to manually copy the MSVC runtime DLLs (msvcp140.dll, vcruntime140.dll, etc.) for portability on clean hosts — but if that's an acceptable workflow for your users right now, that's totally fine to defer to a later improvement. Thanks for the context!


🧠 Learnings used
Learnt from: lmangani
Repo: ServeurpersoCom/acestep.cpp PR: 29
File: .github/workflows/release.yml:140-143
Timestamp: 2026-03-16T12:06:46.219Z
Learning: In `.github/workflows/release.yml` of the `ServeurpersoCom/acestep.cpp` repository, the Windows packaging/upload steps (including the `$bins` array and `foreach` loop) are intentionally present without a corresponding Windows matrix entry. They serve as a reference scaffold for future Windows build support, which is currently a work-in-progress. Do not flag these blocks as dead/unreachable code in future reviews.


- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
gh release upload "${{ steps.tag.outputs.value }}" `
"acestep-${{ matrix.name }}.zip" `
"acestep-windows-x64.zip" `
--clobber
Loading