Compare commits

..

No commits in common. "0b4aee51d71468e44646c13bf8c50ecaa2f2baa8" and "4a13ce0684acd37328e5961c1bbf9a7c2b4f76c1" have entirely different histories.

3 changed files with 17 additions and 70 deletions

View File

@ -18,7 +18,7 @@ jobs:
target: '' target: ''
artifact-name: linux-x86_64 artifact-name: linux-x86_64
- platform: macos-latest - platform: macos-latest
target: '' target: aarch64-apple-darwin
artifact-name: macos-arm64 artifact-name: macos-arm64
- platform: macos-latest - platform: macos-latest
target: x86_64-apple-darwin target: x86_64-apple-darwin
@ -32,33 +32,21 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: true
- name: Verify submodules
shell: bash
run: |
echo "=== Submodule status ==="
git submodule status --recursive
echo "=== NeuralAudio deps ==="
ls -la vendor/NeuralAudio/deps/
ls vendor/NeuralAudio/deps/RTNeural/CMakeLists.txt
ls vendor/NeuralAudio/deps/math_approx/CMakeLists.txt
- name: Clone egui fork - name: Clone egui fork
run: git clone --depth 1 -b ibus-wayland-fix https://git.skyler.io/skyler/egui.git ../egui-fork run: git clone --depth 1 -b ibus-wayland-fix https://git.skyler.io/skyler/egui.git ../egui-fork
env:
GIT_LFS_SKIP_SMUDGE: "1"
- name: Install Rust stable - name: Install Rust stable
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
targets: ${{ matrix.target != '' && matrix.target || '' }} targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache - name: Rust cache
uses: swatinem/rust-cache@v2 uses: swatinem/rust-cache@v2
with: with:
workspaces: './lightningbeam-ui -> target' workspaces: './lightningbeam-ui -> target'
key: ${{ matrix.artifact-name }}-v2 key: ${{ matrix.target || 'default' }}
# ── Linux dependencies ── # ── Linux dependencies ──
- name: Install dependencies (Linux) - name: Install dependencies (Linux)
@ -81,14 +69,14 @@ jobs:
# ── macOS dependencies ── # ── macOS dependencies ──
- name: Install dependencies (macOS) - name: Install dependencies (macOS)
if: startsWith(matrix.platform, 'macos') if: matrix.platform == 'macos-latest'
run: brew install nasm cmake create-dmg run: brew install nasm cmake create-dmg
# ── Windows dependencies ── # ── Windows dependencies ──
- name: Install dependencies (Windows) - name: Install dependencies (Windows)
if: matrix.platform == 'windows-latest' if: matrix.platform == 'windows-latest'
run: choco install nasm cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
shell: pwsh shell: pwsh
run: choco install cmake llvm --installargs 'ADD_CMAKE_TO_PATH=System' -y
# ── Common build steps ── # ── Common build steps ──
- name: Extract version - name: Extract version
@ -98,25 +86,11 @@ jobs:
VERSION=$(grep '^version' lightningbeam-ui/lightningbeam-editor/Cargo.toml | sed 's/.*"\(.*\)"/\1/') VERSION=$(grep '^version' lightningbeam-ui/lightningbeam-editor/Cargo.toml | sed 's/.*"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Enable FFmpeg build from source (Linux/macOS) - name: Enable FFmpeg build from source
if: matrix.platform != 'windows-latest'
shell: bash shell: bash
run: | run: |
sed -i.bak 's/ffmpeg-next = { version = "8.0", features = \["static"\] }/ffmpeg-next = { version = "8.0", features = ["build", "static"] }/' lightningbeam-ui/lightningbeam-editor/Cargo.toml sed -i.bak 's/ffmpeg-next = { version = "8.0", features = \["static"\] }/ffmpeg-next = { version = "8.0", features = ["build", "static"] }/' lightningbeam-ui/lightningbeam-editor/Cargo.toml
- name: Setup FFmpeg (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
# Download FFmpeg 8.0 shared+dev build (headers + import libs + DLLs)
$url = "https://github.com/GyanD/codexffmpeg/releases/download/8.0/ffmpeg-8.0-full_build-shared.7z"
Invoke-WebRequest -Uri $url -OutFile ffmpeg.7z
7z x ffmpeg.7z -offmpeg-win
$ffmpegDir = (Get-ChildItem -Path ffmpeg-win -Directory | Select-Object -First 1).FullName
echo "FFMPEG_DIR=$ffmpegDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# LLVM/libclang for bindgen
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup icons - name: Setup icons
shell: bash shell: bash
run: | run: |
@ -145,34 +119,19 @@ jobs:
printf '\n[[package.metadata.generate-rpm.assets]]\nsource = "%s"\ndest = "%s"\nmode = "644"\n' "$rel" "$dest" >> lightningbeam-editor/Cargo.toml printf '\n[[package.metadata.generate-rpm.assets]]\nsource = "%s"\ndest = "%s"\nmode = "644"\n' "$rel" "$dest" >> lightningbeam-editor/Cargo.toml
done done
- name: Fix FFmpeg cross-compile OS detection (macOS x86_64)
if: matrix.target == 'x86_64-apple-darwin'
shell: bash
run: |
# ffmpeg-sys-next passes --target-os=macos to FFmpeg configure, but FFmpeg
# expects --target-os=darwin. Fetch crates, then patch the build script.
cd lightningbeam-ui
cargo fetch
BUILDRS=$(find $HOME/.cargo/registry/src -path '*/ffmpeg-sys-next-*/build.rs' | head -1)
echo "Patching $BUILDRS to fix macos -> darwin mapping"
# Add "macos" => "darwin" to the match in get_ffmpeg_target_os()
sed -i.bak 's/"ios" => "darwin"/"ios" | "macos" => "darwin"/' "$BUILDRS"
grep -A4 'fn get_ffmpeg_target_os' "$BUILDRS"
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV"
- name: Build release binary - name: Build release binary
shell: bash shell: bash
env: env:
FFMPEG_STATIC: "1" FFMPEG_STATIC: "1"
run: | run: |
cd lightningbeam-ui cd lightningbeam-ui
TARGET_FLAG=""
if [ -n "${{ matrix.target }}" ]; then if [ -n "${{ matrix.target }}" ]; then
TARGET_FLAG="--target ${{ matrix.target }}" cargo build --release --bin lightningbeam-editor --target ${{ matrix.target }}
else
cargo build --release --bin lightningbeam-editor
fi fi
cargo build --release --bin lightningbeam-editor $TARGET_FLAG
- name: Copy cross-compiled binary to release dir - name: Copy cross-compiled binary to release dir (macOS cross)
if: matrix.target != '' if: matrix.target != ''
shell: bash shell: bash
run: | run: |
@ -271,7 +230,7 @@ jobs:
# macOS Packaging # macOS Packaging
# ══════════════════════════════════════════════ # ══════════════════════════════════════════════
- name: Create macOS .app bundle - name: Create macOS .app bundle
if: startsWith(matrix.platform, 'macos') if: matrix.platform == 'macos-latest'
shell: bash shell: bash
run: | run: |
VERSION="${{ steps.version.outputs.version }}" VERSION="${{ steps.version.outputs.version }}"
@ -313,11 +272,11 @@ jobs:
EOF EOF
- name: Create macOS .dmg - name: Create macOS .dmg
if: startsWith(matrix.platform, 'macos') if: matrix.platform == 'macos-latest'
shell: bash shell: bash
run: | run: |
VERSION="${{ steps.version.outputs.version }}" VERSION="${{ steps.version.outputs.version }}"
ARCH="${{ matrix.target == 'x86_64-apple-darwin' && 'x86_64' || 'arm64' }}" ARCH="${{ matrix.target == 'aarch64-apple-darwin' && 'arm64' || 'x86_64' }}"
DMG_NAME="Lightningbeam_Editor-${VERSION}-macOS-${ARCH}.dmg" DMG_NAME="Lightningbeam_Editor-${VERSION}-macOS-${ARCH}.dmg"
create-dmg \ create-dmg \
@ -332,7 +291,7 @@ jobs:
# create-dmg returns non-zero if codesigning is skipped, but the .dmg is still valid # create-dmg returns non-zero if codesigning is skipped, but the .dmg is still valid
- name: Collect macOS artifacts - name: Collect macOS artifacts
if: startsWith(matrix.platform, 'macos') if: matrix.platform == 'macos-latest'
shell: bash shell: bash
run: | run: |
mkdir -p artifacts mkdir -p artifacts
@ -350,8 +309,6 @@ jobs:
New-Item -ItemType Directory -Force -Path $DIST New-Item -ItemType Directory -Force -Path $DIST
Copy-Item "lightningbeam-ui/target/release/lightningbeam-editor.exe" "$DIST/" Copy-Item "lightningbeam-ui/target/release/lightningbeam-editor.exe" "$DIST/"
Copy-Item -Recurse "lightningbeam-ui/target/release/presets" "$DIST/presets" Copy-Item -Recurse "lightningbeam-ui/target/release/presets" "$DIST/presets"
# Bundle FFmpeg DLLs (shared build)
Copy-Item "$env:FFMPEG_DIR\bin\*.dll" "$DIST/"
Compress-Archive -Path $DIST -DestinationPath "${DIST}.zip" Compress-Archive -Path $DIST -DestinationPath "${DIST}.zip"
- name: Collect Windows artifacts - name: Collect Windows artifacts

View File

@ -3476,7 +3476,7 @@ dependencies = [
[[package]] [[package]]
name = "lightningbeam-editor" name = "lightningbeam-editor"
version = "1.0.0-alpha" version = "0.1.0"
dependencies = [ dependencies = [
"beamdsp", "beamdsp",
"bytemuck", "bytemuck",

View File

@ -13,12 +13,7 @@ fn main() {
let wrapper_dir = Path::new(&manifest_dir).join("cmake"); let wrapper_dir = Path::new(&manifest_dir).join("cmake");
let neural_audio_dir = Path::new(&manifest_dir).join("../vendor/NeuralAudio"); let neural_audio_dir = Path::new(&manifest_dir).join("../vendor/NeuralAudio");
let mut cfg = cmake::Config::new(&wrapper_dir); let dst = cmake::Config::new(&wrapper_dir)
// Force single-config generator on Unix to avoid libraries landing in Release/ subdirs
if !cfg!(target_os = "windows") {
cfg.generator("Unix Makefiles");
}
let dst = cfg
.define("CMAKE_BUILD_TYPE", "Release") .define("CMAKE_BUILD_TYPE", "Release")
.define("NEURALAUDIO_SOURCE_DIR", clean_canonicalize(&neural_audio_dir)) .define("NEURALAUDIO_SOURCE_DIR", clean_canonicalize(&neural_audio_dir))
.define("BUILD_NAMCORE", "OFF") .define("BUILD_NAMCORE", "OFF")
@ -32,13 +27,8 @@ fn main() {
let build_dir = dst.join("build"); let build_dir = dst.join("build");
// The wrapper CMakeLists adds NeuralAudio as a subdirectory, so libraries
// are nested under build/NeuralAudio/{NeuralAudioCAPI,NeuralAudio}/
// Also search Release/ paths for multi-config generator compatibility (Windows)
println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudioCAPI").display()); println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudioCAPI").display());
println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudioCAPI").join("Release").display());
println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudio").display()); println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudio").display());
println!("cargo:rustc-link-search=native={}", build_dir.join("NeuralAudio").join("NeuralAudio").join("Release").display());
println!("cargo:rustc-link-lib=static=NeuralAudioCAPI"); println!("cargo:rustc-link-lib=static=NeuralAudioCAPI");
println!("cargo:rustc-link-lib=static=NeuralAudio"); println!("cargo:rustc-link-lib=static=NeuralAudio");