Feat: start updating workflows for asio on windows

This commit is contained in:
2026-03-16 14:58:38 +01:00
parent 0d0c2738f5
commit 001a42abfc
4 changed files with 65 additions and 13 deletions

View File

@@ -54,22 +54,22 @@ jobs:
echo "C:\Program Files\CMake\bin" >> $env:GITHUB_PATH
- name: Build
run: cargo build --release --target x86_64-pc-windows-msvc
run: cargo build --release --features asio --target x86_64-pc-windows-msvc
- name: Build desktop
run: cargo build --release --features desktop --bin cagire-desktop --target x86_64-pc-windows-msvc
run: cargo build --release --features desktop,asio --bin cagire-desktop --target x86_64-pc-windows-msvc
- name: Test
if: inputs.run-tests
run: cargo test --target x86_64-pc-windows-msvc
run: cargo test --features asio --target x86_64-pc-windows-msvc
- name: Clippy
if: inputs.run-clippy
run: cargo clippy --target x86_64-pc-windows-msvc -- -D warnings
run: cargo clippy --features asio --target x86_64-pc-windows-msvc -- -D warnings
- name: Bundle CLAP plugin
if: inputs.build-packages
run: cargo xtask bundle cagire-plugins --release --target x86_64-pc-windows-msvc
run: cargo xtask bundle cagire-plugins --release --features asio --target x86_64-pc-windows-msvc
- name: Install NSIS
if: inputs.build-packages

44
Cargo.lock generated
View File

@@ -372,6 +372,20 @@ dependencies = [
"libloading 0.8.9",
]
[[package]]
name = "asio-sys"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826194e1612938c9be09b78b58323fbb2e326de3d491b4230186cf6e832d8ded"
dependencies = [
"bindgen",
"cc",
"num-derive",
"num-traits",
"parse_cfg",
"walkdir",
]
[[package]]
name = "async-broadcast"
version = "0.7.2"
@@ -859,7 +873,7 @@ dependencies = [
"cpal 0.17.1",
"crossbeam-channel",
"crossterm",
"doux",
"doux 0.0.14",
"eframe",
"egui",
"egui_ratatui",
@@ -911,7 +925,7 @@ dependencies = [
"cagire-ratatui",
"crossbeam-channel",
"crossterm",
"doux",
"doux 0.0.13",
"egui_ratatui",
"nih_plug",
"nih_plug_egui",
@@ -1452,6 +1466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b1f9c7312f19fc2fa12fd7acaf38de54e8320ba10d1a02dcbe21038def51ccb"
dependencies = [
"alsa 0.10.0",
"asio-sys",
"coreaudio-rs 0.13.0",
"dasp_sample",
"jack 0.13.5",
@@ -1823,6 +1838,22 @@ dependencies = [
"symphonia",
]
[[package]]
name = "doux"
version = "0.0.14"
source = "git+https://github.com/sova-org/doux?tag=v0.0.14#f0de4f4047adfced8fb2116edd3b33d260ba75c8"
dependencies = [
"arc-swap",
"clap",
"cpal 0.17.1",
"crossbeam-channel",
"ringbuf",
"rosc",
"rustyline",
"soundfont",
"symphonia",
]
[[package]]
name = "downcast-rs"
version = "1.2.1"
@@ -4102,6 +4133,15 @@ dependencies = [
"windows-link 0.2.1",
]
[[package]]
name = "parse_cfg"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "905787a434a2c721408e7c9a252e85f3d93ca0f118a5283022636c0e05a7ea49"
dependencies = [
"nom",
]
[[package]]
name = "paste"
version = "1.0.15"

View File

@@ -52,7 +52,7 @@ cagire-forth = { path = "crates/forth" }
cagire-markdown = { path = "crates/markdown" }
cagire-project = { path = "crates/project" }
cagire-ratatui = { path = "crates/ratatui" }
doux = { git = "https://github.com/sova-org/doux", tag = "v0.0.13", features = ["native", "soundfont"] }
doux = { git = "https://github.com/sova-org/doux", tag = "v0.0.14", features = ["native", "soundfont"] }
rusty_link = "0.4"
ratatui = "0.30"
crossterm = "0.29"

View File

@@ -241,6 +241,7 @@ bundle_desktop_native() {
bundle_plugins_cross() {
local platform="$1"
shift
local rd
rd=$(release_dir "$platform")
local os
@@ -249,8 +250,8 @@ bundle_plugins_cross() {
arch=$(platform_arch "$platform")
# Build the cdylib with cross
# shellcheck disable=SC2046
build_binary "$platform" -p "$PLUGIN_NAME"
# shellcheck disable=SC2086
build_binary "$platform" -p "$PLUGIN_NAME" "$@"
# Determine source library file
local src_lib
@@ -440,14 +441,25 @@ for platform in "${selected_platforms[@]}"; do
echo ""
echo "=== [$step/$total] $platform ==="
# Enable ASIO for Windows targets
local asio_flag=""
case "$platform" in
*windows*) asio_flag="--features asio" ;;
esac
if $build_cagire; then
echo " -> cagire"
build_binary "$platform"
# shellcheck disable=SC2086
build_binary "$platform" $asio_flag
fi
if $build_desktop; then
echo " -> cagire-desktop"
build_binary "$platform" --features desktop --bin cagire-desktop
if [[ -n "$asio_flag" ]]; then
build_binary "$platform" --features desktop,asio --bin cagire-desktop
else
build_binary "$platform" --features desktop --bin cagire-desktop
fi
if ! is_cross_target "$platform"; then
echo " -> bundling cagire-desktop .app"
bundle_desktop_native "$platform"
@@ -457,7 +469,7 @@ for platform in "${selected_platforms[@]}"; do
if $build_plugins; then
echo " -> cagire-plugins"
if is_cross_target "$platform"; then
bundle_plugins_cross "$platform"
bundle_plugins_cross "$platform" $asio_flag
else
bundle_plugins_native "$platform"
fi