build.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. name: CI
  2. on:
  3. push:
  4. branches: [main, master]
  5. paths:
  6. - '**/*.cpp'
  7. - '**/*.h'
  8. - '**/*.hpp'
  9. - '**/CMakeLists.txt'
  10. - '.github/workflows/**'
  11. pull_request:
  12. types: [opened, synchronize, reopened]
  13. workflow_dispatch:
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
  16. cancel-in-progress: true
  17. env:
  18. # HuggingFace model info
  19. HF_MODEL_REPO: GaboxR67/MelBandRoformers
  20. HF_CHECKPOINT_PATH: melbandroformers/vocals/voc_fv6.ckpt
  21. HF_CONFIG_PATH: melbandroformers/vocals/voc_gabox.yaml
  22. # Music-Source-Separation-Training repo
  23. MSST_REPO: https://github.com/ZFTurbo/Music-Source-Separation-Training.git
  24. # Enable sccache GitHub Actions cache
  25. SCCACHE_GHA_ENABLED: "true"
  26. jobs:
  27. # ===========================================================================
  28. # Prepare: Generate test data (runs once, shared via artifacts)
  29. # ===========================================================================
  30. prepare-test-data:
  31. runs-on: ubuntu-latest
  32. steps:
  33. - name: Checkout
  34. uses: actions/checkout@v4
  35. - name: Setup Python
  36. uses: actions/setup-python@v5
  37. with:
  38. python-version: '3.11'
  39. - name: Clone MSST Repository
  40. run: git clone --depth 1 ${{ env.MSST_REPO }} msst
  41. - name: Install Dependencies
  42. run: |
  43. pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
  44. pip install huggingface_hub scipy soundfile gguf librosa ml_collections einops pyyaml numpy tqdm beartype rotary_embedding_torch
  45. - name: Download Model from HuggingFace
  46. env:
  47. HF_TOKEN: ${{ secrets.HF_TOKEN }}
  48. run: |
  49. python -c "
  50. from huggingface_hub import hf_hub_download
  51. import os
  52. token = os.environ.get('HF_TOKEN') or None
  53. hf_hub_download('${{ env.HF_MODEL_REPO }}', '${{ env.HF_CHECKPOINT_PATH }}',
  54. local_dir='./model', token=token)
  55. hf_hub_download('${{ env.HF_MODEL_REPO }}', '${{ env.HF_CONFIG_PATH }}',
  56. local_dir='./model', token=token)
  57. "
  58. - name: Generate Test Audio
  59. run: |
  60. python scripts/generate_test_audio.py --output test_audio.wav --duration 5.0 --sample-rate 44100
  61. - name: Generate Test Data
  62. run: |
  63. python scripts/generate_test_data.py \
  64. --model-repo msst \
  65. --audio test_audio.wav \
  66. --checkpoint model/${{ env.HF_CHECKPOINT_PATH }} \
  67. --config model/${{ env.HF_CONFIG_PATH }} \
  68. --output test_data
  69. - name: Convert Model to GGUF
  70. run: |
  71. python scripts/convert_to_gguf.py \
  72. --ckpt model/${{ env.HF_CHECKPOINT_PATH }} \
  73. --config model/${{ env.HF_CONFIG_PATH }} \
  74. --out model.gguf \
  75. --dtype fp32
  76. - name: Upload Test Data Artifact
  77. uses: actions/upload-artifact@v4
  78. with:
  79. name: test-data
  80. path: |
  81. test_data/
  82. model.gguf
  83. test_audio.wav
  84. retention-days: 1
  85. # ===========================================================================
  86. # Build Matrix: Core Platforms + Vulkan
  87. # ===========================================================================
  88. build:
  89. needs: prepare-test-data
  90. strategy:
  91. fail-fast: false
  92. matrix:
  93. include:
  94. # Tier 1: Core Platforms (CPU)
  95. - { name: linux-x64-cpu, os: ubuntu-22.04, backend: cpu, test: true }
  96. - { name: linux-arm64-cpu, os: ubuntu-22.04-arm, backend: cpu, test: true }
  97. - { name: macos-arm64, os: macos-latest, backend: cpu, test: true }
  98. - { name: macos-x64, os: macos-15-intel, backend: cpu, test: true }
  99. - { name: windows-x64-msvc, os: windows-2025, backend: cpu, test: true }
  100. # Tier 2: Vulkan Backend
  101. - { name: linux-vulkan, os: ubuntu-24.04, backend: vulkan, test: true }
  102. - { name: windows-vulkan, os: windows-2025, backend: vulkan, test: true }
  103. runs-on: ${{ matrix.os }}
  104. steps:
  105. - name: Checkout
  106. uses: actions/checkout@v4
  107. - name: Clone GGML
  108. run: git clone --depth 1 https://github.com/ggerganov/ggml.git ggml
  109. - name: Download Test Data
  110. uses: actions/download-artifact@v4
  111. with:
  112. name: test-data
  113. - name: Setup Python
  114. uses: actions/setup-python@v5
  115. with:
  116. python-version: '3.11'
  117. - name: Setup MSVC
  118. if: runner.os == 'Windows'
  119. uses: ilammy/msvc-dev-cmd@v1
  120. - name: Install Python Dependencies
  121. run: pip install numpy scipy
  122. - name: Setup sccache
  123. uses: mozilla-actions/sccache-action@v0.0.9
  124. with:
  125. version: "v0.12.0"
  126. # ----- Linux Dependencies -----
  127. - name: Install Dependencies (Linux)
  128. if: runner.os == 'Linux'
  129. run: |
  130. sudo apt-get update
  131. sudo apt-get install -y build-essential cmake
  132. - name: Install Vulkan SDK (Linux)
  133. if: matrix.backend == 'vulkan' && runner.os == 'Linux'
  134. run: |
  135. sudo apt-get install -y libvulkan-dev glslc mesa-vulkan-drivers
  136. # ----- macOS Dependencies -----
  137. - name: Install Dependencies (macOS)
  138. if: runner.os == 'macOS'
  139. run: brew install cmake
  140. # ----- Windows Dependencies -----
  141. - name: Install Dependencies (Windows)
  142. if: runner.os == 'Windows'
  143. run: choco install ninja -y
  144. - name: Install Vulkan SDK (Windows)
  145. if: matrix.backend == 'vulkan' && runner.os == 'Windows'
  146. run: |
  147. $VK_VERSION = "1.4.313.2"
  148. curl.exe -o VulkanSDK.exe -L "https://sdk.lunarg.com/sdk/download/${VK_VERSION}/windows/vulkansdk-windows-X64-${VK_VERSION}.exe"
  149. Start-Process -FilePath .\VulkanSDK.exe -ArgumentList "--accept-licenses --default-answer --confirm-command install" -Wait
  150. Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${VK_VERSION}"
  151. Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${VK_VERSION}\bin"
  152. # ----- Configure -----
  153. - name: Configure (Unix)
  154. if: runner.os != 'Windows'
  155. run: |
  156. cmake -B build \
  157. -DCMAKE_BUILD_TYPE=Release \
  158. -DGGML_DIR=ggml \
  159. -DGGML_CUDA=OFF \
  160. -DGGML_VULKAN=${{ matrix.backend == 'vulkan' && 'ON' || 'OFF' }} \
  161. -DCMAKE_C_COMPILER_LAUNCHER=sccache \
  162. -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
  163. -DMBR_BUILD_TESTS=ON \
  164. -DMBR_BUILD_CLI=ON
  165. - name: Configure (Windows)
  166. if: runner.os == 'Windows'
  167. run: |
  168. cmake -B build -G "Ninja Multi-Config" `
  169. -DGGML_DIR=ggml `
  170. -DGGML_CUDA=OFF `
  171. -DGGML_VULKAN=${{ matrix.backend == 'vulkan' && 'ON' || 'OFF' }} `
  172. -DCMAKE_C_COMPILER_LAUNCHER=sccache `
  173. -DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
  174. -DMBR_BUILD_TESTS=ON `
  175. -DMBR_BUILD_CLI=ON
  176. # ----- Build -----
  177. - name: Build (Unix)
  178. if: runner.os != 'Windows'
  179. run: cmake --build build --config Release -j $(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
  180. - name: Build (Windows)
  181. if: runner.os == 'Windows'
  182. run: cmake --build build --config Release -j $env:NUMBER_OF_PROCESSORS
  183. # ----- Unit Tests -----
  184. - name: Run Unit Tests
  185. if: matrix.test
  186. env:
  187. MBR_MODEL_PATH: ${{ github.workspace }}/model.gguf
  188. MBR_TEST_DATA_DIR: ${{ github.workspace }}/test_data
  189. MBR_FORCE_CPU: ${{ runner.os == 'macOS' && '1' || '' }}
  190. run: ctest --test-dir build -C Release -V --output-on-failure --timeout 300
  191. # ----- CLI Tests -----
  192. - name: Test CLI
  193. if: matrix.test
  194. shell: bash
  195. env:
  196. MBR_MODEL_PATH: ${{ github.workspace }}/model.gguf
  197. MBR_FORCE_CPU: ${{ runner.os == 'macOS' && '1' || '' }}
  198. run: |
  199. echo "=== CLI Test Suite ==="
  200. # Dynamically find CLI executable
  201. CLI_NAME="mel_band_roformer-cli"
  202. if [[ "$RUNNER_OS" == "Windows" ]]; then CLI_NAME="mel_band_roformer-cli.exe"; fi
  203. echo "Searching for $CLI_NAME..."
  204. CLI_PATH=$(find build -name "$CLI_NAME" | head -n 1)
  205. if [[ -z "$CLI_PATH" ]]; then
  206. echo "Error: CLI executable not found!"
  207. find build
  208. exit 1
  209. fi
  210. echo "Found CLI at: $CLI_PATH"
  211. chmod +x "$CLI_PATH"
  212. # Setup execution variables
  213. CLI_DIR=$(dirname "$CLI_PATH")
  214. CLI_EXE="./$CLI_NAME"
  215. # Debug Info
  216. echo "Debug: Listing directory $CLI_DIR"
  217. ls -l "$CLI_DIR"
  218. echo "Debug: Checking dependencies"
  219. if command -v ldd >/dev/null; then
  220. ldd "$CLI_PATH" || echo "ldd returned error"
  221. fi
  222. # Define runner helper
  223. run_cli() {
  224. echo "Executing: ./$CLI_NAME $@"
  225. (cd "$CLI_DIR" && ./$CLI_NAME "$@")
  226. }
  227. # Debug PATH
  228. echo "PATH: $PATH"
  229. # 1. Test --help
  230. echo "[1/4] Testing --help..."
  231. run_cli --help
  232. # 2. Test with missing arguments (should fail)
  233. echo "[2/4] Testing error handling..."
  234. if run_cli 2>/dev/null; then
  235. echo "ERROR: CLI should fail without arguments"
  236. exit 1
  237. fi
  238. # 3. Use existing test audio
  239. echo "[3/4] Using generated test audio..."
  240. cp test_audio.wav cli_test_input.wav
  241. # 4. Run full inference
  242. echo "[4/4] Running inference..."
  243. # Use absolute paths for input/output to avoid directory issues
  244. ABS_MODEL=$(readlink -f "$MBR_MODEL_PATH" || echo "$(pwd)/model.gguf")
  245. ABS_INPUT=$(readlink -f cli_test_input.wav || echo "$(pwd)/cli_test_input.wav")
  246. ABS_OUTPUT=$(readlink -f cli_test_output.wav || echo "$(pwd)/cli_test_output.wav")
  247. # Convert paths for Windows MSVC executables
  248. if [[ "$RUNNER_OS" == "Windows" ]]; then
  249. ABS_MODEL=$(cygpath -w "$ABS_MODEL")
  250. ABS_INPUT=$(cygpath -w "$ABS_INPUT")
  251. ABS_OUTPUT=$(cygpath -w "$ABS_OUTPUT")
  252. fi
  253. echo "Running with model: $ABS_MODEL"
  254. run_cli "$ABS_MODEL" "$ABS_INPUT" "$ABS_OUTPUT" --chunk-size 88200 --overlap 2
  255. # Verify output exists and has reasonable size
  256. if [[ ! -f cli_test_output.wav ]]; then
  257. echo "ERROR: Output file not created"
  258. exit 1
  259. fi
  260. OUTPUT_SIZE=$(stat -c%s cli_test_output.wav 2>/dev/null || stat -f%z cli_test_output.wav)
  261. if [[ $OUTPUT_SIZE -lt 1000 ]]; then
  262. echo "ERROR: Output file too small: $OUTPUT_SIZE bytes"
  263. exit 1
  264. fi
  265. echo "=== CLI Tests Passed ==="
  266. # ----- Upload Artifacts -----
  267. - name: Upload Build Artifacts
  268. uses: actions/upload-artifact@v4
  269. with:
  270. name: build-${{ matrix.name }}
  271. path: |
  272. build/bin/
  273. build/lib*/
  274. build/*.dll
  275. build/*.so
  276. build/*.dylib
  277. build/mel_band_roformer-cli*
  278. build/Release/
  279. retention-days: 7
  280. # ----- Prepare Release Artifact -----
  281. - name: Prepare Release Artifact (Unix)
  282. if: runner.os != 'Windows'
  283. shell: bash
  284. run: |
  285. # Create release directory
  286. mkdir -p release/mel-band-roformer
  287. # Find and copy CLI executable
  288. CLI_PATH=$(find build -name "mel_band_roformer-cli" -type f | head -n 1)
  289. if [[ -n "$CLI_PATH" ]]; then
  290. cp "$CLI_PATH" release/mel-band-roformer/
  291. chmod +x release/mel-band-roformer/mel_band_roformer-cli
  292. fi
  293. # Copy shared libraries if exist (only real files, not symlinks)
  294. find build \( -name "*.so*" -o -name "*.dylib" \) -type f ! -type l | while read lib; do
  295. cp "$lib" release/mel-band-roformer/ 2>/dev/null || true
  296. done
  297. # List contents
  298. echo "Release artifact contents:"
  299. ls -lh release/mel-band-roformer/
  300. - name: Prepare Release Artifact (Windows)
  301. if: runner.os == 'Windows'
  302. shell: pwsh
  303. run: |
  304. # Create release directory
  305. New-Item -ItemType Directory -Force -Path "release\mel-band-roformer"
  306. # Find and copy CLI executable
  307. $CliPath = Get-ChildItem -Path build -Filter "mel_band_roformer-cli.exe" -Recurse -File | Select-Object -First 1
  308. if ($CliPath) {
  309. Copy-Item $CliPath.FullName "release\mel-band-roformer\"
  310. }
  311. # Copy DLL files
  312. Get-ChildItem -Path build -Filter "*.dll" -Recurse -File | ForEach-Object {
  313. Copy-Item $_.FullName "release\mel-band-roformer\" -ErrorAction SilentlyContinue
  314. }
  315. # List contents
  316. Write-Host "Release artifact contents:"
  317. Get-ChildItem "release\mel-band-roformer" | Format-Table Name, Length
  318. - name: Upload Release Artifact
  319. uses: actions/upload-artifact@v4
  320. with:
  321. name: MelBandRoformer-${{ matrix.name }}
  322. path: release/mel-band-roformer/
  323. retention-days: 30
  324. # ===========================================================================
  325. # CUDA Build: Linux (Compile Verification Only)
  326. # ===========================================================================
  327. build-cuda-linux:
  328. name: build-cuda-linux-${{ matrix.cuda_version }}
  329. runs-on: ${{ matrix.os }}
  330. strategy:
  331. fail-fast: false
  332. matrix:
  333. include:
  334. - { cuda_version: "11.8.0", os: ubuntu-22.04 }
  335. - { cuda_version: "12.9.1", os: ubuntu-latest }
  336. - { cuda_version: "13.1.0", os: ubuntu-latest }
  337. steps:
  338. - name: Checkout
  339. uses: actions/checkout@v4
  340. - name: Clone GGML
  341. run: git clone --depth 1 https://github.com/ggerganov/ggml.git ggml
  342. - name: Install CUDA Toolkit
  343. uses: Jimver/cuda-toolkit@master
  344. with:
  345. cuda: ${{ matrix.cuda_version }}
  346. method: network
  347. sub-packages: '["nvcc", "cudart", "thrust"]'
  348. non-cuda-sub-packages: '["libcublas", "libcublas-dev"]'
  349. - name: Install Dependencies
  350. run: |
  351. sudo apt-get install -y cmake build-essential ninja-build
  352. - name: Setup sccache
  353. uses: mozilla-actions/sccache-action@v0.0.9
  354. - name: Configure
  355. run: |
  356. ls -ld ggml
  357. # Minimal architectures for compile verification
  358. # Just verify compilation works, not for distribution
  359. CUDA_ARCHS="75;86"
  360. echo "Verifying build for CUDA architectures: $CUDA_ARCHS"
  361. cmake -B build -G Ninja \
  362. -DCMAKE_BUILD_TYPE=Release \
  363. -DGGML_DIR=ggml \
  364. -DGGML_CUDA=ON \
  365. -DGGML_CUDA_FORCE_MMQ=ON \
  366. -DCMAKE_CUDA_ARCHITECTURES="$CUDA_ARCHS" \
  367. -DCMAKE_C_COMPILER_LAUNCHER=sccache \
  368. -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
  369. -DCMAKE_CUDA_COMPILER_LAUNCHER=sccache \
  370. -DMBR_BUILD_TESTS=OFF \
  371. -DMBR_BUILD_CLI=ON
  372. - name: Build
  373. run: cmake --build build --config Release -j $(nproc)
  374. - name: Upload Artifacts
  375. uses: actions/upload-artifact@v4
  376. with:
  377. name: build-linux-cuda-${{ matrix.cuda_version }}
  378. path: |
  379. build/bin/
  380. build/lib*/
  381. build/*.so
  382. retention-days: 7
  383. # ----- Prepare Release Artifact -----
  384. - name: Prepare Release Artifact
  385. run: |
  386. # Create release directory
  387. mkdir -p release/mel-band-roformer
  388. # Find and copy CLI executable
  389. CLI_PATH=$(find build -name "mel_band_roformer-cli" -type f | head -n 1)
  390. if [[ -n "$CLI_PATH" ]]; then
  391. cp "$CLI_PATH" release/mel-band-roformer/
  392. chmod +x release/mel-band-roformer/mel_band_roformer-cli
  393. fi
  394. # Copy shared libraries
  395. find build -name "*.so*" | while read lib; do
  396. cp "$lib" release/mel-band-roformer/ 2>/dev/null || true
  397. done
  398. # List contents
  399. echo "Release artifact contents:"
  400. ls -lh release/mel-band-roformer/
  401. - name: Upload Release Artifact
  402. uses: actions/upload-artifact@v4
  403. with:
  404. name: MelBandRoformer-linux-cuda-${{ matrix.cuda_version }}
  405. path: release/mel-band-roformer/
  406. retention-days: 30
  407. # ===========================================================================
  408. # CUDA Build: Windows (Compile Only - No GPU for testing)
  409. # ===========================================================================
  410. build-cuda-windows:
  411. name: build-cuda-windows-${{ matrix.cuda_version }}
  412. runs-on: windows-2022
  413. strategy:
  414. fail-fast: false
  415. matrix:
  416. cuda_version: ["11.8.0", "12.9.1", "13.1.0"]
  417. env:
  418. CUDA_VERSION: ${{ matrix.cuda_version }}
  419. steps:
  420. - name: Checkout
  421. uses: actions/checkout@v4
  422. - name: Setup MSVC
  423. if: runner.os == 'Windows'
  424. uses: ilammy/msvc-dev-cmd@v1
  425. - name: Clone GGML
  426. run: git clone --depth 1 https://github.com/ggerganov/ggml.git ggml
  427. - name: Install CUDA Toolkit
  428. if: ${{ matrix.cuda_version != '13.1.0' }}
  429. uses: Jimver/cuda-toolkit@master
  430. with:
  431. cuda: ${{ matrix.cuda_version }}
  432. method: network
  433. sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
  434. - name: Install CUDA Toolkit(13.1.0)
  435. if: ${{ matrix.cuda_version == '13.1.0' }}
  436. uses: Jimver/cuda-toolkit@master
  437. with:
  438. cuda: ${{ matrix.cuda_version }}
  439. method: network
  440. sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "nvrtc", "nvrtc_dev", "crt", "nvvm", "visual_studio_integration"]'
  441. - name: Install Ninja
  442. run: choco install ninja -y
  443. - name: Setup sccache
  444. uses: mozilla-actions/sccache-action@v0.0.9
  445. - name: Configure and Build
  446. shell: pwsh
  447. run: |
  448. # Consumer GPU architectures:
  449. # 61=Pascal (GTX 10), 75=Turing (RTX 20/GTX 16), 86=Ampere (RTX 30), 89=Ada (RTX 40), 120=Blackwell (RTX 50)
  450. $cudaVersion = "${{ matrix.cuda_version }}"
  451. if ($cudaVersion -match "^11\.") {
  452. # CUDA 11.x doesn't support arch 120
  453. $cudaArchs = "61;75;86;89"
  454. $env:CUDAFLAGS = "-allow-unsupported-compiler -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH -D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
  455. } else {
  456. # CUDA 12+: Add RTX 50 (Blackwell)
  457. $cudaArchs = "61;75;86;89;120"
  458. $env:CUDAFLAGS = ""
  459. }
  460. Write-Host "Building for CUDA architectures: $cudaArchs"
  461. cmake -B build -G "Ninja Multi-Config" `
  462. -DGGML_DIR=ggml `
  463. -DGGML_CUDA=ON `
  464. -DGGML_CUDA_FORCE_MMQ=ON `
  465. "-DCMAKE_CUDA_ARCHITECTURES=$cudaArchs" `
  466. -DCMAKE_C_COMPILER_LAUNCHER=sccache `
  467. -DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
  468. -DMBR_BUILD_TESTS=OFF `
  469. -DMBR_BUILD_CLI=ON
  470. cmake --build build --config Release -j $env:NUMBER_OF_PROCESSORS
  471. - name: Upload Artifacts
  472. uses: actions/upload-artifact@v4
  473. with:
  474. name: build-windows-cuda-${{ matrix.cuda_version }}
  475. path: |
  476. build/bin/
  477. build/Release/
  478. build/*.dll
  479. retention-days: 7
  480. # ----- Prepare Release Artifact -----
  481. - name: Prepare Release Artifact
  482. shell: pwsh
  483. run: |
  484. # Create release directory
  485. New-Item -ItemType Directory -Force -Path "release\mel-band-roformer"
  486. # Find and copy CLI executable
  487. $CliPath = Get-ChildItem -Path build -Filter "mel_band_roformer-cli.exe" -Recurse -File | Select-Object -First 1
  488. if ($CliPath) {
  489. Copy-Item $CliPath.FullName "release\mel-band-roformer\"
  490. }
  491. # Copy DLL files
  492. Get-ChildItem -Path build -Filter "*.dll" -Recurse -File | ForEach-Object {
  493. Copy-Item $_.FullName "release\mel-band-roformer\" -ErrorAction SilentlyContinue
  494. }
  495. # List contents
  496. Write-Host "Release artifact contents:"
  497. Get-ChildItem "release\mel-band-roformer" | Format-Table Name, Length
  498. - name: Upload Release Artifact
  499. uses: actions/upload-artifact@v4
  500. with:
  501. name: MelBandRoformer-windows-cuda-${{ matrix.cuda_version }}
  502. path: release\mel-band-roformer\
  503. retention-days: 30