feat(gui): restore Save WAV download button next to audio preview player #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CLFX Build Verification | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| jobs: | |
| # ─── Linux Build & Functional Tests ─────────────────────────────────────── | |
| build-linux: | |
| name: Linux (OpenCL) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install OpenCL | |
| run: sudo apt-get install -y ocl-icd-opencl-dev pocl-opencl-icd | |
| - name: Compile Engine | |
| run: gcc -Iinclude main.c -o clfx -lOpenCL -lm -std=c99 -D_POSIX_C_SOURCE=200112L | |
| - name: Query Binary Info | |
| run: | | |
| ./clfx --info | |
| echo "Exit: $?" | |
| - name: Generate Functional Test Input | |
| run: | | |
| python3 - <<'EOF' | |
| import wave, struct, math | |
| sample_rate = 44100 | |
| duration = 2 | |
| f = wave.open('input.wav', 'w') | |
| f.setnchannels(2) | |
| f.setsampwidth(2) | |
| f.setframerate(sample_rate) | |
| for i in range(sample_rate * duration): | |
| val = int(32767 * math.sin(2 * math.pi * 440 * i / sample_rate)) | |
| f.writeframesraw(struct.pack('<hh', val, val)) | |
| f.close() | |
| EOF | |
| - name: Test Core Effects (Gain, Lowpass, Echo) | |
| run: | | |
| ./clfx input.wav out_gain.wav gain 1.5 | |
| ./clfx input.wav out_lp.wav lowpass 0.8 | |
| ./clfx input.wav out_echo.wav echo 4410 0.5 | |
| - name: Test Advanced Effects (Spectral, Dynamics) | |
| run: | | |
| ./clfx input.wav out_bit.wav bitcrush 8 | |
| ./clfx input.wav out_freeze.wav freeze 0.5 0.5 | |
| ./clfx input.wav out_gate.wav gate 0.1 0.0 | |
| - name: Verify Linux Outputs Generated | |
| run: ls -lh out_*.wav | |
| - name: Upload Linux Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clfx-linux | |
| path: clfx | |
| # ─── Windows Native Build (MSYS2 / MinGW-w64) ──────────────────────────── | |
| build-windows: | |
| name: Windows (MSYS2 / MinGW-w64) | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up MSYS2 with MinGW-w64 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-opencl-headers | |
| mingw-w64-x86_64-opencl-icd | |
| - name: Compile Engine (native Windows PE) | |
| run: | | |
| gcc -Iinclude main.c -o clfx.exe \ | |
| -lOpenCL -lm -std=c99 \ | |
| -D_POSIX_C_SOURCE=200112L \ | |
| -D_WIN32_WINNT=0x0601 | |
| - name: Verify Windows Binary Runs | |
| run: | | |
| file clfx.exe | |
| ./clfx.exe --info || true # info probe (non-zero exit ok if no GPU) | |
| - name: Generate Test WAV | |
| shell: pwsh | |
| run: | | |
| python -c " | |
| import wave, struct, math | |
| sample_rate = 44100 | |
| f = wave.open('input.wav', 'w') | |
| f.setnchannels(2); f.setsampwidth(2); f.setframerate(sample_rate) | |
| for i in range(sample_rate * 2): | |
| val = int(32767 * math.sin(2 * math.pi * 440 * i / sample_rate)) | |
| f.writeframesraw(struct.pack('<hh', val, val)) | |
| f.close() | |
| " | |
| - name: Run Effects | |
| run: | | |
| ./clfx.exe input.wav out_gain.wav gain 1.5 || true | |
| ./clfx.exe input.wav out_echo.wav echo 4410 0.5 || true | |
| - name: Verify Windows Outputs Generated | |
| run: ls -lh out_*.wav || true | |
| - name: Upload Windows Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clfx-windows | |
| path: clfx.exe | |
| # ─── Deploy to GCP Cloud Run ──────────────────────────────────────────────── | |
| # deploy-cloudrun: | |
| # name: Deploy to Cloud Run | |
| # needs: [build-linux, build-windows] | |
| # if: github.ref == 'refs/heads/master' | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Authenticate to GCP | |
| # uses: google-github-actions/auth@v2 | |
| # with: | |
| # credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
| # - name: Set up Cloud SDK | |
| # uses: google-github-actions/setup-gcloud@v2 | |
| # - name: Configure Docker for Google Container Registry | |
| # run: gcloud auth configure-docker us-central1-docker.pkg.dev | |
| # - name: Build and Push Docker image | |
| # run: | | |
| # PROJECT_ID=$(gcloud config get-value project) | |
| # # Using Artifact Registry format (create the repository first!) | |
| # IMAGE="us-central1-docker.pkg.dev/$PROJECT_ID/clfx-repo/clfx-engine:latest" | |
| # docker build -t "$IMAGE" . | |
| # docker push "$IMAGE" | |
| # - name: Deploy to Cloud Run | |
| # run: | | |
| # PROJECT_ID=$(gcloud config get-value project) | |
| # IMAGE="us-central1-docker.pkg.dev/$PROJECT_ID/clfx-repo/clfx-engine:latest" | |
| # gcloud run deploy clfx-server \ | |
| # --image "$IMAGE" \ | |
| # --region us-central1 \ | |
| # --platform managed \ | |
| # --allow-unauthenticated \ | |
| # --memory 512Mi \ | |
| # --cpu 1 \ | |
| # --port 8080 |