@@ -8,7 +8,7 @@ concurrency:
88 cancel-in-progress : true
99
1010env :
11- ACESTEP_CPP_REPO : https://github.com/ServeurpersoCom /acestep.cpp.git
11+ ACESTEP_CPP_REPO : https://github.com/audiohacking /acestep.cpp.git
1212
1313jobs :
1414 # ─────────────────────────────────────────────
@@ -76,10 +76,14 @@ jobs:
7676 retention-days : 7
7777
7878 # ─────────────────────────────────────────────
79- # 3. Build acestep.cpp with hardware detection
79+ # 3. Test build.sh (the deployment build script)
80+ # Validates that build.sh correctly clones
81+ # acestep.cpp, compiles it, and installs the
82+ # binaries to bin/ — exactly as it will run
83+ # on the end user's machine at first launch.
8084 # ─────────────────────────────────────────────
81- build-acestep-cpp :
82- name : Build acestep.cpp (${{ matrix.label }})
85+ test- build-script :
86+ name : Test build.sh (${{ matrix.label }})
8387 runs-on : ${{ matrix.runner }}
8488 permissions :
8589 contents : read
@@ -97,117 +101,52 @@ jobs:
97101 steps :
98102 - uses : actions/checkout@v4
99103
100- # ── System dependencies ─────────────────────────────────── ──────────
104+ # ── Install build prerequisites (same as a user would need) ──────────
101105 - name : Install build tools (Linux)
102106 if : matrix.os == 'linux'
103107 run : |
104108 sudo apt-get update -qq
105- sudo apt-get install -y cmake ninja-build libssl-dev pkg-config libopenblas-dev
109+ sudo apt-get install -y cmake libssl-dev pkg-config
106110
107111 - name : Install build tools (macOS)
108112 if : matrix.os == 'macos'
109- run : brew install cmake ninja
113+ run : brew install cmake
110114
111- # ── Clone acestep.cpp with submodules ────────────────────────────────
112- - name : Clone acestep.cpp
113- run : |
114- git clone --depth 1 ${{ env.ACESTEP_CPP_REPO }} acestep.cpp
115- cd acestep.cpp
116- git submodule update --init --recursive --depth 1
117-
118- # ── Detect hardware and set cmake flags ──────────────────────────────
119- # Follows the detection approach documented in the acestep.cpp README:
120- # CUDA (NVIDIA): -DGGML_CUDA=ON
121- # ROCm/HIP (AMD): -DGGML_HIP=ON
122- # Vulkan: -DGGML_VULKAN=ON
123- # OpenBLAS (CPU): -DGGML_BLAS=ON
124- # macOS: Metal + Accelerate BLAS auto-detected by cmake
125- - name : Detect hardware and set cmake flags
126- id : detect
127- shell : bash
128- run : |
129- FLAGS=""
130- if [[ "$(uname)" == "Darwin" ]]; then
131- echo "Platform: macOS — Metal and Accelerate BLAS auto-detected by cmake"
132- else
133- # CUDA (NVIDIA)
134- if command -v nvcc &>/dev/null || [ -d /usr/local/cuda ] || [ -d /usr/cuda ]; then
135- FLAGS="$FLAGS -DGGML_CUDA=ON"
136- echo "Detected: CUDA"
137- fi
138- # ROCm/HIP (AMD)
139- if command -v hipcc &>/dev/null || [ -d /opt/rocm ]; then
140- FLAGS="$FLAGS -DGGML_HIP=ON"
141- echo "Detected: ROCm/HIP"
142- fi
143- # Vulkan
144- if pkg-config --exists vulkan 2>/dev/null; then
145- FLAGS="$FLAGS -DGGML_VULKAN=ON"
146- echo "Detected: Vulkan"
147- fi
148- # OpenBLAS (recommended for CPU-only machines)
149- if pkg-config --exists openblas 2>/dev/null; then
150- FLAGS="$FLAGS -DGGML_BLAS=ON"
151- echo "Detected: OpenBLAS"
152- fi
153- [ -z "$FLAGS" ] && echo "No accelerator detected — CPU-only build"
154- fi
155- echo "flags=$FLAGS" >> "$GITHUB_OUTPUT"
156- echo "cmake flags: $FLAGS"
157-
158- # ── Build ────────────────────────────────────────────────────────────
159- - name : Cache acestep.cpp build artifacts
115+ # ── Cache the acestep.cpp build directory ────────────────────────────
116+ - name : Cache acestep.cpp build
160117 uses : actions/cache@v4
161118 with :
162- path : acestep.cpp/build
163- key : acestep-ci-${{ matrix.label }}-${{ hashFiles('acestep.cpp/CMakeLists.txt') }}
164- restore-keys : acestep-ci-${{ matrix.label }}-
165-
166- - name : Build acestep.cpp
167- run : |
168- cmake -S acestep.cpp -B acestep.cpp/build \
169- -G Ninja \
170- -DCMAKE_BUILD_TYPE=Release \
171- ${{ steps.detect.outputs.flags }}
172- cmake --build acestep.cpp/build --parallel
173-
174- # ── Verify and collect binaries ──────────────────────────────────────
175- - name : Verify binaries
119+ path : |
120+ acestep.cpp
121+ bin
122+ key : build-script-${{ matrix.label }}-${{ hashFiles('build.sh') }}-${{ env.ACESTEP_CPP_REPO }}
123+ restore-keys : build-script-${{ matrix.label }}-
124+
125+ # ── Run the real deployment build script (CPU-only on CI runners) ────
126+ - name : Run build.sh
127+ run : bash build.sh --cpu
128+
129+ # ── Verify expected binaries were installed to bin/ ──────────────────
130+ - name : Verify installed binaries
176131 shell : bash
177132 run : |
178133 ALL_OK=1
179134 for bin in ace-qwen3 dit-vae neural-codec; do
180- BIN_PATH=$(find acestep.cpp/build -name "$bin" -type f 2>/dev/null | head -1)
181- if [ -f "$BIN_PATH" ]; then
182- echo "✅ $bin → $BIN_PATH"
135+ if [ -x "bin/$bin" ]; then
136+ echo "✅ bin/$bin"
183137 else
184- echo "⚠️ $bin not found in build tree "
138+ echo "⚠️ bin/ $bin not found or not executable "
185139 ALL_OK=0
186140 fi
187141 done
188- if [ "$ALL_OK" = "1" ]; then
189- echo "All binaries built successfully"
190- else
191- echo "One or more binaries missing — check the build output above"
192- exit 1
193- fi
194-
195- - name : Collect binaries
196- shell : bash
197- run : |
198- mkdir -p ci-bin
199- for bin in ace-qwen3 dit-vae neural-codec; do
200- BIN_PATH=$(find acestep.cpp/build -name "$bin" -type f 2>/dev/null | head -1)
201- if [ -f "$BIN_PATH" ]; then
202- cp "$BIN_PATH" "ci-bin/$bin"
203- fi
204- done
205- ls -lh ci-bin/
142+ [ "$ALL_OK" = "1" ] || { echo "One or more binaries missing"; exit 1; }
206143
207- - uses : actions/upload-artifact@v4
144+ - name : Upload binaries artifact
145+ uses : actions/upload-artifact@v4
208146 with :
209- name : acestep-cpp -${{ matrix.label }}
210- path : ci- bin/
147+ name : ci-bin -${{ matrix.label }}
148+ path : bin/
211149 if-no-files-found : warn
212150 retention-days : 7
213151
152+
0 commit comments