Compare commits

...

9 Commits

Author SHA1 Message Date
Skyler Lehmkuhl 0b4aee51d7 update build yaml 2026-02-24 14:44:17 -05:00
Skyler Lehmkuhl 9d521732cc update build yaml 2026-02-24 14:13:51 -05:00
Skyler Lehmkuhl 299891dab9 update build yaml 2026-02-24 13:58:34 -05:00
Skyler Lehmkuhl 196d27bf15 update build yaml 2026-02-24 13:43:52 -05:00
Skyler Lehmkuhl 0231658b88 update build yaml 2026-02-24 13:26:44 -05:00
Skyler Lehmkuhl 4ba8337607 update build yaml 2026-02-24 13:09:02 -05:00
Skyler Lehmkuhl 0a4fb0ba77 update build yaml 2026-02-24 12:53:33 -05:00
Skyler Lehmkuhl 05d79029e3 update build yaml 2026-02-24 12:39:23 -05:00
Skyler Lehmkuhl 30eff3b6b6 update build yaml 2026-02-24 12:15:45 -05:00
3 changed files with 70 additions and 17 deletions

View File

@ -18,7 +18,7 @@ jobs:
target: ''
artifact-name: linux-x86_64
- platform: macos-latest
target: aarch64-apple-darwin
target: ''
artifact-name: macos-arm64
- platform: macos-latest
target: x86_64-apple-darwin
@ -32,21 +32,33 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
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
- 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.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
targets: ${{ matrix.target != '' && matrix.target || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './lightningbeam-ui -> target'
key: ${{ matrix.target || 'default' }}
key: ${{ matrix.artifact-name }}-v2
# ── Linux dependencies ──
- name: Install dependencies (Linux)
@ -69,14 +81,14 @@ jobs:
# ── macOS dependencies ──
- name: Install dependencies (macOS)
if: matrix.platform == 'macos-latest'
if: startsWith(matrix.platform, 'macos')
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
@ -86,11 +98,25 @@ jobs:
VERSION=$(grep '^version' lightningbeam-ui/lightningbeam-editor/Cargo.toml | sed 's/.*"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Enable FFmpeg build from source
- name: Enable FFmpeg build from source (Linux/macOS)
if: matrix.platform != 'windows-latest'
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: |
@ -119,19 +145,34 @@ 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
cargo build --release --bin lightningbeam-editor --target ${{ matrix.target }}
else
cargo build --release --bin lightningbeam-editor
TARGET_FLAG="--target ${{ matrix.target }}"
fi
cargo build --release --bin lightningbeam-editor $TARGET_FLAG
- name: Copy cross-compiled binary to release dir (macOS cross)
- name: Copy cross-compiled binary to release dir
if: matrix.target != ''
shell: bash
run: |
@ -230,7 +271,7 @@ jobs:
# macOS Packaging
# ══════════════════════════════════════════════
- name: Create macOS .app bundle
if: matrix.platform == 'macos-latest'
if: startsWith(matrix.platform, 'macos')
shell: bash
run: |
VERSION="${{ steps.version.outputs.version }}"
@ -272,11 +313,11 @@ jobs:
EOF
- name: Create macOS .dmg
if: matrix.platform == 'macos-latest'
if: startsWith(matrix.platform, 'macos')
shell: bash
run: |
VERSION="${{ steps.version.outputs.version }}"
ARCH="${{ matrix.target == 'aarch64-apple-darwin' && 'arm64' || 'x86_64' }}"
ARCH="${{ matrix.target == 'x86_64-apple-darwin' && 'x86_64' || 'arm64' }}"
DMG_NAME="Lightningbeam_Editor-${VERSION}-macOS-${ARCH}.dmg"
create-dmg \
@ -291,7 +332,7 @@ jobs:
# create-dmg returns non-zero if codesigning is skipped, but the .dmg is still valid
- name: Collect macOS artifacts
if: matrix.platform == 'macos-latest'
if: startsWith(matrix.platform, 'macos')
shell: bash
run: |
mkdir -p artifacts
@ -309,6 +350,8 @@ 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 = "0.1.0"
version = "1.0.0-alpha"
dependencies = [
"beamdsp",
"bytemuck",

View File

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