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: ''
artifact-name: linux-x86_64
- platform: macos-latest
target: ''
target: aarch64-apple-darwin
artifact-name: macos-arm64
- platform: macos-latest
target: x86_64-apple-darwin
@ -32,33 +32,21 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- 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
submodules: true
- name: Clone 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
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target != '' && matrix.target || '' }}
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './lightningbeam-ui -> target'
key: ${{ matrix.artifact-name }}-v2
key: ${{ matrix.target || 'default' }}
# ── Linux dependencies ──
- name: Install dependencies (Linux)
@ -81,14 +69,14 @@ jobs:
# ── macOS dependencies ──
- name: Install dependencies (macOS)
if: startsWith(matrix.platform, 'macos')
if: matrix.platform == 'macos-latest'
run: brew install nasm cmake create-dmg
# ── Windows dependencies ──
- name: Install dependencies (Windows)
if: matrix.platform == 'windows-latest'
run: choco install nasm cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
shell: pwsh
run: choco install cmake llvm --installargs 'ADD_CMAKE_TO_PATH=System' -y
# ── Common build steps ──
- name: Extract version
@ -98,25 +86,11 @@ jobs:
VERSION=$(grep '^version' lightningbeam-ui/lightningbeam-editor/Cargo.toml | sed 's/.*"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Enable FFmpeg build from source (Linux/macOS)
if: matrix.platform != 'windows-latest'
- name: Enable FFmpeg build from source
shell: bash
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
- 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
shell: bash
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
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
shell: bash
env:
FFMPEG_STATIC: "1"
run: |
cd lightningbeam-ui
TARGET_FLAG=""
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
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 != ''
shell: bash
run: |
@ -271,7 +230,7 @@ jobs:
# macOS Packaging
# ══════════════════════════════════════════════
- name: Create macOS .app bundle
if: startsWith(matrix.platform, 'macos')
if: matrix.platform == 'macos-latest'
shell: bash
run: |
VERSION="${{ steps.version.outputs.version }}"
@ -313,11 +272,11 @@ jobs:
EOF
- name: Create macOS .dmg
if: startsWith(matrix.platform, 'macos')
if: matrix.platform == 'macos-latest'
shell: bash
run: |
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"
create-dmg \
@ -332,7 +291,7 @@ jobs:
# create-dmg returns non-zero if codesigning is skipped, but the .dmg is still valid
- name: Collect macOS artifacts
if: startsWith(matrix.platform, 'macos')
if: matrix.platform == 'macos-latest'
shell: bash
run: |
mkdir -p artifacts
@ -350,8 +309,6 @@ jobs:
New-Item -ItemType Directory -Force -Path $DIST
Copy-Item "lightningbeam-ui/target/release/lightningbeam-editor.exe" "$DIST/"
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"
- name: Collect Windows artifacts

View File

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

View File

@ -13,12 +13,7 @@ fn main() {
let wrapper_dir = Path::new(&manifest_dir).join("cmake");
let neural_audio_dir = Path::new(&manifest_dir).join("../vendor/NeuralAudio");
let mut cfg = 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
let dst = cmake::Config::new(&wrapper_dir)
.define("CMAKE_BUILD_TYPE", "Release")
.define("NEURALAUDIO_SOURCE_DIR", clean_canonicalize(&neural_audio_dir))
.define("BUILD_NAMCORE", "OFF")
@ -32,13 +27,8 @@ fn main() {
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").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").join("Release").display());
println!("cargo:rustc-link-lib=static=NeuralAudioCAPI");
println!("cargo:rustc-link-lib=static=NeuralAudio");